I’m wondering if i should refactor my
plugin using a ‘private’
Observer/Mediator pattern ie. collect
all relevant add_actions to my parent
class only and baking up a pattern to
notify/forward subclasses of events,
reducing the impact of my plugin to WP
event ques.
The event queue is fundamental to WP, so it’s pretty fast and getting faster all the time.
So, I don’t think it makes any sense, performance wise, to make your own sub-queues.
Refactoring your code so that you don’t have to make each add_action() call manually is a different matter.
Related Posts:
- Applying OO patterns and principles to plugin development
- Plugin Form Submission Best Practice
- PHP error with shortcode handler from a class
- What do you think about custom designed plugin/theme options UIs?
- Using a plugin class inside a template
- How to create a flexible abstraction for WP_Query?
- What is the correct way to build a widget using OOP
- How to make method from plugin available in theme?
- Using OOP plugin’s methods throughout the website
- Single Responsibility Principle and WP Classes
- How Can I Add a Filter to Class Instance Only?
- The ideal place for storing persistent PHP objects
- Current class on admin menu using add_submenu_page()
- Using a front controller in a WordPress plugin, any suggestions?
- set_sale_price in WooCommerce [closed]
- WordPress Ajax callback function from plugin – OOP
- How do you render_callback for register_block_type to a method in another class?
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- Registering and using actions which return results in a Plugin class
- Advice on plugin structure
- Creating a Link Text like Submit Button in Admin Page
- Creating a shortcode, but getting tied up with OOP and Classes?
- Plugin Architecture Question: How to avoid using transients
- What is the proper method of using global $post?
- Dynamically creating classes for Widget API
- WordPress class, using add_action to call member function does not work
- Remove an action by extending class and replacing it
- Using OOP inside a Plugin – Is it allowed?
- A question about add_action()
- WordPress plugin development OOP style
- OOP plugin not working
- How to call a function from a shortcode function in an oop plugin
- Bad request 400 using class based files
- Plugin frontend page design irrespective of the theme used
- functions won’t fire after I converted my code from procedural code to OOP
- Performing ajax request in wordpress
- Error when activating a custom plugin on production server
- OOP development and hooks
- How to set a public variable in someone else’s plugin class
- How to Maintain url on form submit
- How is construct function working even when variable is assigned null value?
- Object Oriented plugin, add action and variables
- How do I create Widget within plugin that uses its own class?
- How To Remove The Filter That Adds JetPack Related Content To Dom [closed]
- Method not receiving attributes from shortcode call, general OOP problems
- Overwrite WordPress Plugin Class Function
- Override theme’s WooCommerce file
- TinyMCE 4.7.11 – Enable hidden WordPress core plugins? (referencing a wp-includes from plugin.php)
- Use admin-post to submit form data to external database
- How to create plugin settings page for each admin user?
- Plugin removes itself if mistake made during edit
- Using meta_key & meta_value in add_rewrite_rule
- Using JavaScript in WordPress page to call for server data using AJAX
- implementing socket.io with wordpress
- Code for cron to delete posts that contain specific expression (e.g. “unable to fetch” every 30 minutes
- wp_editor embed shortcode not working within my plugin
- If user is logged-in display/hide widgets ( siteorigine) [closed]
- Javascript not being loaded only in custom taxonomy template
- User avatar-ACF fields
- wp_ajax add_action fuction won’t fire on custom jQuery action
- How can I specify the plugin language in WordPress?
- WC_Geolocation not found inside plugin
- Set widget icon in Customizer?
- Add new header/footer on landing page with plugin
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- tweaking the
- Redirect theme directory to plugin theme directory
- Hiding WordPress REST endpoints from public viewing using Basic Authentication
- Save in my custom admin page and redirect to the saved object
- Plugin setting page – update_option problem
- Plugin with functions inside a class & how to trigger WP CRON
- Pass javascript result to shortcode executer function
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- “Headers Already Sent” Nightmare on Plugin
- remove different admin menu for specific users
- add pagination to wp_remote_get
- Where to store Plugin specific information in the database
- One-way DB Migration Workflow
- Adding and handling custom settings tab to fusion element
- How to access classes in theme of a plugin?
- set a custom post type to a taxonomy term programmatically in metabox
- WordPress Reset password Strength set to medium
- Ajax Response Error | just getting error as the response
- Custom premium registration form and profile page for a WordPress Web Application
- Add a Script button in W3 Total Cache plugin not working due to conflicting jQuery version
- Relational / Associate tables using native WordPress functionality
- Add language localisation to javascript alert?
- redirect_to how to make it simply work with get parameter or similar?
- cancel place order proccess
- Unexpected issue when using attachment_fields_to_edit filter
- How Can I Update wp_enqueue_scripts () From WordPress Option Page Radio Buttons
- mutiple shortcode instance on the same page
- Change Front page displays settings conditionally when user is online
- Stop unauthorised file access
- CPT UI and custom database table
- Some data has already been output, can’t send PDF file – fpdf issue in WordPress
- Add the Twitter Bootstrap framework for the development of my plugins
- WordPress doesn’t create table on plugin activation
- Warning: Illegal string offset – on homepage