Text_Diff::countDeletedLines()
Returns the number of deleted (removed) lines in a given diff.
Method of the class: Text_Diff{}
No Hooks.
Return
Int
. The number of deleted lines
Usage
$Text_Diff = new Text_Diff(); $Text_Diff->countDeletedLines();
Changelog
Since 1.1.0 | Introduced. |
Text_Diff::countDeletedLines() Text Diff::countDeletedLines code WP 6.6.2
function countDeletedLines() { $count = 0; foreach ($this->_edits as $edit) { if (is_a($edit, 'Text_Diff_Op_delete') || is_a($edit, 'Text_Diff_Op_change')) { $count += $edit->norig(); } } return $count; }