JW Player Plugin for WordPress does not register its shortcode like all other shortcodes, so strip_shortcodes() will not know about it and not strip it. In the code there is a note that this is because it uses argument names with a . in it, and WordPress does not support this.
There are probably multiple ways to solve this, but I would copy the relevant line from strip_shortcodes() and integrate the regex from the plugin:
function custom_excerpt( $length, $more_text ) {
global $post;
$text = get_the_content();
$text = strip_shortcodes( $text );
// Strip JW Player shortcode too
$text = preg_replace( '/(.?)\[(jwplayer)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s', '$1$6', $text );
$text = apply_filters('the_content', $text);
// Continue with the rest of your function ...
Related Posts:
- Using “excerpt_more” filter for a specific post type
- All shortcodes not working on custom theme
- How to parse nested shortcodes?
- Adding Custom Fields for Img in Posts
- How To Ignore a Filter On Applying Filter the Content In a Function
- Shortcode display outside the div
- Pass $this to function nested in another public function of the same class
- change plugin shortcode function [closed]
- Dynamic HTML not displaying at respective place
- Plugin form unable to process
- Calling shortcode in wp_localize_script strips result
- WordPress shortcodes & performance
- Is it possible to make shortcodes NOT case sensitive?
- Short code for Venues
- Frontend editing, Frontend user dashboard
- Looking for a solution – slightly convoluted problem
- Can’t get custom posts of taxonomy to show
- WP theme with Backbone
- Shortcode doesn’t work if I directly paste its function in a template file?
- Can wp_localize_script be used within a shortcode?
- How can I list recent posts excerpts?
- Pass variable to nested shortcode
- Add custom variable in Contact Form 7 mail body
- get shortcode value
- How to generate CSS from a shortcode within a plugin
- Storing Options in a Shortcode
- Custom CSS for plugin form
- Show history of post revisions on front end
- Prevent shortcode from being wrapped in tags
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Shortcode based chart plugin
- Plugin shortcodes not working in custom theme
- Input with spaces in Shortcode attributes overwritten by defaults
- How to put JQuery/Ajax inside shortcode?
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Can someone please tell me what is wrong with my plugin?
- Trouble with editing template for “List category posts” plugin
- WordPress Shortcode to get URL Parameters $_GET[‘name’] redirects for no reason at all
- WordPress function not being called from jQuery method
- How to fix wrong attribute error for Visual Composer Grid Builder?
- creating html reusable blocks via shortcodes
- Single API call exposed via shortcode with params
- SEO Friendly URL on dynamic product page produced via shortcode
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Excerpts on category page
- Insert content of a post into another
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- Custom Shortcode Broken in WordPress 3.1
- Namespaced shortcode?
- Displayed content disappears when adding attributes to shortcode
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Shortcode does not expand in Facebook like
- strange shortcode error: does shortcodes requires any dependency?
- wp_localize_script not passing the data
- Get post content from outside the loop with plugin shortcode usability
- How to rewrite URL and get the values?
- How to get rid of Ellipsis on Woocommerce [Essential] Theme [closed]
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- How to prevent tabs from opening all at once
- Executing Javascript in Plugin
- Custom post type change excerpt more and excerpt length
- Create Short code dynamically
- Get variable value based on string constant
- How To Use do_shortcode with WooCommerce One Page Checkout
- WordPress load same script two times
- How to get current cart values using WC_Shortcodes?
- Can I add Short Code Of A Plugin In The Code Editor of WordPress?
- why does an empty get_the_excerpt change get_the_ID to default homepage?
- insert og image link in wordpress post
- Get a value from a shortcode for another function
- How to check if short code is present in template?
- How to call function in WordPress on button click?
- Hide content for specific users with id
- Why is my shortcode not working?
- using WPPB shortcodes without the plugin
- save short-code in my custom plugin settings problem missed something
- WordPress show descriptions under images in gallery
- Modify Plugin PHP Class in Child Theme – Correct Method
- Meta box or shortcode help
- function of parent not working in childtheme
- Update Plugin Without Overwriting Custom Settings
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Posting code inside the post instead of in the template file using shortcode
- How to use shortcode of any plugin to show it visually where i want?
- Why function hooked using object are executing at all time?
- Need to change contact email depending where user is from
- Pulling RSS from site and display it in posts
- Trying to Understand Shortcodes.
- Shortcode return is printing a 1 afterward
- Creating a press page for our project
- Any way to hook into WP after a page displays?
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Display HTML5 jQuery Audio Player On Front Page
- Invalid argument supplied for foreach()
- cURL External API request displays content above other content on page
- Beginner question: Accessing js script in plugin
- thumbnail_width not working in wordpress most popular post plugin
- Display file contents within Plugin