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
* @type string $redirect URL to redirect to. Must be absolute, as in "https://example.com/mypage/".
[500] Fix | Delete
* Default is to redirect back to the request URI.
[501] Fix | Delete
* @type string $form_id ID attribute value for the form. Default 'loginform'.
[502] Fix | Delete
* @type string $label_username Label for the username or email address field. Default 'Username or Email Address'.
[503] Fix | Delete
* @type string $label_password Label for the password field. Default 'Password'.
[504] Fix | Delete
* @type string $label_remember Label for the remember field. Default 'Remember Me'.
[505] Fix | Delete
* @type string $label_log_in Label for the submit button. Default 'Log In'.
[506] Fix | Delete
* @type string $id_username ID attribute value for the username field. Default 'user_login'.
[507] Fix | Delete
* @type string $id_password ID attribute value for the password field. Default 'user_pass'.
[508] Fix | Delete
* @type string $id_remember ID attribute value for the remember field. Default 'rememberme'.
[509] Fix | Delete
* @type string $id_submit ID attribute value for the submit button. Default 'wp-submit'.
[510] Fix | Delete
* @type bool $remember Whether to display the "rememberme" checkbox in the form.
[511] Fix | Delete
* @type string $value_username Default value for the username field. Default empty.
[512] Fix | Delete
* @type bool $value_remember Whether the "Remember Me" checkbox should be checked by default.
[513] Fix | Delete
* Default false (unchecked).
[514] Fix | Delete
* @type bool $required_username Whether the username field has the 'required' attribute.
[515] Fix | Delete
* Default false.
[516] Fix | Delete
* @type bool $required_password Whether the password field has the 'required' attribute.
[517] Fix | Delete
* Default false.
[518] Fix | Delete
*
[519] Fix | Delete
* }
[520] Fix | Delete
* @return void|string Void if 'echo' argument is true, login form HTML if 'echo' is false.
[521] Fix | Delete
*/
[522] Fix | Delete
function wp_login_form( $args = array() ) {
[523] Fix | Delete
$defaults = array(
[524] Fix | Delete
'echo' => true,
[525] Fix | Delete
// Default 'redirect' value takes the user back to the request URI.
[526] Fix | Delete
'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
[527] Fix | Delete
'form_id' => 'loginform',
[528] Fix | Delete
'label_username' => __( 'Username or Email Address' ),
[529] Fix | Delete
'label_password' => __( 'Password' ),
[530] Fix | Delete
'label_remember' => __( 'Remember Me' ),
[531] Fix | Delete
'label_log_in' => __( 'Log In' ),
[532] Fix | Delete
'id_username' => 'user_login',
[533] Fix | Delete
'id_password' => 'user_pass',
[534] Fix | Delete
'id_remember' => 'rememberme',
[535] Fix | Delete
'id_submit' => 'wp-submit',
[536] Fix | Delete
'remember' => true,
[537] Fix | Delete
'value_username' => '',
[538] Fix | Delete
// Set 'value_remember' to true to default the "Remember me" checkbox to checked.
[539] Fix | Delete
'value_remember' => false,
[540] Fix | Delete
// Set 'required_username' to true to add the required attribute to username field.
[541] Fix | Delete
'required_username' => false,
[542] Fix | Delete
// Set 'required_password' to true to add the required attribute to password field.
[543] Fix | Delete
'required_password' => false,
[544] Fix | Delete
);
[545] Fix | Delete
[546] Fix | Delete
/**
[547] Fix | Delete
* Filters the default login form output arguments.
[548] Fix | Delete
*
[549] Fix | Delete
* @since 3.0.0
[550] Fix | Delete
*
[551] Fix | Delete
* @see wp_login_form()
[552] Fix | Delete
*
[553] Fix | Delete
* @param array $defaults An array of default login form arguments.
[554] Fix | Delete
*/
[555] Fix | Delete
$args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
[556] Fix | Delete
[557] Fix | Delete
/**
[558] Fix | Delete
* Filters content to display at the top of the login form.
[559] Fix | Delete
*
[560] Fix | Delete
* The filter evaluates just following the opening form tag element.
[561] Fix | Delete
*
[562] Fix | Delete
* @since 3.0.0
[563] Fix | Delete
*
[564] Fix | Delete
* @param string $content Content to display. Default empty.
[565] Fix | Delete
* @param array $args Array of login form arguments.
[566] Fix | Delete
*/
[567] Fix | Delete
$login_form_top = apply_filters( 'login_form_top', '', $args );
[568] Fix | Delete
[569] Fix | Delete
/**
[570] Fix | Delete
* Filters content to display in the middle of the login form.
[571] Fix | Delete
*
[572] Fix | Delete
* The filter evaluates just following the location where the 'login-password'
[573] Fix | Delete
* field is displayed.
[574] Fix | Delete
*
[575] Fix | Delete
* @since 3.0.0
[576] Fix | Delete
*
[577] Fix | Delete
* @param string $content Content to display. Default empty.
[578] Fix | Delete
* @param array $args Array of login form arguments.
[579] Fix | Delete
*/
[580] Fix | Delete
$login_form_middle = apply_filters( 'login_form_middle', '', $args );
[581] Fix | Delete
[582] Fix | Delete
/**
[583] Fix | Delete
* Filters content to display at the bottom of the login form.
[584] Fix | Delete
*
[585] Fix | Delete
* The filter evaluates just preceding the closing form tag element.
[586] Fix | Delete
*
[587] Fix | Delete
* @since 3.0.0
[588] Fix | Delete
*
[589] Fix | Delete
* @param string $content Content to display. Default empty.
[590] Fix | Delete
* @param array $args Array of login form arguments.
[591] Fix | Delete
*/
[592] Fix | Delete
$login_form_bottom = apply_filters( 'login_form_bottom', '', $args );
[593] Fix | Delete
[594] Fix | Delete
$form =
[595] Fix | Delete
sprintf(
[596] Fix | Delete
'<form name="%1$s" id="%1$s" action="%2$s" method="post">',
[597] Fix | Delete
esc_attr( $args['form_id'] ),
[598] Fix | Delete
esc_url( site_url( 'wp-login.php', 'login_post' ) )
[599] Fix | Delete
) .
[600] Fix | Delete
$login_form_top .
[601] Fix | Delete
sprintf(
[602] Fix | Delete
'<p class="login-username">
[603] Fix | Delete
<label for="%1$s">%2$s</label>
[604] Fix | Delete
<input type="text" name="log" id="%1$s" autocomplete="username" class="input" value="%3$s" size="20"%4$s />
[605] Fix | Delete
</p>',
[606] Fix | Delete
esc_attr( $args['id_username'] ),
[607] Fix | Delete
esc_html( $args['label_username'] ),
[608] Fix | Delete
esc_attr( $args['value_username'] ),
[609] Fix | Delete
( $args['required_username'] ? ' required="required"' : '' )
[610] Fix | Delete
) .
[611] Fix | Delete
sprintf(
[612] Fix | Delete
'<p class="login-password">
[613] Fix | Delete
<label for="%1$s">%2$s</label>
[614] Fix | Delete
<input type="password" name="pwd" id="%1$s" autocomplete="current-password" spellcheck="false" class="input" value="" size="20"%3$s />
[615] Fix | Delete
</p>',
[616] Fix | Delete
esc_attr( $args['id_password'] ),
[617] Fix | Delete
esc_html( $args['label_password'] ),
[618] Fix | Delete
( $args['required_password'] ? ' required="required"' : '' )
[619] Fix | Delete
) .
[620] Fix | Delete
$login_form_middle .
[621] Fix | Delete
( $args['remember'] ?
[622] Fix | Delete
sprintf(
[623] Fix | Delete
'<p class="login-remember"><label><input name="rememberme" type="checkbox" id="%1$s" value="forever"%2$s /> %3$s</label></p>',
[624] Fix | Delete
esc_attr( $args['id_remember'] ),
[625] Fix | Delete
( $args['value_remember'] ? ' checked="checked"' : '' ),
[626] Fix | Delete
esc_html( $args['label_remember'] )
[627] Fix | Delete
) : ''
[628] Fix | Delete
) .
[629] Fix | Delete
sprintf(
[630] Fix | Delete
'<p class="login-submit">
[631] Fix | Delete
<input type="submit" name="wp-submit" id="%1$s" class="button button-primary" value="%2$s" />
[632] Fix | Delete
<input type="hidden" name="redirect_to" value="%3$s" />
[633] Fix | Delete
</p>',
[634] Fix | Delete
esc_attr( $args['id_submit'] ),
[635] Fix | Delete
esc_attr( $args['label_log_in'] ),
[636] Fix | Delete
esc_url( $args['redirect'] )
[637] Fix | Delete
) .
[638] Fix | Delete
$login_form_bottom .
[639] Fix | Delete
'</form>';
[640] Fix | Delete
[641] Fix | Delete
if ( $args['echo'] ) {
[642] Fix | Delete
echo $form;
[643] Fix | Delete
} else {
[644] Fix | Delete
return $form;
[645] Fix | Delete
}
[646] Fix | Delete
}
[647] Fix | Delete
[648] Fix | Delete
/**
[649] Fix | Delete
* Returns the URL that allows the user to reset the lost password.
[650] Fix | Delete
*
[651] Fix | Delete
* @since 2.8.0
[652] Fix | Delete
*
[653] Fix | Delete
* @param string $redirect Path to redirect to on login.
[654] Fix | Delete
* @return string Lost password URL.
[655] Fix | Delete
*/
[656] Fix | Delete
function wp_lostpassword_url( $redirect = '' ) {
[657] Fix | Delete
$args = array(
[658] Fix | Delete
'action' => 'lostpassword',
[659] Fix | Delete
);
[660] Fix | Delete
[661] Fix | Delete
if ( ! empty( $redirect ) ) {
[662] Fix | Delete
$args['redirect_to'] = urlencode( $redirect );
[663] Fix | Delete
}
[664] Fix | Delete
[665] Fix | Delete
if ( is_multisite() ) {
[666] Fix | Delete
$blog_details = get_site();
[667] Fix | Delete
$wp_login_path = $blog_details->path . 'wp-login.php';
[668] Fix | Delete
} else {
[669] Fix | Delete
$wp_login_path = 'wp-login.php';
[670] Fix | Delete
}
[671] Fix | Delete
[672] Fix | Delete
$lostpassword_url = add_query_arg( $args, network_site_url( $wp_login_path, 'login' ) );
[673] Fix | Delete
[674] Fix | Delete
/**
[675] Fix | Delete
* Filters the Lost Password URL.
[676] Fix | Delete
*
[677] Fix | Delete
* @since 2.8.0
[678] Fix | Delete
*
[679] Fix | Delete
* @param string $lostpassword_url The lost password page URL.
[680] Fix | Delete
* @param string $redirect The path to redirect to on login.
[681] Fix | Delete
*/
[682] Fix | Delete
return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
[683] Fix | Delete
}
[684] Fix | Delete
[685] Fix | Delete
/**
[686] Fix | Delete
* Displays the Registration or Admin link.
[687] Fix | Delete
*
[688] Fix | Delete
* Display a link which allows the user to navigate to the registration page if
[689] Fix | Delete
* not logged in and registration is enabled or to the dashboard if logged in.
[690] Fix | Delete
*
[691] Fix | Delete
* @since 1.5.0
[692] Fix | Delete
*
[693] Fix | Delete
* @param string $before Text to output before the link. Default `<li>`.
[694] Fix | Delete
* @param string $after Text to output after the link. Default `</li>`.
[695] Fix | Delete
* @param bool $display Default to echo and not return the link.
[696] Fix | Delete
* @return void|string Void if `$display` argument is true, registration or admin link
[697] Fix | Delete
* if `$display` is false.
[698] Fix | Delete
*/
[699] Fix | Delete
function wp_register( $before = '<li>', $after = '</li>', $display = true ) {
[700] Fix | Delete
if ( ! is_user_logged_in() ) {
[701] Fix | Delete
if ( get_option( 'users_can_register' ) ) {
[702] Fix | Delete
$link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __( 'Register' ) . '</a>' . $after;
[703] Fix | Delete
} else {
[704] Fix | Delete
$link = '';
[705] Fix | Delete
}
[706] Fix | Delete
} elseif ( current_user_can( 'read' ) ) {
[707] Fix | Delete
$link = $before . '<a href="' . admin_url() . '">' . __( 'Site Admin' ) . '</a>' . $after;
[708] Fix | Delete
} else {
[709] Fix | Delete
$link = '';
[710] Fix | Delete
}
[711] Fix | Delete
[712] Fix | Delete
/**
[713] Fix | Delete
* Filters the HTML link to the Registration or Admin page.
[714] Fix | Delete
*
[715] Fix | Delete
* Users are sent to the admin page if logged-in, or the registration page
[716] Fix | Delete
* if enabled and logged-out.
[717] Fix | Delete
*
[718] Fix | Delete
* @since 1.5.0
[719] Fix | Delete
*
[720] Fix | Delete
* @param string $link The HTML code for the link to the Registration or Admin page.
[721] Fix | Delete
*/
[722] Fix | Delete
$link = apply_filters( 'register', $link );
[723] Fix | Delete
[724] Fix | Delete
if ( $display ) {
[725] Fix | Delete
echo $link;
[726] Fix | Delete
} else {
[727] Fix | Delete
return $link;
[728] Fix | Delete
}
[729] Fix | Delete
}
[730] Fix | Delete
[731] Fix | Delete
/**
[732] Fix | Delete
* Theme container function for the 'wp_meta' action.
[733] Fix | Delete
*
[734] Fix | Delete
* The {@see 'wp_meta'} action can have several purposes, depending on how you use it,
[735] Fix | Delete
* but one purpose might have been to allow for theme switching.
[736] Fix | Delete
*
[737] Fix | Delete
* @since 1.5.0
[738] Fix | Delete
*
[739] Fix | Delete
* @link https://core.trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action.
[740] Fix | Delete
*/
[741] Fix | Delete
function wp_meta() {
[742] Fix | Delete
/**
[743] Fix | Delete
* Fires before displaying echoed content in the sidebar.
[744] Fix | Delete
*
[745] Fix | Delete
* @since 1.5.0
[746] Fix | Delete
*/
[747] Fix | Delete
do_action( 'wp_meta' );
[748] Fix | Delete
}
[749] Fix | Delete
[750] Fix | Delete
/**
[751] Fix | Delete
* Displays information about the current site.
[752] Fix | Delete
*
[753] Fix | Delete
* @since 0.71
[754] Fix | Delete
*
[755] Fix | Delete
* @see get_bloginfo() For possible `$show` values
[756] Fix | Delete
*
[757] Fix | Delete
* @param string $show Optional. Site information to display. Default empty.
[758] Fix | Delete
*/
[759] Fix | Delete
function bloginfo( $show = '' ) {
[760] Fix | Delete
echo get_bloginfo( $show, 'display' );
[761] Fix | Delete
}
[762] Fix | Delete
[763] Fix | Delete
/**
[764] Fix | Delete
* Retrieves information about the current site.
[765] Fix | Delete
*
[766] Fix | Delete
* Possible values for `$show` include:
[767] Fix | Delete
*
[768] Fix | Delete
* - 'name' - Site title (set in Settings > General)
[769] Fix | Delete
* - 'description' - Site tagline (set in Settings > General)
[770] Fix | Delete
* - 'wpurl' - The WordPress address (URL) (set in Settings > General)
[771] Fix | Delete
* - 'url' - The Site address (URL) (set in Settings > General)
[772] Fix | Delete
* - 'admin_email' - Admin email (set in Settings > General)
[773] Fix | Delete
* - 'charset' - The "Encoding for pages and feeds" (set in Settings > Reading)
[774] Fix | Delete
* - 'version' - The current WordPress version
[775] Fix | Delete
* - 'html_type' - The Content-Type (default: "text/html"). Themes and plugins
[776] Fix | Delete
* can override the default value using the {@see 'pre_option_html_type'} filter
[777] Fix | Delete
* - 'text_direction' - The text direction determined by the site's language. is_rtl()
[778] Fix | Delete
* should be used instead
[779] Fix | Delete
* - 'language' - Language code for the current site
[780] Fix | Delete
* - 'stylesheet_url' - URL to the stylesheet for the active theme. An active child theme
[781] Fix | Delete
* will take precedence over this value
[782] Fix | Delete
* - 'stylesheet_directory' - Directory path for the active theme. An active child theme
[783] Fix | Delete
* will take precedence over this value
[784] Fix | Delete
* - 'template_url' / 'template_directory' - URL of the active theme's directory. An active
[785] Fix | Delete
* child theme will NOT take precedence over this value
[786] Fix | Delete
* - 'pingback_url' - The pingback XML-RPC file URL (xmlrpc.php)
[787] Fix | Delete
* - 'atom_url' - The Atom feed URL (/feed/atom)
[788] Fix | Delete
* - 'rdf_url' - The RDF/RSS 1.0 feed URL (/feed/rdf)
[789] Fix | Delete
* - 'rss_url' - The RSS 0.92 feed URL (/feed/rss)
[790] Fix | Delete
* - 'rss2_url' - The RSS 2.0 feed URL (/feed)
[791] Fix | Delete
* - 'comments_atom_url' - The comments Atom feed URL (/comments/feed)
[792] Fix | Delete
* - 'comments_rss2_url' - The comments RSS 2.0 feed URL (/comments/feed)
[793] Fix | Delete
*
[794] Fix | Delete
* Some `$show` values are deprecated and will be removed in future versions.
[795] Fix | Delete
* These options will trigger the _deprecated_argument() function.
[796] Fix | Delete
*
[797] Fix | Delete
* Deprecated arguments include:
[798] Fix | Delete
*
[799] Fix | Delete
* - 'siteurl' - Use 'url' instead
[800] Fix | Delete
* - 'home' - Use 'url' instead
[801] Fix | Delete
*
[802] Fix | Delete
* @since 0.71
[803] Fix | Delete
*
[804] Fix | Delete
* @global string $wp_version The WordPress version string.
[805] Fix | Delete
*
[806] Fix | Delete
* @param string $show Optional. Site info to retrieve. Default empty (site name).
[807] Fix | Delete
* @param string $filter Optional. How to filter what is retrieved. Default 'raw'.
[808] Fix | Delete
* @return string Mostly string values, might be empty.
[809] Fix | Delete
*/
[810] Fix | Delete
function get_bloginfo( $show = '', $filter = 'raw' ) {
[811] Fix | Delete
switch ( $show ) {
[812] Fix | Delete
case 'home': // Deprecated.
[813] Fix | Delete
case 'siteurl': // Deprecated.
[814] Fix | Delete
_deprecated_argument(
[815] Fix | Delete
__FUNCTION__,
[816] Fix | Delete
'2.2.0',
[817] Fix | Delete
sprintf(
[818] Fix | Delete
/* translators: 1: 'siteurl'/'home' argument, 2: bloginfo() function name, 3: 'url' argument. */
[819] Fix | Delete
__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
[820] Fix | Delete
'<code>' . $show . '</code>',
[821] Fix | Delete
'<code>bloginfo()</code>',
[822] Fix | Delete
'<code>url</code>'
[823] Fix | Delete
)
[824] Fix | Delete
);
[825] Fix | Delete
// Intentional fall-through to be handled by the 'url' case.
[826] Fix | Delete
case 'url':
[827] Fix | Delete
$output = home_url();
[828] Fix | Delete
break;
[829] Fix | Delete
case 'wpurl':
[830] Fix | Delete
$output = site_url();
[831] Fix | Delete
break;
[832] Fix | Delete
case 'description':
[833] Fix | Delete
$output = get_option( 'blogdescription' );
[834] Fix | Delete
break;
[835] Fix | Delete
case 'rdf_url':
[836] Fix | Delete
$output = get_feed_link( 'rdf' );
[837] Fix | Delete
break;
[838] Fix | Delete
case 'rss_url':
[839] Fix | Delete
$output = get_feed_link( 'rss' );
[840] Fix | Delete
break;
[841] Fix | Delete
case 'rss2_url':
[842] Fix | Delete
$output = get_feed_link( 'rss2' );
[843] Fix | Delete
break;
[844] Fix | Delete
case 'atom_url':
[845] Fix | Delete
$output = get_feed_link( 'atom' );
[846] Fix | Delete
break;
[847] Fix | Delete
case 'comments_atom_url':
[848] Fix | Delete
$output = get_feed_link( 'comments_atom' );
[849] Fix | Delete
break;
[850] Fix | Delete
case 'comments_rss2_url':
[851] Fix | Delete
$output = get_feed_link( 'comments_rss2' );
[852] Fix | Delete
break;
[853] Fix | Delete
case 'pingback_url':
[854] Fix | Delete
$output = site_url( 'xmlrpc.php' );
[855] Fix | Delete
break;
[856] Fix | Delete
case 'stylesheet_url':
[857] Fix | Delete
$output = get_stylesheet_uri();
[858] Fix | Delete
break;
[859] Fix | Delete
case 'stylesheet_directory':
[860] Fix | Delete
$output = get_stylesheet_directory_uri();
[861] Fix | Delete
break;
[862] Fix | Delete
case 'template_directory':
[863] Fix | Delete
case 'template_url':
[864] Fix | Delete
$output = get_template_directory_uri();
[865] Fix | Delete
break;
[866] Fix | Delete
case 'admin_email':
[867] Fix | Delete
$output = get_option( 'admin_email' );
[868] Fix | Delete
break;
[869] Fix | Delete
case 'charset':
[870] Fix | Delete
$output = get_option( 'blog_charset' );
[871] Fix | Delete
if ( '' === $output ) {
[872] Fix | Delete
$output = 'UTF-8';
[873] Fix | Delete
}
[874] Fix | Delete
break;
[875] Fix | Delete
case 'html_type':
[876] Fix | Delete
$output = get_option( 'html_type' );
[877] Fix | Delete
break;
[878] Fix | Delete
case 'version':
[879] Fix | Delete
global $wp_version;
[880] Fix | Delete
$output = $wp_version;
[881] Fix | Delete
break;
[882] Fix | Delete
case 'language':
[883] Fix | Delete
/*
[884] Fix | Delete
* translators: Translate this to the correct language tag for your locale,
[885] Fix | Delete
* see https://www.w3.org/International/articles/language-tags/ for reference.
[886] Fix | Delete
* Do not translate into your own language.
[887] Fix | Delete
*/
[888] Fix | Delete
$output = __( 'html_lang_attribute' );
[889] Fix | Delete
if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) {
[890] Fix | Delete
$output = determine_locale();
[891] Fix | Delete
$output = str_replace( '_', '-', $output );
[892] Fix | Delete
}
[893] Fix | Delete
break;
[894] Fix | Delete
case 'text_direction':
[895] Fix | Delete
_deprecated_argument(
[896] Fix | Delete
__FUNCTION__,
[897] Fix | Delete
'2.2.0',
[898] Fix | Delete
sprintf(
[899] Fix | Delete
/* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name. */
[900] Fix | Delete
__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
[901] Fix | Delete
'<code>' . $show . '</code>',
[902] Fix | Delete
'<code>bloginfo()</code>',
[903] Fix | Delete
'<code>is_rtl()</code>'
[904] Fix | Delete
)
[905] Fix | Delete
);
[906] Fix | Delete
if ( function_exists( 'is_rtl' ) ) {
[907] Fix | Delete
$output = is_rtl() ? 'rtl' : 'ltr';
[908] Fix | Delete
} else {
[909] Fix | Delete
$output = 'ltr';
[910] Fix | Delete
}
[911] Fix | Delete
break;
[912] Fix | Delete
case 'name':
[913] Fix | Delete
default:
[914] Fix | Delete
$output = get_option( 'blogname' );
[915] Fix | Delete
break;
[916] Fix | Delete
}
[917] Fix | Delete
[918] Fix | Delete
if ( 'display' === $filter ) {
[919] Fix | Delete
if (
[920] Fix | Delete
str_contains( $show, 'url' )
[921] Fix | Delete
|| str_contains( $show, 'directory' )
[922] Fix | Delete
|| str_contains( $show, 'home' )
[923] Fix | Delete
) {
[924] Fix | Delete
/**
[925] Fix | Delete
* Filters the URL returned by get_bloginfo().
[926] Fix | Delete
*
[927] Fix | Delete
* @since 2.0.5
[928] Fix | Delete
*
[929] Fix | Delete
* @param string $output The URL returned by bloginfo().
[930] Fix | Delete
* @param string $show Type of information requested.
[931] Fix | Delete
*/
[932] Fix | Delete
$output = apply_filters( 'bloginfo_url', $output, $show );
[933] Fix | Delete
} else {
[934] Fix | Delete
/**
[935] Fix | Delete
* Filters the site information returned by get_bloginfo().
[936] Fix | Delete
*
[937] Fix | Delete
* @since 0.71
[938] Fix | Delete
*
[939] Fix | Delete
* @param mixed $output The requested non-URL site information.
[940] Fix | Delete
* @param string $show Type of information requested.
[941] Fix | Delete
*/
[942] Fix | Delete
$output = apply_filters( 'bloginfo', $output, $show );
[943] Fix | Delete
}
[944] Fix | Delete
}
[945] Fix | Delete
[946] Fix | Delete
return $output;
[947] Fix | Delete
}
[948] Fix | Delete
[949] Fix | Delete
/**
[950] Fix | Delete
* Returns the Site Icon URL.
[951] Fix | Delete
*
[952] Fix | Delete
* @since 4.3.0
[953] Fix | Delete
*
[954] Fix | Delete
* @param int $size Optional. Size of the site icon. Default 512 (pixels).
[955] Fix | Delete
* @param string $url Optional. Fallback url if no site icon is found. Default empty.
[956] Fix | Delete
* @param int $blog_id Optional. ID of the blog to get the site icon for. Default current blog.
[957] Fix | Delete
* @return string Site Icon URL.
[958] Fix | Delete
*/
[959] Fix | Delete
function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
[960] Fix | Delete
$switched_blog = false;
[961] Fix | Delete
[962] Fix | Delete
if ( is_multisite() && ! empty( $blog_id ) && get_current_blog_id() !== (int) $blog_id ) {
[963] Fix | Delete
switch_to_blog( $blog_id );
[964] Fix | Delete
$switched_blog = true;
[965] Fix | Delete
}
[966] Fix | Delete
[967] Fix | Delete
$site_icon_id = (int) get_option( 'site_icon' );
[968] Fix | Delete
[969] Fix | Delete
if ( $site_icon_id ) {
[970] Fix | Delete
if ( $size >= 512 ) {
[971] Fix | Delete
$size_data = 'full';
[972] Fix | Delete
} else {
[973] Fix | Delete
$size_data = array( $size, $size );
[974] Fix | Delete
}
[975] Fix | Delete
$url = wp_get_attachment_image_url( $site_icon_id, $size_data );
[976] Fix | Delete
}
[977] Fix | Delete
[978] Fix | Delete
if ( $switched_blog ) {
[979] Fix | Delete
restore_current_blog();
[980] Fix | Delete
}
[981] Fix | Delete
[982] Fix | Delete
/**
[983] Fix | Delete
* Filters the site icon URL.
[984] Fix | Delete
*
[985] Fix | Delete
* @since 4.4.0
[986] Fix | Delete
*
[987] Fix | Delete
* @param string $url Site icon URL.
[988] Fix | Delete
* @param int $size Size of the site icon.
[989] Fix | Delete
* @param int $blog_id ID of the blog to get the site icon for.
[990] Fix | Delete
*/
[991] Fix | Delete
return apply_filters( 'get_site_icon_url', $url, $size, $blog_id );
[992] Fix | Delete
}
[993] Fix | Delete
[994] Fix | Delete
/**
[995] Fix | Delete
* Displays the Site Icon URL.
[996] Fix | Delete
*
[997] Fix | Delete
* @since 4.3.0
[998] Fix | Delete
*
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function