wp_text_diff


wp_text_diff ( $left_string, $right_string, $args = null )

Parameters:
  • (string) left_string "old" (left) version of string.
  • (string) right_string "new" (right) version of string.
  • (string|array) args { Associative array of options to pass to WP_Text_Diff_Renderer_Table(). @type string $title Titles the diff in a manner compatible with the output. Default empty. @type string $title_left Change the HTML to the left of the title. Default empty. @type string $title_right Change the HTML to the right of the title. Default empty. @type bool $show_split_view True for split view (two columns), false for un-split view (single column). Default true. }
Uses:
  • Text_Diff
  • WP_Text_Diff_Renderer_Table
See:
Returns:
  • (string) Empty string if strings are equivalent or HTML with differences.
Defined at:

Description

Displays a human readable HTML representation of the difference between two strings.The Diff is available for getting the changes between versions. The output is HTML, so the primary use is for displaying the changes. If the two strings are equivalent, then an empty string will be returned.

Related Functions

wp_get_avif_info, wptexturize, wp_font_dir, wp_style_is, human_time_diff

Top Google Results

User discussions

wpseek mobile