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.../public_h.../wp-inclu...
File: pluggable.php
* - 'retro' (a 8-bit arcade-style pixelated face)
[3000] Fix | Delete
* - 'robohash' (a robot)
[3001] Fix | Delete
* - 'monsterid' (a monster)
[3002] Fix | Delete
* - 'wavatar' (a cartoon face)
[3003] Fix | Delete
* - 'identicon' (the "quilt", a geometric pattern)
[3004] Fix | Delete
* - 'mystery', 'mm', or 'mysteryman' (The Oyster Man)
[3005] Fix | Delete
* - 'blank' (transparent GIF)
[3006] Fix | Delete
* - 'gravatar_default' (the Gravatar logo)
[3007] Fix | Delete
* @param string $alt Alternative text to use in the avatar image tag.
[3008] Fix | Delete
* @param array $args Arguments passed to get_avatar_data(), after processing.
[3009] Fix | Delete
*/
[3010] Fix | Delete
return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args );
[3011] Fix | Delete
}
[3012] Fix | Delete
endif;
[3013] Fix | Delete
[3014] Fix | Delete
if ( ! function_exists( 'wp_text_diff' ) ) :
[3015] Fix | Delete
/**
[3016] Fix | Delete
* Displays a human readable HTML representation of the difference between two strings.
[3017] Fix | Delete
*
[3018] Fix | Delete
* The Diff is available for getting the changes between versions. The output is
[3019] Fix | Delete
* HTML, so the primary use is for displaying the changes. If the two strings
[3020] Fix | Delete
* are equivalent, then an empty string will be returned.
[3021] Fix | Delete
*
[3022] Fix | Delete
* @since 2.6.0
[3023] Fix | Delete
*
[3024] Fix | Delete
* @see wp_parse_args() Used to change defaults to user defined settings.
[3025] Fix | Delete
* @uses Text_Diff
[3026] Fix | Delete
* @uses WP_Text_Diff_Renderer_Table
[3027] Fix | Delete
*
[3028] Fix | Delete
* @param string $left_string "old" (left) version of string.
[3029] Fix | Delete
* @param string $right_string "new" (right) version of string.
[3030] Fix | Delete
* @param string|array $args {
[3031] Fix | Delete
* Associative array of options to pass to WP_Text_Diff_Renderer_Table().
[3032] Fix | Delete
*
[3033] Fix | Delete
* @type string $title Titles the diff in a manner compatible
[3034] Fix | Delete
* with the output. Default empty.
[3035] Fix | Delete
* @type string $title_left Change the HTML to the left of the title.
[3036] Fix | Delete
* Default empty.
[3037] Fix | Delete
* @type string $title_right Change the HTML to the right of the title.
[3038] Fix | Delete
* Default empty.
[3039] Fix | Delete
* @type bool $show_split_view True for split view (two columns), false for
[3040] Fix | Delete
* un-split view (single column). Default true.
[3041] Fix | Delete
* }
[3042] Fix | Delete
* @return string Empty string if strings are equivalent or HTML with differences.
[3043] Fix | Delete
*/
[3044] Fix | Delete
function wp_text_diff( $left_string, $right_string, $args = null ) {
[3045] Fix | Delete
$defaults = array(
[3046] Fix | Delete
'title' => '',
[3047] Fix | Delete
'title_left' => '',
[3048] Fix | Delete
'title_right' => '',
[3049] Fix | Delete
'show_split_view' => true,
[3050] Fix | Delete
);
[3051] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[3052] Fix | Delete
[3053] Fix | Delete
if ( ! class_exists( 'WP_Text_Diff_Renderer_Table', false ) ) {
[3054] Fix | Delete
require ABSPATH . WPINC . '/wp-diff.php';
[3055] Fix | Delete
}
[3056] Fix | Delete
[3057] Fix | Delete
$left_string = normalize_whitespace( $left_string );
[3058] Fix | Delete
$right_string = normalize_whitespace( $right_string );
[3059] Fix | Delete
[3060] Fix | Delete
$left_lines = explode( "\n", $left_string );
[3061] Fix | Delete
$right_lines = explode( "\n", $right_string );
[3062] Fix | Delete
$text_diff = new Text_Diff( $left_lines, $right_lines );
[3063] Fix | Delete
$renderer = new WP_Text_Diff_Renderer_Table( $args );
[3064] Fix | Delete
$diff = $renderer->render( $text_diff );
[3065] Fix | Delete
[3066] Fix | Delete
if ( ! $diff ) {
[3067] Fix | Delete
return '';
[3068] Fix | Delete
}
[3069] Fix | Delete
[3070] Fix | Delete
$is_split_view = ! empty( $args['show_split_view'] );
[3071] Fix | Delete
$is_split_view_class = $is_split_view ? ' is-split-view' : '';
[3072] Fix | Delete
[3073] Fix | Delete
$r = "<table class='diff$is_split_view_class'>\n";
[3074] Fix | Delete
[3075] Fix | Delete
if ( $args['title'] ) {
[3076] Fix | Delete
$r .= "<caption class='diff-title'>$args[title]</caption>\n";
[3077] Fix | Delete
}
[3078] Fix | Delete
[3079] Fix | Delete
if ( $args['title_left'] || $args['title_right'] ) {
[3080] Fix | Delete
$r .= '<thead>';
[3081] Fix | Delete
}
[3082] Fix | Delete
[3083] Fix | Delete
if ( $args['title_left'] || $args['title_right'] ) {
[3084] Fix | Delete
$th_or_td_left = empty( $args['title_left'] ) ? 'td' : 'th';
[3085] Fix | Delete
$th_or_td_right = empty( $args['title_right'] ) ? 'td' : 'th';
[3086] Fix | Delete
[3087] Fix | Delete
$r .= "<tr class='diff-sub-title'>\n";
[3088] Fix | Delete
$r .= "\t<$th_or_td_left>$args[title_left]</$th_or_td_left>\n";
[3089] Fix | Delete
if ( $is_split_view ) {
[3090] Fix | Delete
$r .= "\t<$th_or_td_right>$args[title_right]</$th_or_td_right>\n";
[3091] Fix | Delete
}
[3092] Fix | Delete
$r .= "</tr>\n";
[3093] Fix | Delete
}
[3094] Fix | Delete
[3095] Fix | Delete
if ( $args['title_left'] || $args['title_right'] ) {
[3096] Fix | Delete
$r .= "</thead>\n";
[3097] Fix | Delete
}
[3098] Fix | Delete
[3099] Fix | Delete
$r .= "<tbody>\n$diff\n</tbody>\n";
[3100] Fix | Delete
$r .= '</table>';
[3101] Fix | Delete
[3102] Fix | Delete
return $r;
[3103] Fix | Delete
}
[3104] Fix | Delete
endif;
[3105] Fix | Delete
[3106] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function