Unfortunately there is no system in WordPress to handle dependencies and sharing components between extensions is a challenge.
The possible solutions roughly are:
- make shared part a plugin and require each plugin to require it (and possibly auto install/activate)
- implement loader that will take care of processing versioning for shared part and take care of loading latest version available (see scbFramework for one example of such)
If extensions are for private use (as opposed to being separately and publicly available) you can manage them as part of whole site stack – in version control or Composer (which I hope will get more traction for WP projects).
Related Posts:
- Should I use spl_autoload_register() in my plugin?
- How can I save a multiple select array with the settings API for a plug-in options page?
- error_log() output for print_r() appearing on page
- Allow only 1 taxonomy per custom post type [duplicate]
- Is there a way for a plugin to add an attribute to the tag of a theme?
- Do I require the use of nonce?
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- Retrieve multiple values passed to a single attribute in a shortcode
- How to change date language without changing the entire site language?
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- OOP Plugin Development. Including external object
- Authenticating to WordPress, using my own authentication two-factor system
- Use composer to load custom classes [closed]
- Why when I instantiate wp_error in a validation method my user registration method stops working?
- My shortcode is showing up twice
- Database “Migration” for Plugins?
- Create table in database when activating plugin
- Problem with WordPress Ajax form
- allow user to select pages from dropdown in my plugin
- Using Font Awesome as post thumbnail
- Does wp-cron runs all tasks scheduled at same time together or one after other?
- How to set a custom path, for ajax image upload folder in admin?
- admin-ajax.php responding with 0
- Making Quote Plugin more efficient
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- custom shortcode will not display the wrapped content
- How to restrict wp generate attachment metadata() to certain intermediate image sizes
- Will simple function names in a class structure conflict with other plugins?
- WordPress php filter admin_body_class not working
- How to test nonce with AJAX – Plugin development
- wp_loaded hook block script enquequing
- WP nonce invalid
- Custom filter in admin edit custom post type responding with invalid post type?
- How can i upload images in an admin page?
- How to access global variable $menu inside a class function
- Custom user login page by creating a plugin
- Singelton class does not work, multiple initialization on page reload
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to upload a file to a folder named after the user_id via plugin
- Reprinting tags with all attributes
- developing a wordpress plugin, have a few PHP Woocommerce related coding questions
- Whitelisting items from custom options page
- Add_menu_page not displaying the menu in class based plugin
- Update results, Before deleting the related category [closed]
- adjust section according to country?
- Adding function to Genesis genesis_header [closed]
- how to update and display an option without reloading the page
- Custom plugin settings link doesn’t append current class to menu item when visited? Why?
- How to obtain the current website URL in my theme?
- How to hook code to show after the_content?
- Plugin Generate Unexpected output during activation
- Using and saving custom dropdown boxes on user profiles
- Hook called before text widget save
- Problem with AJAX in wordpress plugin
- wpdb prepare insert table doesn’t work
- Can a plugin redirect product page based on IF condition?
- Save html content of a widget textarea
- Why does my settings form redirect to the homepage?
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- How to override a plugins script
- Woocommerce custom Plugin in wordpress [closed]
- custom plugin with upload files does not work
- What is the difference between Null vs Empty (Zero Length) string?
- send popup after wp_redirect()
- no_rest_route error on custom routes
- Create ACF Checkbox to get all ACF Values from Parent Page
- Post form – AJAX won’t upload featured image – Plugin development
- File is executed twice if plugin is activating
- Plugin won’t output characters with diacritics properly
- Display a custom name when the user has no name settle in his account
- WP Hook Before a post is created
- ACF relationship on user profile page used for allowed access
- Store user form submitted information in post type
- Problem with my Login Plugin
- How to return html as a string from php for WordPress
- Sum All the Post Meta of Published posts of Current Logged in user
- Taxonomy Child Term, Counter is staying on 0
- Need help with format of nested array in MySQL
- Autoloading Classes in Plugins
- How to add delete, approve, spam Links to Comments
- Help on Wp_query to print an term
- Comparing Dates within plugin using PHP If statement
- Upload images from one server to an other in wordpress
- Setting at job with shortcode not working
- Run code before WordPress loads and insert data into WP if need be
- Singleton plugin activation; create database
- PHP: Why does my code work in index.php but not a widget?
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- How keep woocommerce users separeted in multisite install and keep admins on network
- I’m not able to get access $wpdb in my php file in wordpress
- How do I change the Go To Categories link in the term_updated_messages
- Authenticate + Authorize WP REST API request before built-in WP JSON Schema Payload Validation?
- Woocommerce Convert existing order to the cart
- Redirect posts to post editor page based on query string
- Load style and script for custom post type metabox
- Permissions error when I use my plugin to delete comments in the front-end
- WordPress wp_set_object_terms does not assign product to custom taxonomy
- Issue with WordPress Plugin Activation Hook and Table Creation
- Too few arguments – wp_login action