Make WordPress Core

Opened 3 years ago

Closed 20 months ago

#45849 closed defect (bug) (fixed)

Missing @return statement in function

Reported by: subrataemfluence Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.0.2
Component: Plugins Keywords: needs-patch
Focuses: docs, coding-standards Cc:


Are we already tracking the following or fixed already?

If not, get_admin_page_parent function in wp-admin/includes/plugin.php has no return type specified in its Doc block.

Also, it does not have a signature for $parent argument in Doc block as well.

I think the Doc block may be rewritten in the following manner:

 * @global string $parent_file
 * @global array $menu
 * @global array $submenu
 * @global string $pagenow
 * @global string $typenow
 * @global string $plugin_page
 * @global array $_wp_real_parent_file
 * @global array $_wp_menu_nopriv
 * @global array $_wp_submenu_nopriv
 * $parent string. Name of admin page parent. Default is empty when current page has no parent.
 * @return string.

 function get_admin_page_parent( $parent = '' ) {

Attachments (1)

45849.diff (533 bytes) - added by subrataemfluence 3 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
3 years ago

  • Keywords needs-patch added; dev-feedback removed

@return tag was added in [45085], though it would also benefit from a description.

@param tag is still missing.

#2 @SergeyBiryukov
20 months ago

  • Milestone changed from Awaiting Review to 5.5

#3 @SergeyBiryukov
20 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 47546:

Docs: Add documentation for the $parent parameter of get_admin_page_parent().

Props subrataemfluence.
Fixes #45849.

Note: See TracTickets for help on using tickets.