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
- Custom media upload content for inserting custom post shortcode
- Checking if an attribute exists in a shortcode
- 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
- enqueue script only if it is not already enqueue
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- WordPress widget / plugin….fields not appearing in my widget
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Custom Shipping method not showing in checkout
- Can’t get custom posts of taxonomy to show
- Adding Attachment Display Settings in custom media frame
- get shortcode value
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Storing Options in a Shortcode
- How can I get WordPress to save comments in markdown format?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- How would I go about creating a user ranked post popularity page?
- Redirection of users away from wp-admin (but not administrators)
- code is working properly in Core PHP but writing coding in WordPress
- Making a Template for a CPT created by a plugin
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Creating shortcodes in plugin
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- Inject HTML meta tag inside wordpress tag using add_shortcode
- 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?
- Duplicate results are displayed in a custom plugin [closed]
- Why is my custom post type not being activated on plug-in activation?
- Why am I unable to load scripts in head in plugin?
- How to get all posts belongs to a user between a certain date
- How to redirect to same page after form submission
- Return multiple values in a shortcode attribute
- How do I add $_SESSION[”] to my wordpress page?
- I receive taxonomy id
- output html on post or page from custom plugin [closed]
- Is there a way to convert shortcodes to html content?
- Loop in elementor custom widget not working
- Built a second plugin but it overwrote the first one
- Creating a functionality plugin to edit seriously simple podcasting
- How to use template inside plugin shortcode with variables for big HTML code
- Asynchronous request in wordpress
- Make plugin php file called directly aware of WordPress?
- Way to send multiple values for column to MySQL?
- Creating an admin meta box to save post as pending
- Next Previous Post in wordpress with previous / next link with title?
- Different registration form for different roles
- Apply html elements in php statement
- WordPress Post HTML after Posting
- Settings options not showing up on Sub Menu page in WordPress plugin
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- Conditional delete metadata does not works
- Help to Create a Simple Plugin to make a post
- The Build menu theme is frozen with the wordpress theme
- How can I translate something in my class constructor of my plugin in WordPress?
- Define global variable in theme file and call that variable in plugin file
- Rename a folder via HTML POST request
- How to translate to spanish wordpress hardcoded content/files?
- Get Shortcode output to database for static post_content
- SimpleXML is not working with xml response from external api
- WordPress plugin blog creation
- add tags to wordpress post using REST API
- Multiple image selection custom widget
- Change Woo Custom Endpoint Titles from a Plugin
- Failed to load resource: the server responded with a status of 500 () post.php
- submit form data to wordpress existing database table using my plugin
- WP Plugin CSS not being applied to page
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Get content and send to 3rd party
- Populate select option with JSON file
- Is it possible to get a shortcode generated by a plugin, then, using a function, create a new post using that shortcode?
- Find all strings between an enclosing shortcode
- How to display single arbitrary facebook post with a shortcode?
- Plugin Breaking WordPress Login
- How to get site homepage from plugin?
- Get page type to display content
- Capturing POST data
- Unable to show 4 products in a row
- What is the source outline for a basic word press plugin?
- Creating Features List in WordPress Post
- Submit posts in two different post types with the same form
- Function not being called on form submit, only blank admin-post.php page
- cURL External API request displays content above other content on page
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database
- Display file contents within Plugin