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/wp-admin/includes
File: template.php
testCompression.check(r, h, test);
[2500] Fix | Delete
}
[2501] Fix | Delete
};
[2502] Fix | Delete
[2503] Fix | Delete
x.open('GET', ajaxurl + '?action=wp-compression-test&test='+test+'&_ajax_nonce='+compressionNonce+'&'+(new Date()).getTime(), true);
[2504] Fix | Delete
x.send('');
[2505] Fix | Delete
}
[2506] Fix | Delete
},
[2507] Fix | Delete
[2508] Fix | Delete
check : function(r, h, test) {
[2509] Fix | Delete
if ( ! r && ! test )
[2510] Fix | Delete
this.get(1);
[2511] Fix | Delete
[2512] Fix | Delete
if ( 1 == test ) {
[2513] Fix | Delete
if ( h && ( h.match(/deflate/i) || h.match(/gzip/i) ) )
[2514] Fix | Delete
this.get('no');
[2515] Fix | Delete
else
[2516] Fix | Delete
this.get(2);
[2517] Fix | Delete
[2518] Fix | Delete
return;
[2519] Fix | Delete
}
[2520] Fix | Delete
[2521] Fix | Delete
if ( 2 == test ) {
[2522] Fix | Delete
if ( '"wpCompressionTest' === r )
[2523] Fix | Delete
this.get('yes');
[2524] Fix | Delete
else
[2525] Fix | Delete
this.get('no');
[2526] Fix | Delete
}
[2527] Fix | Delete
}
[2528] Fix | Delete
};
[2529] Fix | Delete
testCompression.check();
[2530] Fix | Delete
</script>
[2531] Fix | Delete
<?php
[2532] Fix | Delete
}
[2533] Fix | Delete
[2534] Fix | Delete
/**
[2535] Fix | Delete
* Echoes a submit button, with provided text and appropriate class(es).
[2536] Fix | Delete
*
[2537] Fix | Delete
* @since 3.1.0
[2538] Fix | Delete
*
[2539] Fix | Delete
* @see get_submit_button()
[2540] Fix | Delete
*
[2541] Fix | Delete
* @param string $text Optional. The text of the button. Defaults to 'Save Changes'.
[2542] Fix | Delete
* @param string $type Optional. The type and CSS class(es) of the button. Core values
[2543] Fix | Delete
* include 'primary', 'small', and 'large'. Default 'primary'.
[2544] Fix | Delete
* @param string $name Optional. The HTML name of the submit button. If no `id` attribute
[2545] Fix | Delete
* is given in the `$other_attributes` parameter, `$name` will be used
[2546] Fix | Delete
* as the button's `id`. Default 'submit'.
[2547] Fix | Delete
* @param bool $wrap Optional. True if the output button should be wrapped in a paragraph tag,
[2548] Fix | Delete
* false otherwise. Default true.
[2549] Fix | Delete
* @param array|string $other_attributes Optional. Other attributes that should be output with the button,
[2550] Fix | Delete
* mapping attributes to their values, e.g. `array( 'id' => 'search-submit' )`.
[2551] Fix | Delete
* These key/value attribute pairs will be output as `attribute="value"`,
[2552] Fix | Delete
* where attribute is the key. Attributes can also be provided as a string,
[2553] Fix | Delete
* e.g. `id="search-submit"`, though the array format is generally preferred.
[2554] Fix | Delete
* Default empty string.
[2555] Fix | Delete
*/
[2556] Fix | Delete
function submit_button( $text = '', $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = '' ) {
[2557] Fix | Delete
echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
[2558] Fix | Delete
}
[2559] Fix | Delete
[2560] Fix | Delete
/**
[2561] Fix | Delete
* Returns a submit button, with provided text and appropriate class.
[2562] Fix | Delete
*
[2563] Fix | Delete
* @since 3.1.0
[2564] Fix | Delete
*
[2565] Fix | Delete
* @param string $text Optional. The text of the button. Defaults to 'Save Changes'.
[2566] Fix | Delete
* @param string $type Optional. The type and CSS class(es) of the button. Core values
[2567] Fix | Delete
* include 'primary', 'small', and 'large'. Default 'primary large'.
[2568] Fix | Delete
* @param string $name Optional. The HTML name of the submit button. If no `id` attribute
[2569] Fix | Delete
* is given in the `$other_attributes` parameter, `$name` will be used
[2570] Fix | Delete
* as the button's `id`. Default 'submit'.
[2571] Fix | Delete
* @param bool $wrap Optional. True if the output button should be wrapped in a paragraph tag,
[2572] Fix | Delete
* false otherwise. Default true.
[2573] Fix | Delete
* @param array|string $other_attributes Optional. Other attributes that should be output with the button,
[2574] Fix | Delete
* mapping attributes to their values, e.g. `array( 'id' => 'search-submit' )`.
[2575] Fix | Delete
* These key/value attribute pairs will be output as `attribute="value"`,
[2576] Fix | Delete
* where attribute is the key. Attributes can also be provided as a string,
[2577] Fix | Delete
* e.g. `id="search-submit"`, though the array format is generally preferred.
[2578] Fix | Delete
* Default empty string.
[2579] Fix | Delete
* @return string Submit button HTML.
[2580] Fix | Delete
*/
[2581] Fix | Delete
function get_submit_button( $text = '', $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = '' ) {
[2582] Fix | Delete
if ( ! is_array( $type ) ) {
[2583] Fix | Delete
$type = explode( ' ', $type );
[2584] Fix | Delete
}
[2585] Fix | Delete
[2586] Fix | Delete
$button_shorthand = array( 'primary', 'small', 'large' );
[2587] Fix | Delete
$classes = array( 'button' );
[2588] Fix | Delete
[2589] Fix | Delete
foreach ( $type as $t ) {
[2590] Fix | Delete
if ( 'secondary' === $t || 'button-secondary' === $t ) {
[2591] Fix | Delete
continue;
[2592] Fix | Delete
}
[2593] Fix | Delete
[2594] Fix | Delete
$classes[] = in_array( $t, $button_shorthand, true ) ? 'button-' . $t : $t;
[2595] Fix | Delete
}
[2596] Fix | Delete
[2597] Fix | Delete
// Remove empty items, remove duplicate items, and finally build a string.
[2598] Fix | Delete
$class = implode( ' ', array_unique( array_filter( $classes ) ) );
[2599] Fix | Delete
[2600] Fix | Delete
$text = $text ? $text : __( 'Save Changes' );
[2601] Fix | Delete
[2602] Fix | Delete
// Default the id attribute to $name unless an id was specifically provided in $other_attributes.
[2603] Fix | Delete
$id = $name;
[2604] Fix | Delete
if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) {
[2605] Fix | Delete
$id = $other_attributes['id'];
[2606] Fix | Delete
unset( $other_attributes['id'] );
[2607] Fix | Delete
}
[2608] Fix | Delete
[2609] Fix | Delete
$attributes = '';
[2610] Fix | Delete
if ( is_array( $other_attributes ) ) {
[2611] Fix | Delete
foreach ( $other_attributes as $attribute => $value ) {
[2612] Fix | Delete
$attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important.
[2613] Fix | Delete
}
[2614] Fix | Delete
} elseif ( ! empty( $other_attributes ) ) { // Attributes provided as a string.
[2615] Fix | Delete
$attributes = $other_attributes;
[2616] Fix | Delete
}
[2617] Fix | Delete
[2618] Fix | Delete
// Don't output empty name and id attributes.
[2619] Fix | Delete
$name_attr = $name ? ' name="' . esc_attr( $name ) . '"' : '';
[2620] Fix | Delete
$id_attr = $id ? ' id="' . esc_attr( $id ) . '"' : '';
[2621] Fix | Delete
[2622] Fix | Delete
$button = '<input type="submit"' . $name_attr . $id_attr . ' class="' . esc_attr( $class );
[2623] Fix | Delete
$button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />';
[2624] Fix | Delete
[2625] Fix | Delete
if ( $wrap ) {
[2626] Fix | Delete
$button = '<p class="submit">' . $button . '</p>';
[2627] Fix | Delete
}
[2628] Fix | Delete
[2629] Fix | Delete
return $button;
[2630] Fix | Delete
}
[2631] Fix | Delete
[2632] Fix | Delete
/**
[2633] Fix | Delete
* Prints out the beginning of the admin HTML header.
[2634] Fix | Delete
*
[2635] Fix | Delete
* @global bool $is_IE
[2636] Fix | Delete
*/
[2637] Fix | Delete
function _wp_admin_html_begin() {
[2638] Fix | Delete
global $is_IE;
[2639] Fix | Delete
[2640] Fix | Delete
$admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
[2641] Fix | Delete
[2642] Fix | Delete
if ( $is_IE ) {
[2643] Fix | Delete
header( 'X-UA-Compatible: IE=edge' );
[2644] Fix | Delete
}
[2645] Fix | Delete
[2646] Fix | Delete
?>
[2647] Fix | Delete
<!DOCTYPE html>
[2648] Fix | Delete
<html class="<?php echo $admin_html_class; ?>"
[2649] Fix | Delete
<?php
[2650] Fix | Delete
/**
[2651] Fix | Delete
* Fires inside the HTML tag in the admin header.
[2652] Fix | Delete
*
[2653] Fix | Delete
* @since 2.2.0
[2654] Fix | Delete
*/
[2655] Fix | Delete
do_action( 'admin_xml_ns' );
[2656] Fix | Delete
[2657] Fix | Delete
language_attributes();
[2658] Fix | Delete
?>
[2659] Fix | Delete
>
[2660] Fix | Delete
<head>
[2661] Fix | Delete
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
[2662] Fix | Delete
<?php
[2663] Fix | Delete
}
[2664] Fix | Delete
[2665] Fix | Delete
/**
[2666] Fix | Delete
* Converts a screen string to a screen object.
[2667] Fix | Delete
*
[2668] Fix | Delete
* @since 3.0.0
[2669] Fix | Delete
*
[2670] Fix | Delete
* @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen.
[2671] Fix | Delete
* @return WP_Screen Screen object.
[2672] Fix | Delete
*/
[2673] Fix | Delete
function convert_to_screen( $hook_name ) {
[2674] Fix | Delete
if ( ! class_exists( 'WP_Screen' ) ) {
[2675] Fix | Delete
_doing_it_wrong(
[2676] Fix | Delete
'convert_to_screen(), add_meta_box()',
[2677] Fix | Delete
sprintf(
[2678] Fix | Delete
/* translators: 1: wp-admin/includes/template.php, 2: add_meta_box(), 3: add_meta_boxes */
[2679] Fix | Delete
__( 'Likely direct inclusion of %1$s in order to use %2$s. This is very wrong. Hook the %2$s call into the %3$s action instead.' ),
[2680] Fix | Delete
'<code>wp-admin/includes/template.php</code>',
[2681] Fix | Delete
'<code>add_meta_box()</code>',
[2682] Fix | Delete
'<code>add_meta_boxes</code>'
[2683] Fix | Delete
),
[2684] Fix | Delete
'3.3.0'
[2685] Fix | Delete
);
[2686] Fix | Delete
return (object) array(
[2687] Fix | Delete
'id' => '_invalid',
[2688] Fix | Delete
'base' => '_are_belong_to_us',
[2689] Fix | Delete
);
[2690] Fix | Delete
}
[2691] Fix | Delete
[2692] Fix | Delete
return WP_Screen::get( $hook_name );
[2693] Fix | Delete
}
[2694] Fix | Delete
[2695] Fix | Delete
/**
[2696] Fix | Delete
* Outputs the HTML for restoring the post data from DOM storage
[2697] Fix | Delete
*
[2698] Fix | Delete
* @since 3.6.0
[2699] Fix | Delete
* @access private
[2700] Fix | Delete
*/
[2701] Fix | Delete
function _local_storage_notice() {
[2702] Fix | Delete
$local_storage_message = '<p class="local-restore">';
[2703] Fix | Delete
$local_storage_message .= __( 'The backup of this post in your browser is different from the version below.' );
[2704] Fix | Delete
$local_storage_message .= '<button type="button" class="button restore-backup">' . __( 'Restore the backup' ) . '</button></p>';
[2705] Fix | Delete
$local_storage_message .= '<p class="help">';
[2706] Fix | Delete
$local_storage_message .= __( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' );
[2707] Fix | Delete
$local_storage_message .= '</p>';
[2708] Fix | Delete
[2709] Fix | Delete
wp_admin_notice(
[2710] Fix | Delete
$local_storage_message,
[2711] Fix | Delete
array(
[2712] Fix | Delete
'id' => 'local-storage-notice',
[2713] Fix | Delete
'additional_classes' => array( 'hidden' ),
[2714] Fix | Delete
'dismissible' => true,
[2715] Fix | Delete
'paragraph_wrap' => false,
[2716] Fix | Delete
)
[2717] Fix | Delete
);
[2718] Fix | Delete
}
[2719] Fix | Delete
[2720] Fix | Delete
/**
[2721] Fix | Delete
* Outputs a HTML element with a star rating for a given rating.
[2722] Fix | Delete
*
[2723] Fix | Delete
* Outputs a HTML element with the star rating exposed on a 0..5 scale in
[2724] Fix | Delete
* half star increments (ie. 1, 1.5, 2 stars). Optionally, if specified, the
[2725] Fix | Delete
* number of ratings may also be displayed by passing the $number parameter.
[2726] Fix | Delete
*
[2727] Fix | Delete
* @since 3.8.0
[2728] Fix | Delete
* @since 4.4.0 Introduced the `echo` parameter.
[2729] Fix | Delete
*
[2730] Fix | Delete
* @param array $args {
[2731] Fix | Delete
* Optional. Array of star ratings arguments.
[2732] Fix | Delete
*
[2733] Fix | Delete
* @type int|float $rating The rating to display, expressed in either a 0.5 rating increment,
[2734] Fix | Delete
* or percentage. Default 0.
[2735] Fix | Delete
* @type string $type Format that the $rating is in. Valid values are 'rating' (default),
[2736] Fix | Delete
* or, 'percent'. Default 'rating'.
[2737] Fix | Delete
* @type int $number The number of ratings that makes up this rating. Default 0.
[2738] Fix | Delete
* @type bool $echo Whether to echo the generated markup. False to return the markup instead
[2739] Fix | Delete
* of echoing it. Default true.
[2740] Fix | Delete
* }
[2741] Fix | Delete
* @return string Star rating HTML.
[2742] Fix | Delete
*/
[2743] Fix | Delete
function wp_star_rating( $args = array() ) {
[2744] Fix | Delete
$defaults = array(
[2745] Fix | Delete
'rating' => 0,
[2746] Fix | Delete
'type' => 'rating',
[2747] Fix | Delete
'number' => 0,
[2748] Fix | Delete
'echo' => true,
[2749] Fix | Delete
);
[2750] Fix | Delete
$parsed_args = wp_parse_args( $args, $defaults );
[2751] Fix | Delete
[2752] Fix | Delete
// Non-English decimal places when the $rating is coming from a string.
[2753] Fix | Delete
$rating = (float) str_replace( ',', '.', $parsed_args['rating'] );
[2754] Fix | Delete
[2755] Fix | Delete
// Convert percentage to star rating, 0..5 in .5 increments.
[2756] Fix | Delete
if ( 'percent' === $parsed_args['type'] ) {
[2757] Fix | Delete
$rating = round( $rating / 10, 0 ) / 2;
[2758] Fix | Delete
}
[2759] Fix | Delete
[2760] Fix | Delete
// Calculate the number of each type of star needed.
[2761] Fix | Delete
$full_stars = floor( $rating );
[2762] Fix | Delete
$half_stars = ceil( $rating - $full_stars );
[2763] Fix | Delete
$empty_stars = 5 - $full_stars - $half_stars;
[2764] Fix | Delete
[2765] Fix | Delete
if ( $parsed_args['number'] ) {
[2766] Fix | Delete
/* translators: Hidden accessibility text. 1: The rating, 2: The number of ratings. */
[2767] Fix | Delete
$format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $parsed_args['number'] );
[2768] Fix | Delete
$title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $parsed_args['number'] ) );
[2769] Fix | Delete
} else {
[2770] Fix | Delete
/* translators: Hidden accessibility text. %s: The rating. */
[2771] Fix | Delete
$title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
[2772] Fix | Delete
}
[2773] Fix | Delete
[2774] Fix | Delete
$output = '<div class="star-rating">';
[2775] Fix | Delete
$output .= '<span class="screen-reader-text">' . $title . '</span>';
[2776] Fix | Delete
$output .= str_repeat( '<div class="star star-full" aria-hidden="true"></div>', $full_stars );
[2777] Fix | Delete
$output .= str_repeat( '<div class="star star-half" aria-hidden="true"></div>', $half_stars );
[2778] Fix | Delete
$output .= str_repeat( '<div class="star star-empty" aria-hidden="true"></div>', $empty_stars );
[2779] Fix | Delete
$output .= '</div>';
[2780] Fix | Delete
[2781] Fix | Delete
if ( $parsed_args['echo'] ) {
[2782] Fix | Delete
echo $output;
[2783] Fix | Delete
}
[2784] Fix | Delete
[2785] Fix | Delete
return $output;
[2786] Fix | Delete
}
[2787] Fix | Delete
[2788] Fix | Delete
/**
[2789] Fix | Delete
* Outputs a notice when editing the page for posts (internal use only).
[2790] Fix | Delete
*
[2791] Fix | Delete
* @ignore
[2792] Fix | Delete
* @since 4.2.0
[2793] Fix | Delete
*/
[2794] Fix | Delete
function _wp_posts_page_notice() {
[2795] Fix | Delete
wp_admin_notice(
[2796] Fix | Delete
__( 'You are currently editing the page that shows your latest posts.' ),
[2797] Fix | Delete
array(
[2798] Fix | Delete
'type' => 'warning',
[2799] Fix | Delete
'additional_classes' => array( 'inline' ),
[2800] Fix | Delete
)
[2801] Fix | Delete
);
[2802] Fix | Delete
}
[2803] Fix | Delete
[2804] Fix | Delete
/**
[2805] Fix | Delete
* Outputs a notice when editing the page for posts in the block editor (internal use only).
[2806] Fix | Delete
*
[2807] Fix | Delete
* @ignore
[2808] Fix | Delete
* @since 5.8.0
[2809] Fix | Delete
*/
[2810] Fix | Delete
function _wp_block_editor_posts_page_notice() {
[2811] Fix | Delete
wp_add_inline_script(
[2812] Fix | Delete
'wp-notices',
[2813] Fix | Delete
sprintf(
[2814] Fix | Delete
'wp.data.dispatch( "core/notices" ).createWarningNotice( "%s", { isDismissible: false } )',
[2815] Fix | Delete
__( 'You are currently editing the page that shows your latest posts.' )
[2816] Fix | Delete
),
[2817] Fix | Delete
'after'
[2818] Fix | Delete
);
[2819] Fix | Delete
}
[2820] Fix | Delete
[2821] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function