WordPress.org

Make WordPress Core

Ticket #13971: remove-capital-Wordpress.diff

File remove-capital-Wordpress.diff, 1.8 KB (added by greenshady, 8 years ago)

Patch to deprecate the capital_P_dangit() function and remove the filters on text

  • default-filters.php

     
    8686        add_filter( $filter, 'esc_html'      );
    8787}
    8888
    89 // Format WordPress
    90 foreach ( array( 'the_content', 'the_title', 'comment_text' ) as $filter )
    91         add_filter( $filter, 'capital_P_dangit' );
    92 
    9389// Format titles
    9490foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) {
    9591        add_filter( $filter, 'wptexturize' );
  • deprecated.php

     
    25472547        _deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );
    25482548        return term_exists( $term, $taxonomy, $parent );
    25492549}
     2550
     2551/**
     2552 * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
     2553 *
     2554 * Violating our coding standards for a good function name.
     2555 *
     2556 * @since 3.0.0
     2557 * @deprecated 3.0.1
     2558 */
     2559function capital_P_dangit( $text ) {
     2560        _deprecated_function( __FUNCTION__, '3.0.1' );
     2561        return str_replace( 'Wordpress', 'WordPress', $text );
     2562}
  • formatting.php

     
    28182818        return apply_filters('sanitize_text_field', $filtered, $str);
    28192819}
    28202820
    2821 /**
    2822  * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
    2823  *
    2824  * Violating our coding standards for a good function name.
    2825  *
    2826  * @since 3.0.0
    2827  */
    2828 function capital_P_dangit( $text ) {
    2829        return str_replace( 'Wordpress', 'WordPress', $text );
    2830 }
    2831 
    28322821?>