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?
- Multiple Inputs in a Customizer Control
- Embedding a SOAP Client into a WordPress Plugin?
- How to set a default format for a custom post type?
- Remove WordPress theme from a specific page
- How to keep a WordPress site synchronized between two servers?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Integrating WordPress to my website, while keeping my own authentication system
- difference between esc_attr(), strip_slashes(), strip_tags()?
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- How do I set up a webhook?
- Custom Fields and performance
- How to show custom message once on plugin activation?
- automatically create taxonomy with same name as post title
- Set default options for inserting media
- wp_schedule_event / cron_schedules – custom recurrence time not working in Plugin
- One WordPress Install, Two Categories. Each Category Gets a Domain
- Adding callback function for wp_ajax_ has no effect
- Looking to display non-image files in Gallery with logo specific to file type
- saving custom post type data to different table in wordpress
- Query post types with multiple keys
- How can i customize the comment list
- Fast way to add countries as a custom taxonomy term?
- clean wp_options table unused rows
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- Using transients to store captchas
- How to extend nav-menu-item-control data in Appearance > Customize?
- How to correctly add JQuery in a WP theme?
- Multiple Category Search
- Is it possible to have one page with multiple items, or 2 blogs on a site?
- Photography Based Design – Multiple Images Per Post
- Function to allow “Anyone can register”?
- database interactions using OOP
- Extending the WP_Widget_Text class
- create a static folder independent with WordPress
- Enumerating over a category of links
- Problem with meta box in Links
- query usermeta from custom field
- update user information
- user_profile_update_errors hook not executing
- wp_query get post custom taxonomy in search.php
- Insert image in WordPress with HTML5 tag and caption function
- Allow users to create posts without logging in?
- Best Practices for a Completely Customizable Homepage – without plugins
- Users can only view their content from the front end
- Localization: I want the backend: english and frontend in defined language
- Theme compression/ minifying or W3 Total Cache – which should I use? [closed]
- How to check for images before echo
- How to remove all the items under “Personal Options” on user profile page?
- How to make universal gallery and improve admin side of managing galleries?
- Need ‘logo page’ before wordpress page!
- Show message from backend
- Sticky menu for WP custom menubars
- Salesforce lead tracking with contact forms plugins [closed]
- When I try to de-activate any plugin it gives error “Warning: call_user_func_array() [function.call-user-func-array]”
- How can style text like this in wordpress
- Setup database structure with books, authors, languages etc. for publishing house [closed]
- WordPress custom dropdown listings
- Two Sections on Woocommerce Catergory Page [closed]
- Help customising admin bar, removing buddypress links from dropdown
- Action on WordPress Install
- WordPress in a Subdirectory
- How to include stylesheet in custom admin using parent_slug
- What is the best way to make a custom page from a plugin?
- Hook save_post_cpt not triggered when custom fields are modified
- javascript file not working in a plugin template file
- How do I know if the user is a customer?
- Search for custom field input of a custom post type in ajax live search
- Custom post type defaults to index.php for archive page
- customize Dokan multi vendor: how can i set every Dokan as child of another dokan?
- How can I display both LTR and RTL language texts on the same page?
- Add button to My Sites dashboard page (multisite)?
- A specific menu inside a page, load different contents without reloading it, under the same link
- How to use custom footer template in a site-plugin?
- Dockerized WordPress is having Nginx Proxy Issues
- Restrict viewing of posts by category, user role
- Link two different post using there post_id in post meta
- Add Categories To Custom Post
- How to define a static Home page
- Remove all link title attributes
- Custom Single Post Type not referring to single-post-type.php File
- JQuery is not defined but jquery script is loaded in source [closed]
- let users add multiple divs in static page
- how to display wordpress navbar with top menu outside wordpress system
- Change the search results header from plugin
- “Current” class on a singular page menu item with custom post types?
- Logged in only custom page
- Make Terms Under Custom Taxonomy Use Specific Single.php Template
- Problem Locating and Changing Alt Attribute Of Link
- URL to an image in a post is changing when permalink is set to custom. Can I avoid this?
- Img alt tag showing different value then entered
- Applying my own css classes in wp_menus 3?