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
This commit is contained in:
Sergey Biryukov 2022-04-17 14:30:13 +00:00
parent f6b7a1fd7a
commit a30a1efac4
2 changed files with 17 additions and 8 deletions

View File

@ -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 );

View File

@ -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.