WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Text_Diff::__construct() public WP 1.0

Computes diffs between sequences of strings.

{} Это метод класса: Text_Diff{}

Хуков нет.


Null. Ничего.


$Text_Diff = new Text_Diff();
$Text_Diff->__construct( $engine, $params );
$engine(строка) (обязательный)
Name of the diffing engine to use. 'auto' will automatically select the best.
$params(массив) (обязательный)
Parameters to pass to the diffing engine. Normally an array of two arrays, each containing the lines from a file.

Код Text_Diff::__construct() WP 5.5.3

function __construct( $engine, $params )
    // Backward compatibility workaround.
    if (!is_string($engine)) {
        $params = array($engine, $params);
        $engine = 'auto';

    if ($engine == 'auto') {
        $engine = extension_loaded('xdiff') ? 'xdiff' : 'native';
    } else {
        $engine = basename($engine);

    // WP #7391
    require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php';
    $class = 'Text_Diff_Engine_' . $engine;
    $diff_engine = new $class();

    $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params);