WordPress.org

Make WordPress Core

Ticket #6697: bug6697.4.patch

File bug6697.4.patch, 972 bytes (added by wokamoto, 7 years ago)
  • wp-includes/default-filters.php

    old new  
    270270add_action( 'admin_init', 'register_admin_color_schemes', 1);
    271271add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
    272272
     273// Permalink
     274function percent_encode_capital_letter($uri) {
     275        static $toupper;
     276        if (!isset($toupper))
     277                $toupper = create_function('$m', 'return strtoupper($m[0]);');
     278        $uri = preg_replace_callback('/(%[0-9a-f]{2}?)+/', $toupper, $uri);
     279        return $uri;
     280}
     281add_filter('post_link', 'percent_encode_capital_letter');
     282add_filter('page_link', 'percent_encode_capital_letter');
     283add_filter('tag_link', 'percent_encode_capital_letter');
     284add_filter('category_link', 'percent_encode_capital_letter');
     285add_filter('preview_post_link', 'percent_encode_capital_letter');
     286add_filter('get_the_guid', 'percent_encode_capital_letter');
     287
    273288unset($filter, $action);
    274289
    275290?>