Make WordPress Core

Ticket #18952: 18952.2.patch

File 18952.2.patch, 1.5 KB (added by SergeyBiryukov, 14 years ago)
  • wp-includes/default-filters.php

     
    180180add_filter( 'option_blog_charset',      '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
    181181add_filter( 'option_home',              '_config_wp_home'                     );
    182182add_filter( 'option_siteurl',           '_config_wp_siteurl'                  );
     183add_filter( 'admin_url',                '_strip_domain_for_ajax'              );
    183184add_filter( 'tiny_mce_before_init',     '_mce_set_direction'                  );
    184185add_filter( 'pre_kses',                 'wp_pre_kses_less_than'               );
    185186add_filter( 'sanitize_title',           'sanitize_title_with_dashes',   10, 3 );
  • wp-includes/link-template.php

     
    23752375        }
    23762376}
    23772377
     2378/**
     2379 * Make AJAX requests relative for proper work with IDN domains.
     2380 *
     2381 * @since 3.4.0
     2382 * @access private
     2383 *
     2384 * @param string $url Admin URL to strip the domain from.
     2385 * @return string Relative admin URL link.
     2386*/
     2387function _strip_domain_for_ajax( $url ) {
     2388        if ( false !== strpos( $url, 'admin-ajax.php' ) )
     2389                $url = preg_replace( '#^http(s)?://[^/]*#', '', $url );
     2390
     2391        return $url;
     2392}
     2393
    23782394?>