Skip to content

Hooks/Docs: admin_footer PHPDoc in build page files missing @param tag #19

Closed as not planned

Description

@apermo

Problem

Three build page files each contain a standalone PHPDoc block for do_action( 'admin_footer', '' ) that documents the hook with @since but omits the @param tag. PHPStan reports these as having 0 @param tags while the hook call passes 1 argument.

The primary documentation in wp-admin/admin-footer.php correctly includes the @param:

/**
 * Prints scripts or data before the default footer scripts.
 *
 * @since 1.2.0
 *
 * @param string $data The data to print.
 */
do_action( 'admin_footer', '' );

Affected files (all at line 276–281)

https://github.com/apermo/wordpress-develop/blob/trunk/src/wp-includes/build/pages/font-library/page.php#L276-L281

https://github.com/apermo/wordpress-develop/blob/trunk/src/wp-includes/build/pages/options-connectors/page.php#L276-L281

https://github.com/apermo/wordpress-develop/blob/trunk/src/wp-includes/build/pages/site-editor-v2/page.php#L276-L281

Current (incomplete):

/**
 * Prints scripts or data before the default footer scripts.
 *
 * @since 1.2.0
 */
do_action( 'admin_footer', '' );

Fix

Replace the standalone PHPDoc in each file with the standard cross-reference comment:

- /**
-  * Prints scripts or data before the default footer scripts.
-  *
-  * @since 1.2.0
-  */
+ /** This action is documented in wp-admin/admin-footer.php */
do_action( 'admin_footer', '' );

Primary documentation

https://github.com/apermo/wordpress-develop/blob/trunk/src/wp-admin/admin-footer.php#L71-L78

Activity

  1. apermo commented on Mar 8, 2026

    @apermo
    OwnerAuthor

    Not in repo — src/wp-includes/build/ is not tracked in wordpress-develop.

  2. added
    wontfixAcknowledged but not worth the review effort
    on Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixAcknowledged but not worth the review effort

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions