WP_Text_Diff_Renderer_Table::interleave_changed_lines

Advertisement

Summery Summery

Takes changed blocks and matches which rows in orig turned into which rows in final.

Syntax Syntax

WP_Text_Diff_Renderer_Table::interleave_changed_lines( array $orig, array $final )

Parameters Parameters

$orig

(array) (Required) Lines of the original version of the text.

$final

(array) (Required) Lines of the final version of the text.

Return Return

(array) Array containing results of comparing the original text to the final text.

  • 'orig_matches'
    (array) Associative array of original matches. Index == row number of $orig, value == corresponding row number of that same line in $final or 'x' if there is no corresponding row (indicating it is a deleted line).
  • 'final_matches'
    (array) Associative array of final matches. Index == row number of $final, value == corresponding row number of that same line in $orig or 'x' if there is no corresponding row (indicating it is a new line).
  • 'orig_rows'
    (array) Associative array of interleaved rows of $orig with blanks to keep matches aligned with side-by-side diff of $final. A value >= 0 corresponds to index of $orig. Value < 0 indicates a blank row.
  • 'final_rows'
    (array) Associative array of interleaved rows of $final with blanks to keep matches aligned with side-by-side diff of $orig. A value >= 0 corresponds to index of $final. Value < 0 indicates a blank row.

Source Source

File: wp-includes/class-wp-text-diff-renderer-table.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.