Ticket #37458: 37458.diff
File 37458.diff, 1.5 KB (added by , 8 years ago) |
---|
-
wp-includes/general-template.php
2814 2814 /** This filter is documented in wp-includes/formatting.php */ 2815 2815 $hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' ); 2816 2816 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 2817 2826 foreach ( $hints as $relation_type => $urls ) { 2818 2827 /** 2819 * Filters domains and URLs for resource hints .2828 * Filters domains and URLs for resource hints of relation type. 2820 2829 * 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 * 2821 2834 * @since 4.6.0 2822 2835 * 2823 2836 * @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. 2825 2838 */ 2826 $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );2839 $urls = apply_filters( "wp_resource_hints_{$relation_type}", $urls, $relation_type ); 2827 2840 2828 2841 foreach ( $urls as $key => $url ) { 2829 2842 $url = esc_url( $url, array( 'http', 'https' ) );