From 2629cd9e20b19790d70980ac796249c99d4b99fb Mon Sep 17 00:00:00 2001 From: rejaulalomkhan Date: Mon, 1 Dec 2025 17:19:03 +0600 Subject: [PATCH 1/2] docs: Add missing parameter descriptions to docblocks --- src/wp-admin/includes/ajax-actions.php | 4 ++-- src/wp-admin/includes/class-wp-importer.php | 6 +++--- src/wp-admin/install.php | 4 ++-- src/wp-admin/nav-menus.php | 8 +++++--- src/wp-admin/update-core.php | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index c3955b6d77cc6..79f291e3cf3bc 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -454,8 +454,8 @@ function wp_ajax_logged_in() { * @since 2.7.0 * @access private * - * @param int $comment_id - * @param int $delta + * @param int $comment_id Comment ID. + * @param int $delta Change in the number of total comments. Default -1. */ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { $total = isset( $_POST['_total'] ) ? (int) $_POST['_total'] : 0; diff --git a/src/wp-admin/includes/class-wp-importer.php b/src/wp-admin/includes/class-wp-importer.php index 8489919f8a5e2..7157babf491e9 100644 --- a/src/wp-admin/includes/class-wp-importer.php +++ b/src/wp-admin/includes/class-wp-importer.php @@ -289,9 +289,9 @@ public function stop_the_insanity() { * Returns value of command line params. * Exits when a required param is not set. * - * @param string $param - * @param bool $required - * @return mixed + * @param string $param The parameter name to retrieve. + * @param bool $required Whether the parameter is required. Default false. + * @return mixed The parameter value if found, null otherwise. */ function get_cli_args( $param, $required = false ) { $args = $_SERVER['argv']; diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index 64cb4104c41ae..8556c31823ec4 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -52,7 +52,7 @@ * * @since 2.5.0 * - * @param string $body_classes + * @param string $body_classes CSS classes to add to the body tag. */ function display_header( $body_classes = '' ) { header( 'Content-Type: text/html; charset=utf-8' ); @@ -85,7 +85,7 @@ function display_header( $body_classes = '' ) { * * @global wpdb $wpdb WordPress database abstraction object. * - * @param string|null $error + * @param string|null $error Error message to display, if any. */ function display_setup_form( $error = null ) { global $wpdb; diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php index 5b1a48c123ab2..d2e997b04326a 100644 --- a/src/wp-admin/nav-menus.php +++ b/src/wp-admin/nav-menus.php @@ -672,12 +672,14 @@ } /** + * Adds a CSS class to display the max depth of the navigation menu. + * * @since 3.0.0 * - * @global int $_wp_nav_menu_max_depth + * @global int $_wp_nav_menu_max_depth Maximum depth of the navigation menu. * - * @param string $classes - * @return string + * @param string $classes Existing CSS classes for the body tag. + * @return string Modified CSS classes including the menu max depth class. */ function wp_nav_menu_max_depth( $classes ) { global $_wp_nav_menu_max_depth; diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 308f7e661fb3e..b892d7e9f6c85 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -840,7 +840,7 @@ function list_translation_updates() { * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * - * @param bool $reinstall + * @param bool $reinstall Optional. Whether to reinstall WordPress. Default false. */ function do_core_upgrade( $reinstall = false ) { global $wp_filesystem; From 862daeb4c6a9e295be08e96fee5f1d38a499b1d4 Mon Sep 17 00:00:00 2001 From: Rejaul Alom Khan <123895004+rejaulalomkhan@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:21:36 +0600 Subject: [PATCH 2/2] Update src/wp-admin/includes/class-wp-importer.php Co-authored-by: Huzaifa Al Mesbah --- src/wp-admin/includes/class-wp-importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-importer.php b/src/wp-admin/includes/class-wp-importer.php index 7157babf491e9..c9130c53e2999 100644 --- a/src/wp-admin/includes/class-wp-importer.php +++ b/src/wp-admin/includes/class-wp-importer.php @@ -291,7 +291,7 @@ public function stop_the_insanity() { * * @param string $param The parameter name to retrieve. * @param bool $required Whether the parameter is required. Default false. - * @return mixed The parameter value if found, null otherwise. + * @return string|bool|null The parameter value or true if found, null otherwise. */ function get_cli_args( $param, $required = false ) { $args = $_SERVER['argv'];