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.../httpdocs/wp-inclu.../html-api
File: class-wp-html-attribute-token.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* HTML API: WP_HTML_Attribute_Token class
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage HTML-API
[5] Fix | Delete
* @since 6.2.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Core class used by the HTML tag processor as a data structure for the attribute token,
[10] Fix | Delete
* allowing to drastically improve performance.
[11] Fix | Delete
*
[12] Fix | Delete
* This class is for internal usage of the WP_HTML_Tag_Processor class.
[13] Fix | Delete
*
[14] Fix | Delete
* @access private
[15] Fix | Delete
* @since 6.2.0
[16] Fix | Delete
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
[17] Fix | Delete
*
[18] Fix | Delete
* @see WP_HTML_Tag_Processor
[19] Fix | Delete
*/
[20] Fix | Delete
class WP_HTML_Attribute_Token {
[21] Fix | Delete
/**
[22] Fix | Delete
* Attribute name.
[23] Fix | Delete
*
[24] Fix | Delete
* @since 6.2.0
[25] Fix | Delete
*
[26] Fix | Delete
* @var string
[27] Fix | Delete
*/
[28] Fix | Delete
public $name;
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Attribute value.
[32] Fix | Delete
*
[33] Fix | Delete
* @since 6.2.0
[34] Fix | Delete
*
[35] Fix | Delete
* @var int
[36] Fix | Delete
*/
[37] Fix | Delete
public $value_starts_at;
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* How many bytes the value occupies in the input HTML.
[41] Fix | Delete
*
[42] Fix | Delete
* @since 6.2.0
[43] Fix | Delete
*
[44] Fix | Delete
* @var int
[45] Fix | Delete
*/
[46] Fix | Delete
public $value_length;
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* The string offset where the attribute name starts.
[50] Fix | Delete
*
[51] Fix | Delete
* @since 6.2.0
[52] Fix | Delete
*
[53] Fix | Delete
* @var int
[54] Fix | Delete
*/
[55] Fix | Delete
public $start;
[56] Fix | Delete
[57] Fix | Delete
/**
[58] Fix | Delete
* Byte length of text spanning the attribute inside a tag.
[59] Fix | Delete
*
[60] Fix | Delete
* This span starts at the first character of the attribute name
[61] Fix | Delete
* and it ends after one of three cases:
[62] Fix | Delete
*
[63] Fix | Delete
* - at the end of the attribute name for boolean attributes.
[64] Fix | Delete
* - at the end of the value for unquoted attributes.
[65] Fix | Delete
* - at the final single or double quote for quoted attributes.
[66] Fix | Delete
*
[67] Fix | Delete
* Example:
[68] Fix | Delete
*
[69] Fix | Delete
* <div class="post">
[70] Fix | Delete
* ------------ length is 12, including quotes
[71] Fix | Delete
*
[72] Fix | Delete
* <input type="checked" checked id="selector">
[73] Fix | Delete
* ------- length is 6
[74] Fix | Delete
*
[75] Fix | Delete
* <a rel=noopener>
[76] Fix | Delete
* ------------ length is 11
[77] Fix | Delete
*
[78] Fix | Delete
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
[79] Fix | Delete
*
[80] Fix | Delete
* @var int
[81] Fix | Delete
*/
[82] Fix | Delete
public $length;
[83] Fix | Delete
[84] Fix | Delete
/**
[85] Fix | Delete
* Whether the attribute is a boolean attribute with value `true`.
[86] Fix | Delete
*
[87] Fix | Delete
* @since 6.2.0
[88] Fix | Delete
*
[89] Fix | Delete
* @var bool
[90] Fix | Delete
*/
[91] Fix | Delete
public $is_true;
[92] Fix | Delete
[93] Fix | Delete
/**
[94] Fix | Delete
* Constructor.
[95] Fix | Delete
*
[96] Fix | Delete
* @since 6.2.0
[97] Fix | Delete
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
[98] Fix | Delete
*
[99] Fix | Delete
* @param string $name Attribute name.
[100] Fix | Delete
* @param int $value_start Attribute value.
[101] Fix | Delete
* @param int $value_length Number of bytes attribute value spans.
[102] Fix | Delete
* @param int $start The string offset where the attribute name starts.
[103] Fix | Delete
* @param int $length Byte length of the entire attribute name or name and value pair expression.
[104] Fix | Delete
* @param bool $is_true Whether the attribute is a boolean attribute with true value.
[105] Fix | Delete
*/
[106] Fix | Delete
public function __construct( $name, $value_start, $value_length, $start, $length, $is_true ) {
[107] Fix | Delete
$this->name = $name;
[108] Fix | Delete
$this->value_starts_at = $value_start;
[109] Fix | Delete
$this->value_length = $value_length;
[110] Fix | Delete
$this->start = $start;
[111] Fix | Delete
$this->length = $length;
[112] Fix | Delete
$this->is_true = $is_true;
[113] Fix | Delete
}
[114] Fix | Delete
}
[115] Fix | Delete
[116] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function