Make WordPress Core

Changeset 53194


Ignore:
Timestamp:
04/17/2022 02:28:24 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Add missing documentation for add_cssclass() and add_menu_classes().

Follow-up to [9578], [53193].

See #54729.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/menu.php

    r53193 r53194  
    188188
    189189/**
    190  * @param string $class_to_add
    191  * @param string $classes
    192  * @return string
     190 * Adds a CSS class to a string.
     191 *
     192 * @since 2.7.0
     193 *
     194 * @param string $class_to_add The CSS class to add.
     195 * @param string $classes      The string to add the CSS class to.
     196 * @return string The string with the CSS class added.
    193197 */
    194198function add_cssclass( $class_to_add, $classes ) {
     
    201205
    202206/**
    203  * @param array $menu
    204  * @return array
     207 * Adds CSS classes for top-level administration menu items.
     208 *
     209 * The list of added classes includes `.menu-top-first` and `.menu-top-last`.
     210 *
     211 * @since 2.7.0
     212 *
     213 * @param array $menu The array of administration menu items.
     214 * @return array The array of administration menu items with the CSS classes added.
    205215 */
    206216function add_menu_classes( $menu ) {
     
    240250
    241251    /**
    242      * Filters administration menus array with classes added for top-level items.
     252     * Filters administration menu array with classes added for top-level items.
    243253     *
    244254     * @since 2.7.0
     
    355365
    356366$menu = add_menu_classes( $menu );
    357                        
Note: See TracChangeset for help on using the changeset viewer.