Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Summery Summery

Get lines from either the old or new text

Syntax Syntax

Text_Diff_Engine_shell::_getLines( array $text_lines, int $line_no, int $end = false )

Parameters Parameters


(Required) Either $from_lines or $to_lines (passed by reference).


(Required) Current line number (passed by reference).


(Optional) end line, when we want to chop more than one line.

Default value: false

Return Return

(array) The chopped lines

Source Source

File: wp-includes/Text/Diff/Engine/shell.php

    function _getLines(&$text_lines, &$line_no, $end = false)
        if (!empty($end)) {
            $lines = array();
            // We can shift even more
            while ($line_no <= $end) {
                array_push($lines, array_shift($text_lines));
        } else {
            $lines = array(array_shift($text_lines));

        return $lines;



Leave a Reply