[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/html-api/ -> class-wp-html-stack-event.php (source)

   1  <?php
   2  /**
   3   * HTML API: WP_HTML_Stack_Event class
   4   *
   5   * @package WordPress
   6   * @subpackage HTML-API
   7   * @since 6.6.0
   8   */
   9  
  10  /**
  11   * Core class used by the HTML Processor as a record for stack operations.
  12   *
  13   * This class is for internal usage of the WP_HTML_Processor class.
  14   *
  15   * @access private
  16   * @ignore
  17   *
  18   * @since 6.6.0
  19   *
  20   * @see WP_HTML_Processor
  21   */
  22  class WP_HTML_Stack_Event {
  23      /**
  24       * Refers to popping an element off of the stack of open elements.
  25       *
  26       * @since 6.6.0
  27       */
  28      const POP = 'pop';
  29  
  30      /**
  31       * Refers to pushing an element onto the stack of open elements.
  32       *
  33       * @since 6.6.0
  34       */
  35      const PUSH = 'push';
  36  
  37      /**
  38       * References the token associated with the stack push event,
  39       * even if this is a pop event for that element.
  40       *
  41       * @since 6.6.0
  42       *
  43       * @var WP_HTML_Token
  44       */
  45      public $token;
  46  
  47      /**
  48       * Indicates which kind of stack operation this event represents.
  49       *
  50       * May be one of the class constants.
  51       *
  52       * @since 6.6.0
  53       *
  54       * @see self::POP
  55       * @see self::PUSH
  56       *
  57       * @var string
  58       */
  59      public $operation;
  60  
  61      /**
  62       * Indicates if the stack element is a real or virtual node.
  63       *
  64       * @since 6.6.0
  65       *
  66       * @var string
  67       */
  68      public $provenance;
  69  
  70      /**
  71       * Constructor function.
  72       *
  73       * @since 6.6.0
  74       *
  75       * @param WP_HTML_Token $token      Token associated with stack event, always an opening token.
  76       * @param string        $operation  One of self::PUSH or self::POP.
  77       * @param string        $provenance "virtual" or "real".
  78       */
  79  	public function __construct( WP_HTML_Token $token, string $operation, string $provenance ) {
  80          $this->token      = $token;
  81          $this->operation  = $operation;
  82          $this->provenance = $provenance;
  83      }
  84  }


Generated : Mon Jun 22 08:20:11 2026 Cross-referenced by PHPXref