Make WordPress Core


Ignore:
Timestamp:
09/29/2021 01:38:21 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for WP_Admin_Bar methods.

Add some missing descriptions and @since tags.

Follow-up to [15671], [19120], [19429], [19501], [19558], [25475], [25478], [25563], [32534], [35157], [40947], [45821], [48826].

Props yagniksangani, hellofromTonya, audrasjb, sabernhardt, mukesh27, rehanali, SergeyBiryukov.
Fixes #54191.

File:
1 edited

Legend:

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

    r48826 r51876  
    1919
    2020        /**
     21         * @since 3.3.0
     22         *
    2123         * @param string $name
    2224         * @return string|array|void
     
    3436
    3537        /**
     38         * Initializes the admin bar.
     39         *
     40         * @since 3.1.0
    3641         */
    3742        public function initialize() {
     
    8388
    8489        /**
    85          * Add a node (menu item) to the Admin Bar menu.
     90         * Adds a node (menu item) to the admin bar menu.
    8691         *
    8792         * @since 3.3.0
     
    9499
    95100        /**
    96          * Remove a node from the admin bar.
     101         * Removes a node from the admin bar.
    97102         *
    98103         * @since 3.1.0
     
    180185
    181186        /**
     187         * @since 3.3.0
     188         *
    182189         * @param array $args
    183190         */
     
    188195        /**
    189196         * Gets a node.
     197         *
     198         * @since 3.3.0
    190199         *
    191200         * @param string $id
     
    200209
    201210        /**
     211         * @since 3.3.0
     212         *
    202213         * @param string $id
    203214         * @return object|void
     
    218229
    219230        /**
     231         * @since 3.3.0
     232         *
    220233         * @return array|void
    221234         */
     
    233246
    234247        /**
     248         * @since 3.3.0
     249         *
    235250         * @return array|void
    236251         */
     
    244259
    245260        /**
    246          * Add a group to a toolbar menu node.
     261         * Adds a group to a toolbar menu node.
    247262         *
    248263         * Groups can be used to organize toolbar items into distinct sections of a toolbar menu.
     
    268283         * Remove a node.
    269284         *
     285         * @since 3.1.0
     286         *
    270287         * @param string $id The ID of the item.
    271288         */
     
    275292
    276293        /**
     294         * @since 3.3.0
     295         *
    277296         * @param string $id
    278297         */
     
    282301
    283302        /**
     303         * @since 3.1.0
    284304         */
    285305        public function render() {
     
    291311
    292312        /**
     313         * @since 3.3.0
     314         *
    293315         * @return object|void
    294316         */
     
    427449
    428450        /**
     451         * @since 3.3.0
     452         *
    429453         * @param object $root
    430454         */
     
    458482
    459483        /**
     484         * @since 3.3.0
     485         *
    460486         * @param object $node
    461487         */
     
    473499
    474500        /**
     501         * @since 3.3.0
     502         *
    475503         * @param object $node
    476504         */
     
    498526
    499527        /**
     528         * @since 3.3.0
     529         *
    500530         * @param object $node
    501531         */
     
    597627
    598628        /**
     629         * Adds menus to the admin bar.
     630         *
     631         * @since 3.1.0
    599632         */
    600633        public function add_menus() {
Note: See TracChangeset for help on using the changeset viewer.