This really depends on the scoping of the code you want to use and whether there are actions or filters that encompass the functionality.
You should be able to check whether the code you want is available with a combination of class_exists()
and function_exists()
calls. But this will depend on whether the classes and functions you want to use are scoped as public
, protected
or private
.
If you can determine that the plugin is loaded and are lucky enough that the code you want to utilise is wrapped up in an action or filter then you should be able to simply do_action
or apply_filters
based on the assumption that the other plugin will handle it for you. But this is an unlikely scenario I expect.
If the plugin and its classes you want don’t exist, what are you going to do instead though, just not enable that feature?
Related Posts:
- What’s the preferred method of writing AJAX-enabled plugins?
- How to add a shortcode button to the TinyMCE editor?
- Redesigning Custom Post Type “Add New” page
- Plugin upgrading: Widget settings
- Create a table in custom plugin on the activating it?
- Is there any record of installed plugins in the database?
- Using require_once in a Plugin?
- How to call “page specific menu items” in template [closed]
- Custom headers for the WordPress plugin directory
- plugin wants to update to wrong plugin
- How can I add a custom header to a custom template in a plugin without using the theme folders
- Trying to avoid including wp-load.php
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Understanding apply_filters
- Editor not displaying dynamically after clicking on the button
- Make the plugin directory recognize new version numbers
- Master menu item for multiple plugins?
- Publish Post After Click On A Link
- Where do I add a new table’s name in wpdb?
- How to create popup same as wordpress popup feature
- How to submit documentation with plugin
- How to customize user search
- Upgrade Private Plugin without Deleting
- Placement of Code in Plugin for hooking `save_post`
- gallery option is not available in media upload box in costum theme option page
- How to make first_name and last_name required fields in user profile?
- Making my plugin translation ready. Poedit not working
- How can plugins have their own pages?
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- Can we use a webservice with WordPress?
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- Reusable functions and tools (Framework)
- Checking instances of scripts in wp_head
- Creating a plugin to sanitize comment and the url field before display only
- Creating mySQL procedure with $wpdb
- How can I prevent my plugin go development trunk [closed]
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Best place for if/else piece of code related to custom plugin?
- How do you assign a UUID to posts/products/comments/reviews?
- How to make a implement queue for scheduling tasks in WordPress?
- How to create a code editor for my plugin .?
- Editable form for WordPress plugin options page
- Manually set a custom admin sub-menu selected?
- wp-pagenavi getting 404 page not found
- remove add new post, if there is already one post
- Plugin Not Working After Being Uploaded To WordPress Plugin Repository
- Difference and examples of esc_attr__() and esc_attr_e()
- Change the display of Settings API (do_settings_sections)
- WordPress Jquery UI Spinner
- Issue running db create table query from static method
- How can I modify admin bar only if my plugin is loaded
- How to make custom plugin run on demand?
- Using WordPress to build membership Page
- Set WordPress Transient Expiration via Variable Value
- Sanitizing file & directory form input
- Adding custom meta boxes to specified custom post type
- Override plugin class which has namespace
- Plugin create pages and use templates
- How to write to a separate PHP file in plugin settings
- Custom CSS not being added by plugin
- Quick press publish post hook
- How to display results from a data table with an encrypted user id?
- How do i specify a url to which to redirect the user after he logs out from facebook?
- I cannot include a file in my plugin settings page
- Translation for a text that is not printed on the screen
- Two plugins using the same CSS id
- Activation flow of a plugin in a multisite environment
- Checkbox show / hide output result
- How to show multi line output from metabox
- How to keep plugin (media-sync) running even the tab is closed?
- How does the WP repository determine that two plugins are the same when counting active installs?
- Need to edit author permissions | custom taxonomy
- force logged in user to stay in the dashboard
- Visual composer custom element error
- Clicking custom plugin admin menu redirects to “No Update Required” on live site
- The plugin generated 227 characters of unexpected output during activation. If you notice “headers already sent” messages
- How to call a function from class in wp table list button form
- how to add a hidden type input to wp admin login form programmatically
- when i activate my WordPress plugin cannot see customizer options or preview
- Installation failed, trying to install ANY plugin
- WordPress the_content Filter and GET Parameter
- Overwrite js code using WP_Footer
- Plugin Options Page and Subpage
- How to access classes in theme of a plugin?
- Protect WordPress option value
- Plugin: Translated plugin is “not translated”
- Help Code Review – I need to write on .htaccess file from theme’s function.php
- ABSPATH doesn’t work
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Customize Multi-Column Tag Map to fetch specific post-type
- Upload Image to desired directory through plugin
- Jquery post responses 500 error after some time and lastly an 503 error
- How can I delete the options from DB when the plugin is deleted?
- Create Custom Coupon Type
- Is it possible to create post in wordpress using postman?
- WordPress custom block: Link saved in database not retrieved when editing post
- Accessing Correct Database to Create REST API Endpoint
- Detect if user is on the specific page in WordPress
- A multi-section WordPress store [closed]