Whilst you’ve got the right idea, it won’t work in this case. Taking a look at the source code, the class is simply instantiated without an assign. There’s no way to get a hold of $this
from outside the class, and so no way for you to remove the hooks it attaches itself to.
This is why I’m a strong advocate of static methods in plugins. I would suggest contacting the author or TinyMCE Templates & asking if he would consider moving to this style of coding, or at least assigning the class instance to a global variable so that your code will indeed work.
Short term fix? Edit the plugin file & remove the add_action
line, or use remove_all_actions( 'post_submitbox_start' )
, though do so with extreme caution!
Related Posts:
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Where do I put the code snippets I found here or somewhere else on the web?
- Disable plugin / plugin action via theme
- How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
- Need to create a Theme demo site that features multiple themes
- Define Function in functions.php or plugin and call in theme loop
- Autogenerate wordpress shortcodes using array?
- Why does including a file in theme’s functions.php not work?
- WooCommerce create new product and add to cart on form submit
- Adding New Role
- Shortcode under a Shortcode Multiple times Possible?
- Add Top-Level Menu that opens URL
- wordpress custom login successful redirect hook
- WordPress ajax call for not logged in users, doesn’t work
- Over write plugin templates
- Display All Non-Used Plugins
- Using has_filter with a class based plugin to check whether the plugin is active or not
- New Plugin: Post update pushes a copy as a revision
- Placement of Code in Plugin for hooking `save_post`
- ajax front-end increment views on click
- Display a text message if the field is not found and not if found
- Add get_option to jquery
- Get all categories of custom post even not assigned
- Function to prevent users from trashing comments
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- How to add class in plugin only for network site?
- How does WordPress process plugin installations?
- PHP Fatal error: Call to undefined function plugin_basename
- Executing my function once on a specific time
- Missing Argument
- load_plugin_textdomain error
- wordpress plugin is not activating from widget
- Adding Shortcode to Text Widget
- Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)
- Using a function to change favorites listing
- WP Query. Is there a maximum size?
- How to remove custom post type and add category and post name
- bbPress plugin: forum lists not showing in correct order? [closed]
- Difference and examples of esc_attr__() and esc_attr_e()
- Is there a best practice remediation for PhpStorm’s warning that void function the_post_thumbnail is used?
- How to prevent additional code in functions.php to be removed once there is an update?
- Proper way to use plugin functions in functions.php
- How to reset the plugins without deactivate the plugin
- plugins_url() works everywhere but wp_reqister_script()
- Replacing global wp_query
- How to get specific string/value from an array? php [closed]
- 5 PHP Fatal error: Uncaught ArgumentCountError (Cannot Find)
- Woocommerce singe product custom gallery output works just on the first slide
- How to translate wordpress error message
- strange shortcode error: does shortcodes requires any dependency?
- All custom widgets are not showing in widget area at the same time
- Execute a function when the entire page is displayed
- More gentle way to hook WordPress custom url
- How to add custom function to pluggable.php
- Removing the custom_image_header from wp_head
- auto activate plugin when theme is active
- Build a must-use plugin that tracks when other plugins are activated or deactivated
- Checkbox show / hide output result
- How to keep plugin (media-sync) running even the tab is closed?
- Load CSS before Theme CSS
- Custom Logo Link WordPress
- Where do I put the code snippets I found here or somewhere else on the web?
- How to convert Currency from USD to other IP Based currency in Php function
- Attempting to list all product categories and the price range of all products within them
- the_posts_pagination() not working if I add wp_head() to header.php
- FPDF for creating pdf diplomas
- Creating an array from form inputs before it is posted to the options database
- function post to trash problem
- adding dynamic/multiple slug values in ‘option_none_value’
- How to assign a specific service to a specific provider based on location
- Conditional Homepage for logged in user
- Modify function output in a plugin
- Is admin section completely customizable in terms of styling?
- Compare Ajax Data Results
- EventON – Dequeue Styles
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Migrating custom php we wrote from functions.php into a site-specific plugin
- Nested DIV’s across functions in PHP, do not seem to work
- WordPress Add advertising ads befor and after content with periority [closed]
- Function in my plugin is called twice
- Searched & tried a lot: Is it Possible to Eliminate Render Blocking Manually
- Every time I use wp_get_current_user() my plugin breaks
- Can plugin automatically update if i hide the update notification?
- Conditional required fields for WordPress Contact Form 7
- AJAX login without a plugin does not work. when add a action to function.php
- Cannot access variables within a widget
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- How to use scripts when header/footer are stripped out
- How to add a handler for a button in plugin?
- Doing action based on input from options menu
- add query string to all pages after user logged in
- Simple WordPress function / plugin to redirect a site
- Remove base from the custom post type URL [duplicate]
- Sync roles across several plugins
- How to Allow Users to Select Recipients In a WordPress Comment section?
- How often should I execute add_filter and function declaration in Code Snippets?
- Product customizing quiz – quiz adding products to the cart
- How to change all the urls of the WordPress site?
- Event Made Easy – Block registration to two or more events that have the same category
- I want to allow certain file types on dokan upload files