How to remove wptexturize for single pages?
-
Currently, Elementor does this:
protected function parse_text_editor( $content ) {
/** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */
$content = apply_filters( 'widget_text', $content, $this->get_settings() );
$content = shortcode_unautop( $content );
$content = do_shortcode( $content );
$content = wptexturize( $content );
if ( $GLOBALS['wp_embed'] instanceof \WP_Embed ) {
$content = $GLOBALS['wp_embed']->autoembed( $content );
}
return $content;
}Would it be possible to remove the
wptexturize
on a single page along the following lines?add_filter('the_content', 'specific_no_wptexturize', 9);
function specific_no_wptexturize($content) {
if (is_page('slug')) {
remove_filter( 'the_content', 'wptexturize' );
return $content;
} else {
return $content;
}
}(This code remove it for Core, but not for Elemenetor-edited pages.)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.