Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save payingattention/6044336 to your computer and use it in GitHub Desktop.
Save payingattention/6044336 to your computer and use it in GitHub Desktop.
<?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' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment