WP_Customize_Selective_Refresh::handle_error()publicWP 4.5.0

Handles PHP errors triggered during rendering the partials.

These errors will be relayed back to the client in the Ajax response.

Метод класса: WP_Customize_Selective_Refresh{}

Хуков нет.

Возвращает

true. Always true.

Использование

$WP_Customize_Selective_Refresh = new WP_Customize_Selective_Refresh();
$WP_Customize_Selective_Refresh->handle_error( $errno, $errstr, $errfile, $errline );
$errno(int) (обязательный)
Error number.
$errstr(строка) (обязательный)
Error string.
$errfile(строка)
Error file.
По умолчанию: null
$errline(int)
Error line.
По умолчанию: null

Список изменений

С версии 4.5.0 Введена.

Код WP_Customize_Selective_Refresh::handle_error() WP 6.1.1

public function handle_error( $errno, $errstr, $errfile = null, $errline = null ) {
	$this->triggered_errors[] = array(
		'partial'      => $this->current_partial_id,
		'error_number' => $errno,
		'error_string' => $errstr,
		'error_file'   => $errfile,
		'error_line'   => $errline,
	);
	return true;
}