[wp-trac] [WordPress Trac] #19550: Please provide option to disable wptexturize entirely
WordPress Trac
noreply at wordpress.org
Wed Jun 27 10:40:37 UTC 2018
#19550: Please provide option to disable wptexturize entirely
-------------------------------------------------+-------------------------
Reporter: jwz | Owner:
| DrewAPicture
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.0
Component: Formatting | Version: 3.3
Severity: minor | Resolution: fixed
Keywords: has-patch wptexturize 4.0-early | Focuses: docs
needs-docs |
-------------------------------------------------+-------------------------
Comment (by pixeline):
Replying to [comment:38 TomasM]:
> Hello, I would like to ask for the usage example. I would like to
disable certain texturized elements, like quotes. What code should I add
to functions.php? Currently I use in parent theme:
>
>
> {{{
> remove_filter('the_content', 'wptexturize');
> remove_filter ('the_excerpt', 'wptexturize');
> remove_filter ('comment_text', 'wptexturize');
> }}}
>
> Also what code could I use in a child theme to enable wptexturize?
>
> Thank you!
To disable entirely the curly replacement throughout your site, simply add
to your functions.php :
{{{#!php
add_filter('run_wptexturize', '__return_false');
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19550#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list