You could implement filters and actions in your core plugin’s code, at the appropriate places where you want your addons to interact, by using:
do_action( 'my_action');
apply_filters('my_filter', $value, $variable_to_pass, $another_variable_to_pass);
Then you can have addons as separate plugins and have them interact with the core via these hooks by calling:
add_action('my_action', 'action_handle_function');
add_filter('my_filter', 'filter_handle_function');
this is how plugins interact with the WordPress core so you are just following in those footsteps.
Related Posts:
- How to create an API for my plugin?
- Plugins in symlinked directories?
- Best practices for using the transients API
- $wpdb->insert_id
- Remove profile picture option (and other things) from profile.php (in admin)
- Elementor Fatal error: Class ‘Elementor\Widget_Base’ not found
- How Can I Add a Filter to Class Instance Only?
- Headers already sent error with CSV export plugin
- How to add HTML / Form to an Admin Bar Menu
- Unable to write test cases for a WordPress plugin using PHPUnit and WP-CLI
- Call activation hook multiple times
- Adding custom code into header.php using a plugin
- Two-step login process – Is it possible?
- why creating tables using $wpdb is not being executed while installing plugins?
- How to update the language used by wordpress from a plugin
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- Woocommerce how to update variable product price programitically?
- Using $wpdb object in a widget
- Unified Approach for Placing Option Pages
- Define a function outside a class and call the function using action or filter hook
- Modifying WordPress plugins
- On plugin deactivation hide its shortcode
- Modify a Free Plugin available on wordpress.org & include with my Premium Theme? [closed]
- Using wp_filesystem in Plugins to store customizer settings
- Can I use the different settings sections over different pages using the save options group?
- WordPress removing data attributes for scheduled post
- WYSIWYG editor in WP 3.2 plugin
- Verify Nonce returns false – Request Nonce returns correct value
- How do I write a shortcode that opens and closes?
- What is minimum time interval for which a cron be scheduled?
- Plugin developement and SVN
- Can I change header.php of current theme through a plugin function?
- Plugin writing: access file that was just uploaded
- Gutenberg blocks not getting styled on back end
- Writing a plugin which needs to upload files
- Calling is_single() outside the loop
- Using WPDB to output raw XML fails because of wp-blog-header.php
- Add a Save Button to Custom Meta Box [duplicate]
- Amending REST API function without deactivate/activate plugin every time changes is made
- How can I listen to events in Gutenberg block?
- It’s possible to passing a ref to FormTokenField from parent component using forwardRef?
- How to show filters on table when using WP_List_Table
- Add a default WP comment form to forum template
- Gutenberg: import dependency or assign from global variable?
- Steps to Update a WordPress Plugin That We Developed
- Admin Posts List (edit.php) by post IDs
- Using WAMP, trying to create a plugin, getting error: You do not have sufficient permissions to access this page
- wp_get_theme Warning: Illegal offset type
- wordpress is adding a second backslash when I use addslashes
- Silently register plugin pages
- Plugin: database creation
- Loading Modernizr (or other JavaScript libraries) for use in a plugin
- How do I remove folder and contents I have created while installing plugin
- How to add a hyperlink to the email content in WordPress?
- Issue on Setting $icon_url Parameter on WP add_menu_page()
- Menu page with minimum capability as ‘Subscriber’ doesn’t allow ‘Admin’ to access it?
- I have this error notice ‘wp_enqueue_script was called incorrectly’ in my plugin
- Logout after clicking URL link results in “headers already sent” error
- Pass CF7 form data to plugin
- WordPress plugin cron working only if admin is logged in
- WP Dropdown Categories, display subcategories but not grandchildren categories?
- wpdb->get_var always returning 0
- A function that will remove HTML and tags from a string?
- $wpdb->prepare is not working like mysql_real_escape_string
- Redirect User to custom URL after registering
- How can I change my assigned user role in WordPress 3.5.1?
- Enqueue ONLY Plugin Styles and Scripts
- Setting a post’s category
- Questions about meta box: nonce and parameters available
- Remove Products From Category
- Using WordPress with WP Statistics for QR code usage survey
- Integrating a Gutenberg custom block within a larger plugin
- How to do admin ajax request in a plugin for rest api
- Add default value from selection
- How can I create a wp plugin with this code
- How to Login a User inside a Plugin and Redirect to page?
- admin-post.php form handling only working when logged in as admin
- Metabox types list
- Gutenberg component in a plugin admin
- WP Query date_query with several date range
- Add_action not calling callback function
- React in plugins: REST endpoints vs. regular functions
- Add a new tag based on the category name in the publish event
- WordPress function is not called and ajax return 0
- Post Pagination does not working on WP-Query
- Caption Shortcode: what filter to change the image size?
- Plugin options page: grouping checkboxes
- How to search on the field that stores escaped strings?
- Detect each active instance of a widget
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Plugin translation not being displayed
- Plugin version not updated with new version
- Adding Meta box to thrid-party plugin
- Identifying a Page Containing Shortcode at `init`
- Show Metabox Images in slideshow instead of static
- Data Validation, dynamically generated fields (select for example)
- How to conditionally include a custom field on category editor screen not category “add” screen
- Reinitiate Gutenburg’s blocks using javascript
- Generating Multiple Divi Pages from Database
- Is it smart to require_once wp-admin/includes/plugin.php when you need only one function from it