Text_Diff::getOriginal()publicWP 1.0

Gets the original set of lines.

This reconstructs the $from_lines parameter passed to the constructor.

Method of the class: Text_Diff{}

No Hooks.

Return

Array. The original sequence of strings.

Usage

$Text_Diff = new Text_Diff();
$Text_Diff->getOriginal();

Text_Diff::getOriginal() code WP 6.1.1

function getOriginal()
{
    $lines = array();
    foreach ($this->_edits as $edit) {
        if ($edit->orig) {
            array_splice($lines, count($lines), 0, $edit->orig);
        }
    }
    return $lines;
}