WordPress.org

Make WordPress Core

Ticket #14348: 14348-3.diff

File 14348-3.diff, 1.3 KB (added by technosailor, 7 years ago)

Refreshed diff with docs

  • wp-includes/default-filters.php

     
    174174// Misc filters
    175175add_filter( 'option_ping_sites',    'privacy_ping_filter'                 );
    176176add_filter( 'option_blog_charset',  '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
     177add_filter( 'template_include', 'httphead'                                                         );
    177178add_filter( 'option_home',          '_config_wp_home'                     );
    178179add_filter( 'option_siteurl',       '_config_wp_siteurl'                  );
    179180add_filter( 'tiny_mce_before_init', '_mce_set_direction'                  );
  • wp-includes/functions.php

     
    33123312}
    33133313
    33143314/**
     3315 * Eliminates output for HEAD requests
     3316 *
     3317 * @since 3.2.0
     3318 *
     3319 * @param string $template Template output
     3320 * @return false or string Template output
     3321 */
     3322function httphead( $template )
     3323{
     3324        if( $_SERVER['REQUEST_METHOD'] == 'HEAD' )
     3325                return false;
     3326               
     3327        return $template;
     3328}
     3329
     3330/**
    33153331 * Converts value to nonnegative integer.
    33163332 *
    33173333 * @since 2.5.0