WordPress.org

Make WordPress Core

Ticket #28662: theme_root_uri.patch

File theme_root_uri.patch, 1.0 KB (added by tivnet, 6 years ago)
  • wp/wp-includes/theme.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    189189function get_stylesheet_directory_uri() {
    190190        $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
    191191        $theme_root_uri = get_theme_root_uri( $stylesheet );
    192         $stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
     192        $stylesheet_dir_uri = trailingslashit( $theme_root_uri ) . $stylesheet;
    193193
    194194        /**
    195195         * Filter the stylesheet directory URI.
     
    320320function get_template_directory_uri() {
    321321        $template = str_replace( '%2F', '/', rawurlencode( get_template() ) );
    322322        $theme_root_uri = get_theme_root_uri( $template );
    323         $template_dir_uri = "$theme_root_uri/$template";
     323        $template_dir_uri = trailingslashit( $theme_root_uri ) . $template;
    324324
    325325        /**
    326326         * Filter the current theme directory URI.