Make WordPress Core

Changeset 61624


Ignore:
Timestamp:
02/12/2026 03:47:56 PM (8 weeks ago)
Author:
jonsurrell
Message:

HTML API: Use more universal syntax to call Closure variable.

Replace ( $fn )( ...$args ) syntax with equivalent call_user_func( $fn, ...$args ) to prevent an issue with the WordPress documentation parser. The parser would fail when encountering this syntax, preventing documentation generation.

Developed in https://github.com/WordPress/wordpress-develop/pull/10907.

Follow-up to [58304].

Props dmsnell, jonsurrell.
See #64224, #61348.

File:
1 edited

Legend:

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

    r60804 r61624  
    716716
    717717        if ( null !== $this->push_handler ) {
    718             ( $this->push_handler )( $item );
     718            call_user_func( $this->push_handler, $item );
    719719        }
    720720    }
     
    764764
    765765        if ( null !== $this->pop_handler ) {
    766             ( $this->pop_handler )( $item );
     766            call_user_func( $this->pop_handler, $item );
    767767        }
    768768    }
Note: See TracChangeset for help on using the changeset viewer.