Make WordPress Core

Ticket #37458: 37458.diff

File 37458.diff, 1.5 KB (added by dimadin, 8 years ago)
  • wp-includes/general-template.php

     
    28142814        /** This filter is documented in wp-includes/formatting.php */
    28152815        $hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );
    28162816
     2817        /**
     2818         * Filters domains and URLs for resource hints.
     2819         *
     2820         * @since 4.6.0
     2821         *
     2822         * @param array $hints An array of relation types URLs to print for resource hints.
     2823         */
     2824        $hints = apply_filters( 'wp_resource_hints', $hints );
     2825
    28172826        foreach ( $hints as $relation_type => $urls ) {
    28182827                /**
    2819                  * Filters domains and URLs for resource hints.
     2828                 * Filters domains and URLs for resource hints of relation type.
    28202829                 *
     2830                 * The dynamic portion of the hook name, `$relation_type`, refers to the
     2831                 * relation type the URLs are printed for. Can be 'dns-prefetch', 'preconnect',
     2832                 * 'prefetch', or 'prerender'.
     2833                 *
    28212834                 * @since 4.6.0
    28222835                 *
    28232836                 * @param array  $urls          URLs to print for resource hints.
    2824                  * @param string $relation_type The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'.
     2837                 * @param string $relation_type The relation type the URLs are printed for.
    28252838                 */
    2826                 $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
     2839                $urls = apply_filters( "wp_resource_hints_{$relation_type}", $urls, $relation_type );
    28272840
    28282841                foreach ( $urls as $key => $url ) {
    28292842                        $url = esc_url( $url, array( 'http', 'https' ) );