I am not good at Regex but do_shortcode will basically will not parse any shortcode in the attributes, this might help you out:
add_filter('the_content', function($c){
$pattern = '/<span\s*(.*?)data-value=["\']?\[(.*?)\]["\']?\s*(.*?)>\s*(.*?)\s*<\/span>/si';
$c = preg_replace_callback($pattern, function($c){
return isset( $c[2] ) ? str_replace(
$c[2],
do_shortcode("[{$c[2]}]"),
$c[0]
) : array_pop($c);
}, $c);
return $c;
});
Related Posts:
- How to add a shortcode button to the TinyMCE editor?
- How to include code only on specific pages?
- how to include other plugins css files in a shortcode?
- What characters are allowed as a shortcode tag and how should they be sanitized?
- Cannot strip JW Player shortcode?
- append stylesheet via shortcode
- Shortcode under a Shortcode Multiple times Possible?
- How to list all active and specific shortcodes in wordpress
- do_shortcode() doesn’t work if shortcode contained in variable, works if shortcode passed as string
- how to show database content in wordpress post
- wp_specialchars and wp_specialchars_decode in a shortcode plugin
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- echo do_shortcode is not working on theme’s template
- Plugin shortcode won’t work on a custom template file [closed]
- Shortcode to generate and save password in a file
- Force [wordpress_social_login] shortcode to display where it is embedded [closed]
- Overriding Attributes values in Shortcode Plugins
- Demystifying and understanding shortcode nomenclature
- How to modify shortcode attributes with data from current post
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- Add htmlentities and/or shortcode into data-attributes
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- Plugin echos text from shortcode function in gutenberg page editor
- tag breaks shortcode output (other solutions don’t work)
- Allow users of my plugin to define their own shortcode rather than use mine?
- Adding Shortcode to Text Widget
- wordpress prevent multiple shortcodes
- add_shortcode is not working in plugin where others are working
- Best place for short bio,image and button [closed]
- get_post_title is not working on homepage
- Some code in shortcode function being ignored
- How to create a custom shortcode based on the layout?
- Unable to add TAB character to post?
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- Custom Shortcode Broken in WordPress 3.1
- Namespaced shortcode?
- Anyway to convert a plugin to become a shortcode?
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Displayed content disappears when adding attributes to shortcode
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Flipping Book PHP Code? Any experience?
- 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?
- 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
- Is there any way to inject text onto pages?
- Create Short code dynamically
- Get variable value based on string constant
- grab or load text on demand
- 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?
- 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?
- Shortcode do not return the right data in post
- How to call function in WordPress on button click?
- Why does my custom plugin only function correctly once per page?
- 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
- How to pass multiple custom fields as shortcode’s parameters
- Do_shortcode before send email content
- WordPress show descriptions under images in gallery
- Get shortcode attribute for AJAX call
- How to use a shortcode of a plugin in another plugin php file
- Bootstrap carousel – Using shortcode inside enclosing shortcode
- How to store multiple instances of the plugin’s options for various shortcodes
- Modify Plugin PHP Class in Child Theme – Correct Method
- Meta box or shortcode help
- function of parent not working in childtheme
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Posting code inside the post instead of in the template file using shortcode
- Allow user to input shortcode into wordpress widget
- 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
- How to use ‘Event Manager Shortcodes’ plugin via the php code? [closed]
- Any way to hook into WP after a page displays?
- WordPress shortcode plugin not working
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Display HTML5 jQuery Audio Player On Front Page
- Shortcode returning specific content of a post
- 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