From a30a1efac492339fcbd8ddae89f670beb8c0be39 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 17 Apr 2022 14:30:13 +0000 Subject: [PATCH] Docs: Add missing documentation for `add_cssclass()` and `add_menu_classes()`. Follow-up to [9578], [53193]. See #54729. Built from https://develop.svn.wordpress.org/trunk@53194 git-svn-id: http://core.svn.wordpress.org/trunk@52783 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/menu.php | 23 ++++++++++++++++------- wp-includes/version.php | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/menu.php b/wp-admin/includes/menu.php index 6cb474b38d..27dd91540b 100644 --- a/wp-admin/includes/menu.php +++ b/wp-admin/includes/menu.php @@ -187,9 +187,13 @@ foreach ( $menu as $id => $data ) { unset( $id, $data, $subs, $first_sub ); /** - * @param string $class_to_add - * @param string $classes - * @return string + * Adds a CSS class to a string. + * + * @since 2.7.0 + * + * @param string $class_to_add The CSS class to add. + * @param string $classes The string to add the CSS class to. + * @return string The string with the CSS class added. */ function add_cssclass( $class_to_add, $classes ) { if ( empty( $classes ) ) { @@ -200,8 +204,14 @@ function add_cssclass( $class_to_add, $classes ) { } /** - * @param array $menu - * @return array + * Adds CSS classes for top-level administration menu items. + * + * The list of added classes includes `.menu-top-first` and `.menu-top-last`. + * + * @since 2.7.0 + * + * @param array $menu The array of administration menu items. + * @return array The array of administration menu items with the CSS classes added. */ function add_menu_classes( $menu ) { $first = false; @@ -239,7 +249,7 @@ function add_menu_classes( $menu ) { } /** - * Filters administration menus array with classes added for top-level items. + * Filters administration menu array with classes added for top-level items. * * @since 2.7.0 * @@ -354,4 +364,3 @@ if ( ! user_can_access_admin_page() ) { } $menu = add_menu_classes( $menu ); - \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 491cd04fe4..c5dc5cc5b1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta1-53193'; +$wp_version = '6.0-beta1-53194'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.