Make WordPress Core


Ignore:
Timestamp:
06/04/2026 09:10:15 AM (11 days ago)
Author:
dmsnell
Message:

Docs: Update parameter types to allow null for interactivity api functions

When [58327] added annotations for a nullable-typed argument in the Interactivity API, the PHPDoc comment wasn’t also updated. This patch adds the corresponding documentation update.

Prepared ahead of WCEU 2026, merged as part of Contributor Day.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11470
Discussed in: https://core.trac.wordpress.org/ticket/65404

Follow-up to [58327].

Props audrasjb, mukesh27, soean.
Fixes #65404.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/interactivity-api/class-wp-interactivity-api.php

    r62070 r62458  
    139139     * @since 6.6.0 The `$store_namespace` param is optional.
    140140     *
    141      * @param string $store_namespace Optional. The unique store namespace identifier.
    142      * @param array  $state           Optional. The array that will be merged with the existing state for the specified
     141     * @param string|null $store_namespace Optional. The unique store namespace identifier.
     142     * @param array|null  $state           Optional. The array that will be merged with the existing state for the specified
    143143     *                                store namespace.
    144144     * @return array The current state for the specified store namespace. This will be the updated state if a $state
     
    312312     * @since 6.6.0
    313313     *
    314      * @param string $store_namespace Optional. The unique store namespace identifier.
     314     * @param string|null $store_namespace Optional. The unique store namespace identifier.
    315315     */
    316316    public function get_context( ?string $store_namespace = null ): array {
Note: See TracChangeset for help on using the changeset viewer.