You can temporarily detach the function from the hook.
// THIS IS MY PROBLEM LINE, i USE Apply Filters for post content....
$priority = has_filter('the_content', ['TableOfContents', 'writeTOC'] );
if ( $priority !== false )
remove_filter('the_content', ['TableOfContents', 'writeTOC'], $priority );
$meta = apply_filters('the_content', $post->post_content);
if ( $priority !== false )
add_filter('the_content', ['TableOfContents', 'writeTOC'], $priority );
$meta = strip_tags($meta);
$meta = strip_shortcodes($meta );
Codex:
Related Posts:
- Redirect to another page using contact form 7? [closed]
- shortcode doesn’t work
- Hide content for specific users with id
- Why is my shortcode not working?
- How can I see $post object in frontend from functions.php?
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Displaying friend’s posts only
- What are the differences between WPINC and ABSPATH?
- How to add a shortcode button to the TinyMCE editor?
- Custom media upload content for inserting custom post shortcode
- How can I make it so the Add New Post page has Visibility set to Private by default?
- Checking if an attribute exists in a shortcode
- Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Show Similar Post Titles ( Similar to Stack Exchange )
- How to add option box in “Edit Post” plugin API?
- How do I unlock a post programmatically?
- Customizing subject in comment notification e-mails
- category_name not working (not showing up in sql query debug)
- enqueue script only if it is not already enqueue
- Using require_once in a Plugin?
- How can I make my custom shortcode work in a Custom HTML Widget?
- How to Loop Plugin Option Field Set?
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- PHP Deprecated: Non-static method should not be called statically
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Update Multiple Post Meta for the Same Post In One call?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Adding Custom Fields for Img in Posts
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- Saving Plugin settings to the database
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- Shortcode display outside the div
- How to get posts by content?
- WordPress widget / plugin….fields not appearing in my widget
- Add CSS animation as Preloader to WordPress
- Rename existing old uploaded images containing accented French characters (not during upload)
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to Create a Directory in a Plugin Folder?
- Pass $this to function nested in another public function of the same class
- Publish Post After Click On A Link
- Calling function from within functions.php returns unwanted value
- Errors while using ajax from external wordpress page
- Dynamic HTML not displaying at respective place
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Create plugin that works in background
- Checking for user role in a custom plugin
- Deleting images through upload folder, but not deleting from media library
- Custom Shipping method not showing in checkout
- post expire after x days
- creating html reusable blocks via shortcodes
- Image upload and download from front-end
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- wp_remote_get() returns 403 while file_get_contents() does not
- Single API call exposed via shortcode with params
- How to output CMB2 select options from repeated groups select elements?
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Nested shortcode functions accessing variable
- What are the specifics of WordPress development I need to know? [closed]
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- External RSS feed to WordPress Portfolio
- How to replace WordPress Media Upload Window with user’s device window?
- Conditional attributes and logic per product category
- Creating shortcodes in plugin
- Some code in shortcode function being ignored
- How to create a custom post type that contains another custom post type?
- How to create a custom shortcode based on the layout?
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- Unable to add TAB character to post?
- WordPress get_avatar function not correct working
- How to Create a shortcode to this php function
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Create shortcode to echo javascript
- What is @Action in WordPress?
- Setup wp_schedule_event within a custom plugin
- Create a plugin from within WordPress
- Class variables not correct on page
- Why is one phpunit test throwing an error on one class when all other classes are similar without error?
- Namespaced shortcode?
- Activate my plugins via FTP
- pagination on data fetched using SQL query
- How to delete all trashed item in one-go
- Duplicate results are displayed in a custom plugin [closed]
- Check if variable is set in filter
- Why is my custom post type not being activated on plug-in activation?
- How to add apply_filter for a class property in plugin
- Issue running db create table query from static method
- execute function after one completed
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Why am I unable to load scripts in head in plugin?
- How to make multiple admin pages for one plugin?
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Include a php file from another plugin
- How to get all posts belongs to a user between a certain date