- Timestamp:
- 12/10/2023 01:17:29 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-attribute-token.php
r55734 r57179 16 16 * @access private 17 17 * @since 6.2.0 18 * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. 18 19 * 19 20 * @see WP_HTML_Tag_Processor … … 24 25 * 25 26 * @since 6.2.0 27 * 26 28 * @var string 27 29 */ … … 32 34 * 33 35 * @since 6.2.0 36 * 34 37 * @var int 35 38 */ … … 40 43 * 41 44 * @since 6.2.0 45 * 42 46 * @var int 43 47 */ … … 48 52 * 49 53 * @since 6.2.0 54 * 50 55 * @var int 51 56 */ … … 53 58 54 59 /** 55 * The string offset after the attribute value or its name.60 * Byte length of text spanning the attribute inside a tag. 56 61 * 57 * @since 6.2.0 62 * This span starts at the first character of the attribute name 63 * and it ends after one of three cases: 64 * 65 * - at the end of the attribute name for boolean attributes. 66 * - at the end of the value for unquoted attributes. 67 * - at the final single or double quote for quoted attributes. 68 * 69 * Example: 70 * 71 * <div class="post"> 72 * ------------ length is 12, including quotes 73 * 74 * <input type="checked" checked id="selector"> 75 * ------- length is 6 76 * 77 * <a rel=noopener> 78 * ------------ length is 11 79 * 80 * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. 81 * 58 82 * @var int 59 83 */ 60 public $ end;84 public $length; 61 85 62 86 /** … … 64 88 * 65 89 * @since 6.2.0 90 * 66 91 * @var bool 67 92 */ … … 72 97 * 73 98 * @since 6.2.0 99 * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. 74 100 * 75 101 * @param string $name Attribute name. … … 77 103 * @param int $value_length Number of bytes attribute value spans. 78 104 * @param int $start The string offset where the attribute name starts. 79 * @param int $ end The string offset after the attribute value or its name.105 * @param int $length Byte length of the entire attribute name or name and value pair expression. 80 106 * @param bool $is_true Whether the attribute is a boolean attribute with true value. 81 107 */ 82 public function __construct( $name, $value_start, $value_length, $start, $ end, $is_true ) {108 public function __construct( $name, $value_start, $value_length, $start, $length, $is_true ) { 83 109 $this->name = $name; 84 110 $this->value_starts_at = $value_start; 85 111 $this->value_length = $value_length; 86 112 $this->start = $start; 87 $this-> end = $end;113 $this->length = $length; 88 114 $this->is_true = $is_true; 89 115 }
Note: See TracChangeset
for help on using the changeset viewer.