public
Last active

Disable Wptexturize

  • Download Gist
disable-wptexturize.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<?php
/*
Plugin Name: Disable Wptexturize
Description: Removes most calls to this incredible slow function.
Version: 1.0
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
 
foreach ( array (
'bloginfo'
, 'comment_text'
, 'comment_author'
, 'link_name'
, 'link_description'
, 'link_notes'
, 'list_cats'
, 'single_post_title'
, 'single_cat_title'
, 'single_tag_title'
, 'single_month_title'
, 'term_description'
, 'term_name'
, 'the_content'
, 'the_excerpt'
, 'the_title'
, 'nav_menu_attr_title'
, 'nav_menu_description'
, 'widget_title'
, 'wp_title'
) as $target )
{
remove_filter( $target, 'wptexturize' );
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.