Last active
          February 3, 2022 15:49 
        
      - 
      
- 
        Save thefuxia/982554 to your computer and use it in GitHub Desktop. 
    Disable Wptexturize
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?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