Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../wp-inclu.../html-api
File: class-wp-html-token.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* HTML API: WP_HTML_Token class
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage HTML-API
[5] Fix | Delete
* @since 6.4.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Core class used by the HTML processor during HTML parsing
[10] Fix | Delete
* for referring to tokens in the input HTML string.
[11] Fix | Delete
*
[12] Fix | Delete
* This class is designed for internal use by the HTML processor.
[13] Fix | Delete
*
[14] Fix | Delete
* @since 6.4.0
[15] Fix | Delete
*
[16] Fix | Delete
* @access private
[17] Fix | Delete
*
[18] Fix | Delete
* @see WP_HTML_Processor
[19] Fix | Delete
*/
[20] Fix | Delete
class WP_HTML_Token {
[21] Fix | Delete
/**
[22] Fix | Delete
* Name of bookmark corresponding to source of token in input HTML string.
[23] Fix | Delete
*
[24] Fix | Delete
* Having a bookmark name does not imply that the token still exists. It
[25] Fix | Delete
* may be that the source token and underlying bookmark was wiped out by
[26] Fix | Delete
* some modification to the source HTML.
[27] Fix | Delete
*
[28] Fix | Delete
* @since 6.4.0
[29] Fix | Delete
*
[30] Fix | Delete
* @var string
[31] Fix | Delete
*/
[32] Fix | Delete
public $bookmark_name = null;
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* Name of node; lowercase names such as "marker" are not HTML elements.
[36] Fix | Delete
*
[37] Fix | Delete
* For HTML elements/tags this value should come from WP_HTML_Processor::get_tag().
[38] Fix | Delete
*
[39] Fix | Delete
* @since 6.4.0
[40] Fix | Delete
*
[41] Fix | Delete
* @see WP_HTML_Processor::get_tag()
[42] Fix | Delete
*
[43] Fix | Delete
* @var string
[44] Fix | Delete
*/
[45] Fix | Delete
public $node_name = null;
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Whether node contains the self-closing flag.
[49] Fix | Delete
*
[50] Fix | Delete
* A node may have a self-closing flag when it shouldn't. This value
[51] Fix | Delete
* only reports if the flag is present in the original HTML.
[52] Fix | Delete
*
[53] Fix | Delete
* @since 6.4.0
[54] Fix | Delete
*
[55] Fix | Delete
* @see https://html.spec.whatwg.org/#self-closing-flag
[56] Fix | Delete
*
[57] Fix | Delete
* @var bool
[58] Fix | Delete
*/
[59] Fix | Delete
public $has_self_closing_flag = false;
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* Called when token is garbage-collected or otherwise destroyed.
[63] Fix | Delete
*
[64] Fix | Delete
* @var callable|null
[65] Fix | Delete
*/
[66] Fix | Delete
public $on_destroy = null;
[67] Fix | Delete
[68] Fix | Delete
/**
[69] Fix | Delete
* Constructor - creates a reference to a token in some external HTML string.
[70] Fix | Delete
*
[71] Fix | Delete
* @since 6.4.0
[72] Fix | Delete
*
[73] Fix | Delete
* @param string $bookmark_name Name of bookmark corresponding to location in HTML where token is found.
[74] Fix | Delete
* @param string $node_name Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker".
[75] Fix | Delete
* @param bool $has_self_closing_flag Whether the source token contains the self-closing flag, regardless of whether it's valid.
[76] Fix | Delete
* @param callable $on_destroy Function to call when destroying token, useful for releasing the bookmark.
[77] Fix | Delete
*/
[78] Fix | Delete
public function __construct( $bookmark_name, $node_name, $has_self_closing_flag, $on_destroy = null ) {
[79] Fix | Delete
$this->bookmark_name = $bookmark_name;
[80] Fix | Delete
$this->node_name = $node_name;
[81] Fix | Delete
$this->has_self_closing_flag = $has_self_closing_flag;
[82] Fix | Delete
$this->on_destroy = $on_destroy;
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
/**
[86] Fix | Delete
* Destructor.
[87] Fix | Delete
*
[88] Fix | Delete
* @since 6.4.0
[89] Fix | Delete
*/
[90] Fix | Delete
public function __destruct() {
[91] Fix | Delete
if ( is_callable( $this->on_destroy ) ) {
[92] Fix | Delete
call_user_func( $this->on_destroy, $this->bookmark_name );
[93] Fix | Delete
}
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
/**
[97] Fix | Delete
* Wakeup magic method.
[98] Fix | Delete
*
[99] Fix | Delete
* @since 6.4.2
[100] Fix | Delete
*/
[101] Fix | Delete
public function __wakeup() {
[102] Fix | Delete
throw new \LogicException( __CLASS__ . ' should never be unserialized' );
[103] Fix | Delete
}
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function