Make WordPress Core


Ignore:
Timestamp:
08/07/2023 01:48:55 PM (18 months ago)
Author:
Bernhard Reiter
Message:

HTML API: Adjust code styling to Gutenberg's linter's preferences.

Adjust the code style according to the rules that the linting process in Gutenberg requires.

There are only a couple code changes that should have no effect on the runtime:

  • A missing check to verify that only UTF-8 is supported has been added (brought up because it was identified as an undefined variable).
  • A few return false; statements have been added to avoid having the linter complain that functions don't return a value despite indicating they return bool. The functions are stubs for coming support and currently throw, so the return statements are unreachable.

Props dmsnell, costdev, davidbaumwald, peterwilsoncc, SergeyBiryukov.
Fixes #58918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php

    r56274 r56363  
    5151     * @param WP_HTML_Token $token Look for this node in the stack.
    5252     * @return bool Whether the referenced node is in the stack of active formatting elements.
    53      *
    5453     */
    5554    public function contains_node( $token ) {
     
    150149     *
    151150     * To start with the most-recently added element and walk towards the top,
    152      * @see WP_HTML_Active_Formatting_Elements::walk_up
     151     * see WP_HTML_Active_Formatting_Elements::walk_up().
    153152     *
    154153     * @since 6.4.0
     
    177176     *
    178177     * To start with the first added element and walk towards the bottom,
    179      * @see WP_HTML_Active_Formatting_Elements::walk_down
     178     * see WP_HTML_Active_Formatting_Elements::walk_down().
    180179     *
    181180     * @since 6.4.0
Note: See TracChangeset for help on using the changeset viewer.