Overview
This prompt aims to guide the development of a WordPress plugin that simplifies affiliate link management. Developers and website owners will benefit from streamlined shortcode creation and enhanced visualization of affiliate links.
Prompt Overview
Purpose: This plugin simplifies the management of affiliate links by converting them into shortcodes.
Audience: It is designed for WordPress users who utilize affiliate marketing in their content.
Distinctive Feature: The admin interface allows users to visualize and manage all created shortcodes effectively.
Outcome: Users can easily generate and manage affiliate links, enhancing their marketing efforts on WordPress.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Content Management Systems (CMS), Data Analytics & Business Intelligence, Development Tools & DevOps
- Techniques: Role/Persona Prompting, Structured Output, Style Guide Adherence
- Models: Claude 3.5 Sonnet, Gemini 2.0 Flash, GPT-4o, Llama 3.1 70B
- Estimated time: 5-10 minutes
- Skill level: Beginner
Variables to Fill
No inputs required — just copy and use the prompt.
Example Variables Block
No example values needed for this prompt.
The Prompt
You are an advanced reasoning assistant tasked with creating a WordPress plugin named “m-af-link”.
The plugin should:
– Convert affiliate links, specifically affiliate scripts, into WordPress shortcodes for easier management.
– Provide an admin interface where users can view all created shortcodes alongside their original affiliate link content to enhance visualization and management.
– Include a sample input field where affiliate links (scripts) can be entered for analysis and shortcode generation.
Additionally, create two extra files as part of the plugin package:
1. uninstall.php — handles plugin cleanup during uninstallation.
2. readme.txt — contains detailed plugin information for WordPress repository standards.
## Steps
3. Develop the main plugin file that:
– Registers the shortcode functionality.
– Transforms affiliate link scripts into shortcodes.
4. Implement an admin screen accessible in the WordPress dashboard that:
– Lists all created shortcodes with their corresponding original affiliate link content.
5. Add a user input field in the admin screen to:
– Analyze and convert new affiliate link scripts into shortcodes.
6. Create uninstall.php to:
– Clean up plugin options and data when the plugin is removed.
7. Write readme.txt including:
– Plugin description,
– Installation instructions,
– Usage details, and
– Changelog.
## Output Format
Provide the complete code for:
– The main plugin PHP file called m-af-link.php (or equivalent main plugin file).
– uninstall.php file with proper uninstall logic.
– readme.txt file with appropriate plugin metadata.
All code should be formatted as valid PHP for plugin files, and plain text for **readme.txt**.
## Notes
– Ensure adherence to WordPress coding standards and security best practices, such as sanitizing inputs.
– The shortcode should output the original affiliate link content when used.
– The admin screen should be user-friendly and integrated seamlessly into the WordPress admin menu.
– Include comments in the code for clarity.
Screenshot Examples
How to Use This Prompt
- Copy the prompt for creating the WordPress plugin.
- Follow the outlined steps to develop the plugin files.
- Ensure all code adheres to WordPress standards.
- Test the plugin functionality in a WordPress environment.
- Prepare the plugin for submission to the WordPress repository.
Tips for Best Results
- Shortcode Registration: Use `add_shortcode()` to register your shortcode in the main plugin file, ensuring it outputs the original affiliate link content when invoked.
- Admin Interface: Create a custom admin page using `add_menu_page()` to list all shortcodes and their corresponding affiliate links for easy management.
- Input Field for New Links: Implement a form in the admin interface that allows users to input affiliate scripts, which will be processed and converted into shortcodes upon submission.
- Cleanup on Uninstall: In the `uninstall.php` file, ensure to delete any stored options or data related to the plugin to maintain a clean WordPress installation.
FAQ
- What does the m-af-link plugin do?
It converts affiliate links into WordPress shortcodes for easier management and visualization. - How can users manage their shortcodes?
Users can view all created shortcodes and their original links in the admin interface. - What files are included in the plugin package?
The package includes m-af-link.php, uninstall.php, and readme.txt for documentation. - What is the purpose of uninstall.php?
It handles cleanup of plugin options and data during uninstallation of the plugin.
Compliance and Best Practices
- Best Practice: Review AI output for accuracy and relevance before use.
- Privacy: Avoid sharing personal, financial, or confidential data in prompts.
- Platform Policy: Your use of AI tools must comply with their terms and your local laws.
Revision History
- Version 1.0 (February 2026): Initial release.


