Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu...
File: general-template.php
*
[3000] Fix | Delete
* @param string $the_weekday
[3001] Fix | Delete
*/
[3002] Fix | Delete
echo apply_filters( 'the_weekday', $the_weekday );
[3003] Fix | Delete
}
[3004] Fix | Delete
[3005] Fix | Delete
/**
[3006] Fix | Delete
* Displays the weekday on which the post was written.
[3007] Fix | Delete
*
[3008] Fix | Delete
* Will only output the weekday if the current post's weekday is different from
[3009] Fix | Delete
* the previous one output.
[3010] Fix | Delete
*
[3011] Fix | Delete
* @since 0.71
[3012] Fix | Delete
*
[3013] Fix | Delete
* @global WP_Locale $wp_locale WordPress date and time locale object.
[3014] Fix | Delete
* @global string $currentday The day of the current post in the loop.
[3015] Fix | Delete
* @global string $previousweekday The day of the previous post in the loop.
[3016] Fix | Delete
*
[3017] Fix | Delete
* @param string $before Optional. Output before the date. Default empty.
[3018] Fix | Delete
* @param string $after Optional. Output after the date. Default empty.
[3019] Fix | Delete
*/
[3020] Fix | Delete
function the_weekday_date( $before = '', $after = '' ) {
[3021] Fix | Delete
global $wp_locale, $currentday, $previousweekday;
[3022] Fix | Delete
[3023] Fix | Delete
$post = get_post();
[3024] Fix | Delete
[3025] Fix | Delete
if ( ! $post ) {
[3026] Fix | Delete
return;
[3027] Fix | Delete
}
[3028] Fix | Delete
[3029] Fix | Delete
$the_weekday_date = '';
[3030] Fix | Delete
[3031] Fix | Delete
if ( $currentday !== $previousweekday ) {
[3032] Fix | Delete
$the_weekday_date .= $before;
[3033] Fix | Delete
$the_weekday_date .= $wp_locale->get_weekday( get_post_time( 'w', false, $post ) );
[3034] Fix | Delete
$the_weekday_date .= $after;
[3035] Fix | Delete
$previousweekday = $currentday;
[3036] Fix | Delete
}
[3037] Fix | Delete
[3038] Fix | Delete
/**
[3039] Fix | Delete
* Filters the localized date on which the post was written, for display.
[3040] Fix | Delete
*
[3041] Fix | Delete
* @since 0.71
[3042] Fix | Delete
*
[3043] Fix | Delete
* @param string $the_weekday_date The weekday on which the post was written.
[3044] Fix | Delete
* @param string $before The HTML to output before the date.
[3045] Fix | Delete
* @param string $after The HTML to output after the date.
[3046] Fix | Delete
*/
[3047] Fix | Delete
echo apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
[3048] Fix | Delete
}
[3049] Fix | Delete
[3050] Fix | Delete
/**
[3051] Fix | Delete
* Fires the wp_head action.
[3052] Fix | Delete
*
[3053] Fix | Delete
* See {@see 'wp_head'}.
[3054] Fix | Delete
*
[3055] Fix | Delete
* @since 1.2.0
[3056] Fix | Delete
*/
[3057] Fix | Delete
function wp_head() {
[3058] Fix | Delete
/**
[3059] Fix | Delete
* Prints scripts or data in the head tag on the front end.
[3060] Fix | Delete
*
[3061] Fix | Delete
* @since 1.5.0
[3062] Fix | Delete
*/
[3063] Fix | Delete
do_action( 'wp_head' );
[3064] Fix | Delete
}
[3065] Fix | Delete
[3066] Fix | Delete
/**
[3067] Fix | Delete
* Fires the wp_footer action.
[3068] Fix | Delete
*
[3069] Fix | Delete
* See {@see 'wp_footer'}.
[3070] Fix | Delete
*
[3071] Fix | Delete
* @since 1.5.1
[3072] Fix | Delete
*/
[3073] Fix | Delete
function wp_footer() {
[3074] Fix | Delete
/**
[3075] Fix | Delete
* Prints scripts or data before the closing body tag on the front end.
[3076] Fix | Delete
*
[3077] Fix | Delete
* @since 1.5.1
[3078] Fix | Delete
*/
[3079] Fix | Delete
do_action( 'wp_footer' );
[3080] Fix | Delete
}
[3081] Fix | Delete
[3082] Fix | Delete
/**
[3083] Fix | Delete
* Fires the wp_body_open action.
[3084] Fix | Delete
*
[3085] Fix | Delete
* See {@see 'wp_body_open'}.
[3086] Fix | Delete
*
[3087] Fix | Delete
* @since 5.2.0
[3088] Fix | Delete
*/
[3089] Fix | Delete
function wp_body_open() {
[3090] Fix | Delete
/**
[3091] Fix | Delete
* Triggered after the opening body tag.
[3092] Fix | Delete
*
[3093] Fix | Delete
* @since 5.2.0
[3094] Fix | Delete
*/
[3095] Fix | Delete
do_action( 'wp_body_open' );
[3096] Fix | Delete
}
[3097] Fix | Delete
[3098] Fix | Delete
/**
[3099] Fix | Delete
* Displays the links to the general feeds.
[3100] Fix | Delete
*
[3101] Fix | Delete
* @since 2.8.0
[3102] Fix | Delete
*
[3103] Fix | Delete
* @param array $args Optional arguments.
[3104] Fix | Delete
*/
[3105] Fix | Delete
function feed_links( $args = array() ) {
[3106] Fix | Delete
if ( ! current_theme_supports( 'automatic-feed-links' ) ) {
[3107] Fix | Delete
return;
[3108] Fix | Delete
}
[3109] Fix | Delete
[3110] Fix | Delete
$defaults = array(
[3111] Fix | Delete
/* translators: Separator between site name and feed type in feed links. */
[3112] Fix | Delete
'separator' => _x( '»', 'feed link' ),
[3113] Fix | Delete
/* translators: 1: Site title, 2: Separator (raquo). */
[3114] Fix | Delete
'feedtitle' => __( '%1$s %2$s Feed' ),
[3115] Fix | Delete
/* translators: 1: Site title, 2: Separator (raquo). */
[3116] Fix | Delete
'comstitle' => __( '%1$s %2$s Comments Feed' ),
[3117] Fix | Delete
);
[3118] Fix | Delete
[3119] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[3120] Fix | Delete
[3121] Fix | Delete
/**
[3122] Fix | Delete
* Filters whether to display the posts feed link.
[3123] Fix | Delete
*
[3124] Fix | Delete
* @since 4.4.0
[3125] Fix | Delete
*
[3126] Fix | Delete
* @param bool $show Whether to display the posts feed link. Default true.
[3127] Fix | Delete
*/
[3128] Fix | Delete
if ( apply_filters( 'feed_links_show_posts_feed', true ) ) {
[3129] Fix | Delete
printf(
[3130] Fix | Delete
'<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n",
[3131] Fix | Delete
feed_content_type(),
[3132] Fix | Delete
esc_attr( sprintf( $args['feedtitle'], get_bloginfo( 'name' ), $args['separator'] ) ),
[3133] Fix | Delete
esc_url( get_feed_link() )
[3134] Fix | Delete
);
[3135] Fix | Delete
}
[3136] Fix | Delete
[3137] Fix | Delete
/**
[3138] Fix | Delete
* Filters whether to display the comments feed link.
[3139] Fix | Delete
*
[3140] Fix | Delete
* @since 4.4.0
[3141] Fix | Delete
*
[3142] Fix | Delete
* @param bool $show Whether to display the comments feed link. Default true.
[3143] Fix | Delete
*/
[3144] Fix | Delete
if ( apply_filters( 'feed_links_show_comments_feed', true ) ) {
[3145] Fix | Delete
printf(
[3146] Fix | Delete
'<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n",
[3147] Fix | Delete
feed_content_type(),
[3148] Fix | Delete
esc_attr( sprintf( $args['comstitle'], get_bloginfo( 'name' ), $args['separator'] ) ),
[3149] Fix | Delete
esc_url( get_feed_link( 'comments_' . get_default_feed() ) )
[3150] Fix | Delete
);
[3151] Fix | Delete
}
[3152] Fix | Delete
}
[3153] Fix | Delete
[3154] Fix | Delete
/**
[3155] Fix | Delete
* Displays the links to the extra feeds such as category feeds.
[3156] Fix | Delete
*
[3157] Fix | Delete
* @since 2.8.0
[3158] Fix | Delete
*
[3159] Fix | Delete
* @param array $args Optional arguments.
[3160] Fix | Delete
*/
[3161] Fix | Delete
function feed_links_extra( $args = array() ) {
[3162] Fix | Delete
$defaults = array(
[3163] Fix | Delete
/* translators: Separator between site name and feed type in feed links. */
[3164] Fix | Delete
'separator' => _x( '&raquo;', 'feed link' ),
[3165] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Post title. */
[3166] Fix | Delete
'singletitle' => __( '%1$s %2$s %3$s Comments Feed' ),
[3167] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Category name. */
[3168] Fix | Delete
'cattitle' => __( '%1$s %2$s %3$s Category Feed' ),
[3169] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Tag name. */
[3170] Fix | Delete
'tagtitle' => __( '%1$s %2$s %3$s Tag Feed' ),
[3171] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Term name, 4: Taxonomy singular name. */
[3172] Fix | Delete
'taxtitle' => __( '%1$s %2$s %3$s %4$s Feed' ),
[3173] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Author name. */
[3174] Fix | Delete
'authortitle' => __( '%1$s %2$s Posts by %3$s Feed' ),
[3175] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Search query. */
[3176] Fix | Delete
'searchtitle' => __( '%1$s %2$s Search Results for &#8220;%3$s&#8221; Feed' ),
[3177] Fix | Delete
/* translators: 1: Site name, 2: Separator (raquo), 3: Post type name. */
[3178] Fix | Delete
'posttypetitle' => __( '%1$s %2$s %3$s Feed' ),
[3179] Fix | Delete
);
[3180] Fix | Delete
[3181] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[3182] Fix | Delete
[3183] Fix | Delete
if ( is_singular() ) {
[3184] Fix | Delete
$id = 0;
[3185] Fix | Delete
$post = get_post( $id );
[3186] Fix | Delete
[3187] Fix | Delete
/** This filter is documented in wp-includes/general-template.php */
[3188] Fix | Delete
$show_comments_feed = apply_filters( 'feed_links_show_comments_feed', true );
[3189] Fix | Delete
[3190] Fix | Delete
/**
[3191] Fix | Delete
* Filters whether to display the post comments feed link.
[3192] Fix | Delete
*
[3193] Fix | Delete
* This filter allows to enable or disable the feed link for a singular post
[3194] Fix | Delete
* in a way that is independent of {@see 'feed_links_show_comments_feed'}
[3195] Fix | Delete
* (which controls the global comments feed). The result of that filter
[3196] Fix | Delete
* is accepted as a parameter.
[3197] Fix | Delete
*
[3198] Fix | Delete
* @since 6.1.0
[3199] Fix | Delete
*
[3200] Fix | Delete
* @param bool $show_comments_feed Whether to display the post comments feed link. Defaults to
[3201] Fix | Delete
* the {@see 'feed_links_show_comments_feed'} filter result.
[3202] Fix | Delete
*/
[3203] Fix | Delete
$show_post_comments_feed = apply_filters( 'feed_links_extra_show_post_comments_feed', $show_comments_feed );
[3204] Fix | Delete
[3205] Fix | Delete
if ( $show_post_comments_feed && ( comments_open() || pings_open() || $post->comment_count > 0 ) ) {
[3206] Fix | Delete
$title = sprintf(
[3207] Fix | Delete
$args['singletitle'],
[3208] Fix | Delete
get_bloginfo( 'name' ),
[3209] Fix | Delete
$args['separator'],
[3210] Fix | Delete
the_title_attribute( array( 'echo' => false ) )
[3211] Fix | Delete
);
[3212] Fix | Delete
[3213] Fix | Delete
$feed_link = get_post_comments_feed_link( $post->ID );
[3214] Fix | Delete
[3215] Fix | Delete
if ( $feed_link ) {
[3216] Fix | Delete
$href = $feed_link;
[3217] Fix | Delete
}
[3218] Fix | Delete
}
[3219] Fix | Delete
} elseif ( is_post_type_archive() ) {
[3220] Fix | Delete
/**
[3221] Fix | Delete
* Filters whether to display the post type archive feed link.
[3222] Fix | Delete
*
[3223] Fix | Delete
* @since 6.1.0
[3224] Fix | Delete
*
[3225] Fix | Delete
* @param bool $show Whether to display the post type archive feed link. Default true.
[3226] Fix | Delete
*/
[3227] Fix | Delete
$show_post_type_archive_feed = apply_filters( 'feed_links_extra_show_post_type_archive_feed', true );
[3228] Fix | Delete
[3229] Fix | Delete
if ( $show_post_type_archive_feed ) {
[3230] Fix | Delete
$post_type = get_query_var( 'post_type' );
[3231] Fix | Delete
[3232] Fix | Delete
if ( is_array( $post_type ) ) {
[3233] Fix | Delete
$post_type = reset( $post_type );
[3234] Fix | Delete
}
[3235] Fix | Delete
[3236] Fix | Delete
$post_type_obj = get_post_type_object( $post_type );
[3237] Fix | Delete
[3238] Fix | Delete
$title = sprintf(
[3239] Fix | Delete
$args['posttypetitle'],
[3240] Fix | Delete
get_bloginfo( 'name' ),
[3241] Fix | Delete
$args['separator'],
[3242] Fix | Delete
$post_type_obj->labels->name
[3243] Fix | Delete
);
[3244] Fix | Delete
[3245] Fix | Delete
$href = get_post_type_archive_feed_link( $post_type_obj->name );
[3246] Fix | Delete
}
[3247] Fix | Delete
} elseif ( is_category() ) {
[3248] Fix | Delete
/**
[3249] Fix | Delete
* Filters whether to display the category feed link.
[3250] Fix | Delete
*
[3251] Fix | Delete
* @since 6.1.0
[3252] Fix | Delete
*
[3253] Fix | Delete
* @param bool $show Whether to display the category feed link. Default true.
[3254] Fix | Delete
*/
[3255] Fix | Delete
$show_category_feed = apply_filters( 'feed_links_extra_show_category_feed', true );
[3256] Fix | Delete
[3257] Fix | Delete
if ( $show_category_feed ) {
[3258] Fix | Delete
$term = get_queried_object();
[3259] Fix | Delete
[3260] Fix | Delete
if ( $term ) {
[3261] Fix | Delete
$title = sprintf(
[3262] Fix | Delete
$args['cattitle'],
[3263] Fix | Delete
get_bloginfo( 'name' ),
[3264] Fix | Delete
$args['separator'],
[3265] Fix | Delete
$term->name
[3266] Fix | Delete
);
[3267] Fix | Delete
[3268] Fix | Delete
$href = get_category_feed_link( $term->term_id );
[3269] Fix | Delete
}
[3270] Fix | Delete
}
[3271] Fix | Delete
} elseif ( is_tag() ) {
[3272] Fix | Delete
/**
[3273] Fix | Delete
* Filters whether to display the tag feed link.
[3274] Fix | Delete
*
[3275] Fix | Delete
* @since 6.1.0
[3276] Fix | Delete
*
[3277] Fix | Delete
* @param bool $show Whether to display the tag feed link. Default true.
[3278] Fix | Delete
*/
[3279] Fix | Delete
$show_tag_feed = apply_filters( 'feed_links_extra_show_tag_feed', true );
[3280] Fix | Delete
[3281] Fix | Delete
if ( $show_tag_feed ) {
[3282] Fix | Delete
$term = get_queried_object();
[3283] Fix | Delete
[3284] Fix | Delete
if ( $term ) {
[3285] Fix | Delete
$title = sprintf(
[3286] Fix | Delete
$args['tagtitle'],
[3287] Fix | Delete
get_bloginfo( 'name' ),
[3288] Fix | Delete
$args['separator'],
[3289] Fix | Delete
$term->name
[3290] Fix | Delete
);
[3291] Fix | Delete
[3292] Fix | Delete
$href = get_tag_feed_link( $term->term_id );
[3293] Fix | Delete
}
[3294] Fix | Delete
}
[3295] Fix | Delete
} elseif ( is_tax() ) {
[3296] Fix | Delete
/**
[3297] Fix | Delete
* Filters whether to display the custom taxonomy feed link.
[3298] Fix | Delete
*
[3299] Fix | Delete
* @since 6.1.0
[3300] Fix | Delete
*
[3301] Fix | Delete
* @param bool $show Whether to display the custom taxonomy feed link. Default true.
[3302] Fix | Delete
*/
[3303] Fix | Delete
$show_tax_feed = apply_filters( 'feed_links_extra_show_tax_feed', true );
[3304] Fix | Delete
[3305] Fix | Delete
if ( $show_tax_feed ) {
[3306] Fix | Delete
$term = get_queried_object();
[3307] Fix | Delete
[3308] Fix | Delete
if ( $term ) {
[3309] Fix | Delete
$tax = get_taxonomy( $term->taxonomy );
[3310] Fix | Delete
[3311] Fix | Delete
$title = sprintf(
[3312] Fix | Delete
$args['taxtitle'],
[3313] Fix | Delete
get_bloginfo( 'name' ),
[3314] Fix | Delete
$args['separator'],
[3315] Fix | Delete
$term->name,
[3316] Fix | Delete
$tax->labels->singular_name
[3317] Fix | Delete
);
[3318] Fix | Delete
[3319] Fix | Delete
$href = get_term_feed_link( $term->term_id, $term->taxonomy );
[3320] Fix | Delete
}
[3321] Fix | Delete
}
[3322] Fix | Delete
} elseif ( is_author() ) {
[3323] Fix | Delete
/**
[3324] Fix | Delete
* Filters whether to display the author feed link.
[3325] Fix | Delete
*
[3326] Fix | Delete
* @since 6.1.0
[3327] Fix | Delete
*
[3328] Fix | Delete
* @param bool $show Whether to display the author feed link. Default true.
[3329] Fix | Delete
*/
[3330] Fix | Delete
$show_author_feed = apply_filters( 'feed_links_extra_show_author_feed', true );
[3331] Fix | Delete
[3332] Fix | Delete
if ( $show_author_feed ) {
[3333] Fix | Delete
$author_id = (int) get_query_var( 'author' );
[3334] Fix | Delete
[3335] Fix | Delete
$title = sprintf(
[3336] Fix | Delete
$args['authortitle'],
[3337] Fix | Delete
get_bloginfo( 'name' ),
[3338] Fix | Delete
$args['separator'],
[3339] Fix | Delete
get_the_author_meta( 'display_name', $author_id )
[3340] Fix | Delete
);
[3341] Fix | Delete
[3342] Fix | Delete
$href = get_author_feed_link( $author_id );
[3343] Fix | Delete
}
[3344] Fix | Delete
} elseif ( is_search() ) {
[3345] Fix | Delete
/**
[3346] Fix | Delete
* Filters whether to display the search results feed link.
[3347] Fix | Delete
*
[3348] Fix | Delete
* @since 6.1.0
[3349] Fix | Delete
*
[3350] Fix | Delete
* @param bool $show Whether to display the search results feed link. Default true.
[3351] Fix | Delete
*/
[3352] Fix | Delete
$show_search_feed = apply_filters( 'feed_links_extra_show_search_feed', true );
[3353] Fix | Delete
[3354] Fix | Delete
if ( $show_search_feed ) {
[3355] Fix | Delete
$title = sprintf(
[3356] Fix | Delete
$args['searchtitle'],
[3357] Fix | Delete
get_bloginfo( 'name' ),
[3358] Fix | Delete
$args['separator'],
[3359] Fix | Delete
get_search_query( false )
[3360] Fix | Delete
);
[3361] Fix | Delete
[3362] Fix | Delete
$href = get_search_feed_link();
[3363] Fix | Delete
}
[3364] Fix | Delete
}
[3365] Fix | Delete
[3366] Fix | Delete
if ( isset( $title ) && isset( $href ) ) {
[3367] Fix | Delete
printf(
[3368] Fix | Delete
'<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n",
[3369] Fix | Delete
feed_content_type(),
[3370] Fix | Delete
esc_attr( $title ),
[3371] Fix | Delete
esc_url( $href )
[3372] Fix | Delete
);
[3373] Fix | Delete
}
[3374] Fix | Delete
}
[3375] Fix | Delete
[3376] Fix | Delete
/**
[3377] Fix | Delete
* Displays the link to the Really Simple Discovery service endpoint.
[3378] Fix | Delete
*
[3379] Fix | Delete
* @link http://archipelago.phrasewise.com/rsd
[3380] Fix | Delete
* @since 2.0.0
[3381] Fix | Delete
*/
[3382] Fix | Delete
function rsd_link() {
[3383] Fix | Delete
printf(
[3384] Fix | Delete
'<link rel="EditURI" type="application/rsd+xml" title="RSD" href="%s" />' . "\n",
[3385] Fix | Delete
esc_url( site_url( 'xmlrpc.php?rsd', 'rpc' ) )
[3386] Fix | Delete
);
[3387] Fix | Delete
}
[3388] Fix | Delete
[3389] Fix | Delete
/**
[3390] Fix | Delete
* Displays a referrer `strict-origin-when-cross-origin` meta tag.
[3391] Fix | Delete
*
[3392] Fix | Delete
* Outputs a referrer `strict-origin-when-cross-origin` meta tag that tells the browser not to send
[3393] Fix | Delete
* the full URL as a referrer to other sites when cross-origin assets are loaded.
[3394] Fix | Delete
*
[3395] Fix | Delete
* Typical usage is as a {@see 'wp_head'} callback:
[3396] Fix | Delete
*
[3397] Fix | Delete
* add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
[3398] Fix | Delete
*
[3399] Fix | Delete
* @since 5.7.0
[3400] Fix | Delete
*/
[3401] Fix | Delete
function wp_strict_cross_origin_referrer() {
[3402] Fix | Delete
?>
[3403] Fix | Delete
<meta name='referrer' content='strict-origin-when-cross-origin' />
[3404] Fix | Delete
<?php
[3405] Fix | Delete
}
[3406] Fix | Delete
[3407] Fix | Delete
/**
[3408] Fix | Delete
* Displays site icon meta tags.
[3409] Fix | Delete
*
[3410] Fix | Delete
* @since 4.3.0
[3411] Fix | Delete
*
[3412] Fix | Delete
* @link https://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon HTML5 specification link icon.
[3413] Fix | Delete
*/
[3414] Fix | Delete
function wp_site_icon() {
[3415] Fix | Delete
if ( ! has_site_icon() && ! is_customize_preview() ) {
[3416] Fix | Delete
return;
[3417] Fix | Delete
}
[3418] Fix | Delete
[3419] Fix | Delete
$meta_tags = array();
[3420] Fix | Delete
$icon_32 = get_site_icon_url( 32 );
[3421] Fix | Delete
if ( empty( $icon_32 ) && is_customize_preview() ) {
[3422] Fix | Delete
$icon_32 = '/favicon.ico'; // Serve default favicon URL in customizer so element can be updated for preview.
[3423] Fix | Delete
}
[3424] Fix | Delete
if ( $icon_32 ) {
[3425] Fix | Delete
$meta_tags[] = sprintf( '<link rel="icon" href="%s" sizes="32x32" />', esc_url( $icon_32 ) );
[3426] Fix | Delete
}
[3427] Fix | Delete
$icon_192 = get_site_icon_url( 192 );
[3428] Fix | Delete
if ( $icon_192 ) {
[3429] Fix | Delete
$meta_tags[] = sprintf( '<link rel="icon" href="%s" sizes="192x192" />', esc_url( $icon_192 ) );
[3430] Fix | Delete
}
[3431] Fix | Delete
$icon_180 = get_site_icon_url( 180 );
[3432] Fix | Delete
if ( $icon_180 ) {
[3433] Fix | Delete
$meta_tags[] = sprintf( '<link rel="apple-touch-icon" href="%s" />', esc_url( $icon_180 ) );
[3434] Fix | Delete
}
[3435] Fix | Delete
$icon_270 = get_site_icon_url( 270 );
[3436] Fix | Delete
if ( $icon_270 ) {
[3437] Fix | Delete
$meta_tags[] = sprintf( '<meta name="msapplication-TileImage" content="%s" />', esc_url( $icon_270 ) );
[3438] Fix | Delete
}
[3439] Fix | Delete
[3440] Fix | Delete
/**
[3441] Fix | Delete
* Filters the site icon meta tags, so plugins can add their own.
[3442] Fix | Delete
*
[3443] Fix | Delete
* @since 4.3.0
[3444] Fix | Delete
*
[3445] Fix | Delete
* @param string[] $meta_tags Array of Site Icon meta tags.
[3446] Fix | Delete
*/
[3447] Fix | Delete
$meta_tags = apply_filters( 'site_icon_meta_tags', $meta_tags );
[3448] Fix | Delete
$meta_tags = array_filter( $meta_tags );
[3449] Fix | Delete
[3450] Fix | Delete
foreach ( $meta_tags as $meta_tag ) {
[3451] Fix | Delete
echo "$meta_tag\n";
[3452] Fix | Delete
}
[3453] Fix | Delete
}
[3454] Fix | Delete
[3455] Fix | Delete
/**
[3456] Fix | Delete
* Prints resource hints to browsers for pre-fetching, pre-rendering
[3457] Fix | Delete
* and pre-connecting to websites.
[3458] Fix | Delete
*
[3459] Fix | Delete
* Gives hints to browsers to prefetch specific pages or render them
[3460] Fix | Delete
* in the background, to perform DNS lookups or to begin the connection
[3461] Fix | Delete
* handshake (DNS, TCP, TLS) in the background.
[3462] Fix | Delete
*
[3463] Fix | Delete
* These performance improving indicators work by using `<link rel"…">`.
[3464] Fix | Delete
*
[3465] Fix | Delete
* @since 4.6.0
[3466] Fix | Delete
*/
[3467] Fix | Delete
function wp_resource_hints() {
[3468] Fix | Delete
$hints = array(
[3469] Fix | Delete
'dns-prefetch' => wp_dependencies_unique_hosts(),
[3470] Fix | Delete
'preconnect' => array(),
[3471] Fix | Delete
'prefetch' => array(),
[3472] Fix | Delete
'prerender' => array(),
[3473] Fix | Delete
);
[3474] Fix | Delete
[3475] Fix | Delete
foreach ( $hints as $relation_type => $urls ) {
[3476] Fix | Delete
$unique_urls = array();
[3477] Fix | Delete
[3478] Fix | Delete
/**
[3479] Fix | Delete
* Filters domains and URLs for resource hints of the given relation type.
[3480] Fix | Delete
*
[3481] Fix | Delete
* @since 4.6.0
[3482] Fix | Delete
* @since 4.7.0 The `$urls` parameter accepts arrays of specific HTML attributes
[3483] Fix | Delete
* as its child elements.
[3484] Fix | Delete
*
[3485] Fix | Delete
* @param array $urls {
[3486] Fix | Delete
* Array of resources and their attributes, or URLs to print for resource hints.
[3487] Fix | Delete
*
[3488] Fix | Delete
* @type array|string ...$0 {
[3489] Fix | Delete
* Array of resource attributes, or a URL string.
[3490] Fix | Delete
*
[3491] Fix | Delete
* @type string $href URL to include in resource hints. Required.
[3492] Fix | Delete
* @type string $as How the browser should treat the resource
[3493] Fix | Delete
* (`script`, `style`, `image`, `document`, etc).
[3494] Fix | Delete
* @type string $crossorigin Indicates the CORS policy of the specified resource.
[3495] Fix | Delete
* @type float $pr Expected probability that the resource hint will be used.
[3496] Fix | Delete
* @type string $type Type of the resource (`text/html`, `text/css`, etc).
[3497] Fix | Delete
* }
[3498] Fix | Delete
* }
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function