WordPress.org

Make WordPress Core

Ticket #30797: get_parent_stylesheet_uri.patch

File get_parent_stylesheet_uri.patch, 1.1 KB (added by grapplerulrich, 5 years ago)

get_parent_stylesheet_uri patch

  • trunk/src/wp-includes/theme.php

     
    334334}
    335335
    336336/**
     337 * Retrieve URI of current parent theme stylesheet.
     338 *
     339 * The stylesheet file name is 'style.css' which is appended to {@link
     340 * get_template_directory_uri() stylesheet directory URI} path.
     341 *
     342 * @since 4.2.0
     343 *
     344 * @return string
     345 */
     346function get_parent_stylesheet_uri() {
     347        $template_dir_uri      = get_template_directory_uri();
     348        $parent_stylesheet_uri = $stylesheet_dir_uri . '/style.css';
     349        /**
     350         * Filter the URI of the current parent theme stylesheet.
     351         *
     352         * @since 4.2.0
     353         *
     354         * @param string $parent_stylesheet_uri Stylesheet URI for the current parent theme.
     355         * @param string $template_dir_uri      Stylesheet directory URI for the current parent theme.
     356         */
     357        return apply_filters( 'parent_stylesheet_uri', $parent_stylesheet_uri, $template_dir_uri );
     358}
     359
     360/**
    337361 * Retrieve theme roots.
    338362 *
    339363 * @since 2.9.0