forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass-wp-html-element-stack-item.php
More file actions
46 lines (40 loc) · 1.16 KB
/
class-wp-html-element-stack-item.php
File metadata and controls
46 lines (40 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
class WP_HTML_Element_Stack_Item {
const NO_FLAGS = 0;
const IS_CLOSER = 1 << 0;
const HAS_SELF_CLOSING_FLAG = 1 << 1;
/**
* Stores the name of the bookmark pointing to the element at the position of the item.
*
* @var string|null
*/
public $bookmark_name = null;
/**
* Stores the element class name for the element at the position of the item.
*
* This is the name of the PHP class representing the element.
* For example, `WP_HTMLDivElement` from calling `WP_HTMLDivElement::class`.
*
* @var string|null
*/
public $element = null;
/**
* Properties about this item in the stack that are relevant for relating opening and closing tags.
*
* @var int
*/
public $flags = 0;
/**
* Pointer to related item on the stack, if one exists.
* For example, a tag opener that opens the current tag closer.
*
* @var WP_HTML_Element_Stack_Item|null
*/
public $related_item = null;
public function __construct( $bookmark_name, $element, $flags = self::NO_FLAGS, $related_item = null ) {
$this->bookmark_name = $bookmark_name;
$this->element = $element;
$this->flags = $flags;
$this->related_item = $related_item;
}
}