This one should work
add_filter( 'the_content', 'pre_content_filter', 0 );
function pre_content_filter( $content ) {
return preg_replace_callback( '|<pre.*>(.*)</pre|isU' , 'convert_pre_entities', $content );
}
function convert_pre_entities( $matches ) {
return str_replace( $matches[1], html_entity_decode( $matches[1] ), $matches[0] );
}
Let me know
Related Posts:
- How to stop wordpress mangling R syntax ‘
- How to have syntax highlighting in wordpress.com blogs?
- Getting < and > instead of < > while posting code
- syntax highlighting for theme-editor.php?
- No line breaks in syntax highlighted code
- My Syntax Highlighter Died, What Now?
- WP-Syntax plugin not working [closed]
- How can I do syntax highlighting for files included with a custom shortcode?
- How to filter PHP opener?
- How to insert spaces/tabs in text using HTML/CSS
- HTML5 rich-text inside textarea
- How to avoid the \xc2 character or in my code snippets?
- Best collection of code for your 'functions.php' file [closed]
- How to: Easily Move a WordPress Install from Development to Production?
- Is moving wp-config outside the web root really beneficial?
- Hide the fact a site is using WordPress?
- Objective Best Practices for Plugin Development? [closed]
- Organizing Code in your WordPress Theme's functions.php File?
- What does this PHP function code mean? [closed]
- similar of my posts in all over the internet sites and blogs [closed]
- When to use is_home() vs is_front_page()?
- Is there a flowchart for WordPress loading sequence?
- How to change the default registration email ? (plugin and/or non-plugin)
- Best collection of code for your .htaccess file [closed]
- MySQL Database User: Which Privileges are needed?
- Essential technical features for high-end WordPress web hosting? [closed]
- How to structure a plugin
- How to remove admin menu pages inserted by plugins?
- How to create a custom search for custom post type?
- Opinions and recommendations on the best barebones base theme [closed]
- How to put logs in WordPress
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Conditionally Loading JavaScript/CSS for Shortcodes
- What is your best practice to execute one-time scripts?
- How to get the Date Format and Time Format settings for use in my template?
- Database synchronization between dev/staging and production
- what is the correct way to compare dates in a WP query_posts meta_query
- Explanation of update_post_(meta/term)_cache
- How to implement a customizable free OpenID authentication?
- Should all plugins be encapsulated in a Class?
- Add validation and error handling when saving custom fields?
- Best way to eliminate xmlrpc.php?
- Nested meta_query with multiple relation keys
- How To Add Custom Form Fields To The User Profile Page?
- Add multiple custom fields to the general settings page
- What SQL Query to do a simple find and replace
- What Features would you Most Like to See Added to WordPress? [closed]
- Why have on every line
- Where are Additional CSS files stored
- How can I edit post data before it is saved?
- How do i best handle custom plugin page actions?
- add_action(), add_filter() before or after function
- is_plugin_active function doesn’t exist
- Best Practices for Regression Testing WordPress Websites?
- numberposts? showposts? posts_per_page?
- Remove wrapping div and ul from output of wp_nav_menu
- Attaching taxonomy data to post with wp_insert_post
- What Is The Use Of map_meta_cap Filter?
- How do you use a CPT as the default home page?
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Plugins in symlinked directories?
- get post author id outside loop
- Difference between add_filter and apply_filters
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- Custom pages with plugin
- Proper Way to Modify Plugin
- Custom Walker: how to get ID in function start_lvl
- Pass boolean value in shortcode
- How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
- Customizing a WordPress theme without changing it?
- Creative uses of WordPress [closed]
- Can a custom post type have a Parent Page?
- Restrict custom post type to only site administrator role
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Best practices for localizing WordPress content?
- Plugin Form Submission Best Practice
- How to *remove* a parent theme page template from a child theme?
- get_the_term_list without links in 3.1
- How to make a text with hyperlink translatable in WordPress?
- Creating an Image-Centric Custom Post Type?
- Validating Custom Meta Box Values & Required Fields
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- Integrate WordPress and bbpress profiles?
- get_template_directory() vs bloginfo( ‘template_directory’ ) vs TEMPLATEPATH
- Is there a action hook for the “Empty Trash” button?
- Multiple Inputs in a Customizer Control
- New WP_Customize API – how does it work under the hood?
- Embedding a SOAP Client into a WordPress Plugin?
- Delete tables from database when deleting plugin
- Best way to abort plugin in case of insufficient PHP version?
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Update widget form after drag-and-drop (WP save bug)
- Data sanitization: Best Practices with code examples
- How to Link External jQuery/Javascript files with WordPress
- How to benchmark a WordPress installation? [closed]
- How can I configure Docker for developing and deploying a custom theme?
- Specific upload folder for PDFs in custom Post type in WP multisite
- Safest way to bulk delete post revisions
- don’t publish custom post type post if a meta data field isn’t valid