Make WordPress Core


Ignore:
Timestamp:
09/12/2023 03:10:19 PM (13 months ago)
Author:
Bernhard Reiter
Message:

HTML API: Store current token reference in HTML Processor state.

The $current_token reference has been stored in the HTML Processor itself, but I suggested to move it into the externalized state so that it can be stored and replaced.

In this patch the reference is moved to that state variable and it should become more possible to save and load state, to resume execution after pausing.

Props dmsnell.
Fixes #59268.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-processor-state.php

    r56380 r56558  
    8787
    8888    /**
     89     * Refers to the currently-matched tag, if any.
     90     *
     91     * @since 6.4.0
     92     *
     93     * @var WP_HTML_Token|null
     94     */
     95    public $current_token = null;
     96
     97    /**
    8998     * Tree construction insertion mode.
    9099     *
Note: See TracChangeset for help on using the changeset viewer.