I am going to suggest that what you are doing is overly complex, at least insofar as I understand you.
You can determine whether your shortcode has been registered using the Core function shortcode_exists, which returns a boolean. As far as I can tell, using that should provide completely equivalent functionality to your code above.
Related Posts:
- How can I see all the actions attached to an “add_action” hook?
- Which hook callback has priority if both plugin and theme use the same hook?
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- How to Use Parameters with a Do_Action Function Within PHP Tags
- How to stop or remove an action being called inside a function of an extended class
- Automatically add attributes to woocommerce product?
- wordpress plugin is not activating from widget
- Removing an action from wp_footer called in a class that’s inside a bigger class
- add_action in a custom plugin
- What is @Action in WordPress?
- How passing values to construct function with Actions?
- add_action into another add_action not working
- Are there action hooks for comments?
- Hooking into the HTML header container
- Get post content inside plugin class method
- Ajax call to php function doesn’t work PHP code
- Creating Admin Submenu Page via Class Method
- plugins_loaded action is not working properly
- Plugin Hook: Get posts
- How to execute init or woocommerce_init only for checkout page
- add_action() not working for admin
- How to customize WP_Error (REST JWT authentication plugin) [closed]
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I use WordPress functions in my stylesheet?
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- How to prepend to the_title for admin-side plugin’s use
- Creating search filter through plugin
- template_redirect not being called when using ajax
- How to edit/delete single row items in a table on my own menu page
- Displaying Gravity Form data on WordPress page [closed]
- Get a list of galleries from an album in NextGEN Gallery [closed]
- How to trigger $_GET request within admin plugin page?
- Wp favorite posts get user favorites in profile using buddypress [closed]
- add mediaelement.js plugins into WordPress video player control bar
- Preferred way of cacheing a value in php
- Edit Yoast SEO breadcrumbs output [closed]
- Adding a slider captcha to the comment system
- Query all customers/users and check for duplicate information
- WordPress function not being called from jQuery method
- WordPress WPforms customization
- wp_remote_get() returns 403 while file_get_contents() does not
- Where these .js file come to source code?
- How I can internationalize variables within the function _e () __ (), etc?
- Plugin init hook fires repeatedly
- Remove_action from plugin with a Class
- How to delete all trashed item in one-go
- Get ‘Headers already sent’ error for the plugin I am creating when I try to login
- Return multiple values in a shortcode attribute
- get specific value of a array | PHP
- Creating a functionality plugin to edit seriously simple podcasting
- Programatically upload a file to be stored inside blob field in database, NOT on filesystem
- Make plugin php file called directly aware of WordPress?
- Next Previous Post in wordpress with previous / next link with title?
- WordPress truncate posts question (plugin related)
- WordPress Post HTML after Posting
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Settings options not showing up on Sub Menu page in WordPress plugin
- Cannot Access Console
- Plugin error after installation
- woocommerce remove coupon link does not work
- Use a hook or filter, or overwrite this Gamipress function?
- Hook from plugin doesn’t fire up from external PHP script
- Replace old theme that understand old css (vcex_icon_box css_animation)
- How to insert datas in the table on wordpress?
- How to get database connection details without longing to cpanel in WordPress?
- The Build menu theme is frozen with the wordpress theme
- Does anyone know why my SEO and title become one?
- How to translate wordpress blog to other languages?
- How to translate to spanish wordpress hardcoded content/files?
- How to get a post views count using ‘WordPress popular posts’ plugin
- Get Shortcode output to database for static post_content
- strtotime not working
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- How To Toggle User_Meta in frontend in a form using PHP
- Change Woo Custom Endpoint Titles from a Plugin
- Change custom rewrite rule when permalink is updated/changed
- Optimized PHP & WordPress settings for speed/performance?
- Speeding up WordPress on a Local Network
- How can I store user preferences in WordPress and retreive them later?
- Any method to make specific widget for every post and page?
- How to add php plugin code in theme
- how change my menu on submenu
- Plugin debugging with errors in activation routine
- Embed Javascript code to registered users only
- Find all strings between an enclosing shortcode
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- W3 Total Cache Can’t Really Detect Things
- How do I add php to all links automatically?
- How to fix vanilla comments extra iframe space
- Meta Box plugin image_advanced not showing up on frontend
- Creating Features List in WordPress Post
- PHP Creating a formula from mysql db values and db stored math operator
- how to show selected options drop down menu values in attributes field in after saving post.php
- Accessing Correct Database to Create REST API Endpoint
- How do I replace a logo image that’s hard-coded into a plugin’s logo.php file?
- Read page- or post-content across different builder-plugins
- How to make WordPress Plugin run on single specific Admin Page
- Add custom button to the changeset status in the Customizer
- White Screen of Death on WordPress Website