I was able to solve this by using str_replace.
function mp_filter_download( $result ) {
$search="<div style="clear:both;"></div>";
$replacewith=" ";
return str_replace( $search, $replacewith, $result );
}
add_filter( 'downloads_shortcode', 'mp_filter_download', 10, 2 );
Related Posts:
- apply_filters(‘the_content’, $content) vs do_shortcode($content)
- How to get shortcode’s input values inside a filter?
- Filter specific shortcode output?
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- add_filter and changing output captions of image gallery
- How to add attribute to output with wp_video_shortcode add_filter
- Search content for shortcodes and get parameters
- Change default settings used by gallery shortcode
- Shortcodes not resolved in AJAX call response
- Ajax, filters and shortcodes
- Format content value from DB outside of WordPress filters
- Use content custom filter for all shortcodes
- How to link current user to their author page through shortcodes
- filter title from shortcode
- how to remove filter from wordpress shortcode output
- Error when overriding only some audio shortcode HTML output
- How to use shortcode attribute in separate function
- Shortcodes — Using add_action, add_filter in the shortcode
- How to pass variables to custom filter from multiple functions
- How to filter backend post list showing only posts having a shortcode
- How can I return shortcode output to the top of the content?
- the_excerpt filter doesn’t work as expected
- run shortcode in excerpt of single custom post type
- Filter everything from content except output of a shortcode
- Something is filtering my shortcodes… Can’t figure out what
- How to use do_shortcode_tag to modify the output of a shortcode?
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- How to change dynamically page title according to variable data?
- How can I filter tag_description()?
- WordPress removing slashes from shortcode output
- How to remove shortcode(s) from WYSIWYG Page editor for Non Admins
- Shortcode / plugin with custom (flexible) output
- Filter Shortcodes when using get_page
- Parse a shortcode differently based on on what it’s nested in
- Need to return shortcode text instead of the output
- add_filter to the_content after apply_filters
- post_orderby filter breaks function
- the_content getting current page content instead specified ID
- Override wordpress audio playlist
- How to wrap pattern-matches from the_content in [wiki]-shortcode tags
- Add Index to Item in WordPress Gallery
- create a shortcode with acf including a filter
- How to take shortcode and content separately from a page?
- Auto-generated excerpt with shortcode and read more button/text link
- shortcode function outputs multiple anchor tags
- apply_filters to $GLOBALS
- Is it possible to include the add_filter() function within a shortcode function
- Activate short codes for all post queries?
- Problem with shortcodes in external file
- How can I display wp_link_pages before a shortcode, if it is used, or display after content?
- Add custom options to the wplink dialog
- How to show page content in feed?
- What characters are allowed as a shortcode tag and how should they be sanitized?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- Alter only the page title, not the post titles within
- Load different template file when condition met?
- Too many actions/filters!
- How can override a add_filter of a plugin?
- Adding Filter Conditionally Per Page ID
- Nested calls the the_content filter
- How to change domain used when pinging sites
- Return a custom value in a function added to an action hook
- Multiple filters for wp_get_archive
- Filter and modify entry-footer link in twentyseventeen
- Function the_content not working
- Break out of wordpress filter
- Are there actions or filters I can use for Ajax calls?
- Add filter problems
- Where is the content cache when using apply_filters(‘the_content…?
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- How to prepare WordPress Rest data for Preview Changes?
- How to validate recaptcha on comments form?
- How to filter $content in shortcode function
- Is there any filter to trigger as soon as media is uploaded to post or page?
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- add_filter with retrieve_password_message() not working in plugin, but works in functions.php
- Add a div of content within the_content after a certain block
- separate categories with comma and srounded by single quote
- Filter for when the post is updated
- Prevent add_filter being applied to wp-admin pages
- Filter a pluggable function
- apply_filters(‘get_the_content’, $content) + Except
- Is there a way to globallly apply esc_html( … ) to all inputs and anchors to filter out XSS markup?
- Is it possible to add a shortcode below post title?
- Filter get_page_by_path()
- Handle multiple parameters in filter
- How to add filter in custom rss feed
- Want to use wp_get_current_user() in query filter
- Apply wordpress filter checking category
- How to set a filter search for categories of blog posts in wordpress
- How can I filter the comment action links so that I can display the actions links based on user capabilities?
- Adding link options in insert/edit link dialog window
- How can I limit access to uploaded media depending on the logged in user’s user role?
- WordPress Tag Cloud Filter Prevents Widget HTML from loading
- Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin
- Adding Filter | Page Title | Template | Why the_title affecting on menu?
- Code restricted to dashboard, running unexpectedly in the frontend (pre_get_post and admin-ajax.php)
- remove_filter excerpt_more from a plugin class