Make WordPress Core

Changeset 32534


Ignore:
Timestamp:
05/21/2015 09:38:41 PM (11 years ago)
Author:
wonderboymusic
Message:

In class-wp-admin-bar.php, clarify/add some doc blocks.

See #32444.

File:
1 edited

Legend:

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

    r31955 r32534  
    1313        public $user;
    1414
     15        /**
     16         * @param string $name
     17         * @return string|array|null
     18         */
    1519        public function __get( $name ) {
    1620                switch ( $name ) {
     
    7074        }
    7175
     76        /**
     77         * @param array $node
     78         */
    7279        public function add_menu( $node ) {
    7380                $this->add_node( $node );
    7481        }
    7582
     83        /**
     84         * @param string $id
     85         */
    7686        public function remove_menu( $id ) {
    7787                $this->remove_node( $id );
     
    144154        }
    145155
     156        /**
     157         * @param array $args
     158         */
    146159        final protected function _set_node( $args ) {
    147160                $this->nodes[ $args['id'] ] = (object) $args;
     
    151164         * Gets a node.
    152165         *
     166         * @param string $id
    153167         * @return object Node.
    154168         */
     
    158172        }
    159173
     174        /**
     175         * @param string $id
     176         * @return object|null
     177         */
    160178        final protected function _get_node( $id ) {
    161179                if ( $this->bound )
     
    169187        }
    170188
     189        /**
     190         * @return array|null
     191         */
    171192        final public function get_nodes() {
    172193                if ( ! $nodes = $this->_get_nodes() )
     
    179200        }
    180201
     202        /**
     203         * @return array|null
     204         */
    181205        final protected function _get_nodes() {
    182206                if ( $this->bound )
     
    209233         * Remove a node.
    210234         *
    211          * @param string The ID of the item.
     235         * @param string $id The ID of the item.
    212236         */
    213237        public function remove_node( $id ) {
     
    215239        }
    216240
     241        /**
     242         * @param string $id
     243         */
    217244        final protected function _unset_node( $id ) {
    218245                unset( $this->nodes[ $id ] );
     
    225252        }
    226253
     254        /**
     255         * @return object|null
     256         */
    227257        final protected function _bind() {
    228258                if ( $this->bound )
     
    346376        }
    347377
     378        /**
     379         *
     380         * @global bool $is_IE
     381         * @param object $root
     382         */
    348383        final protected function _render( $root ) {
    349384                global $is_IE;
     
    381416        }
    382417
     418        /**
     419         * @param object $node
     420         */
    383421        final protected function _render_container( $node ) {
    384422                if ( $node->type != 'container' || empty( $node->children ) )
     
    392430        }
    393431
     432        /**
     433         * @param object $node
     434         */
    394435        final protected function _render_group( $node ) {
    395                 if ( $node->type == 'container' )
    396                         return $this->_render_container( $node );
    397 
     436                if ( $node->type == 'container' ) {
     437                        $this->_render_container( $node );
     438                        return;
     439                }
    398440                if ( $node->type != 'group' || empty( $node->children ) )
    399441                        return;
     
    411453        }
    412454
     455        /**
     456         * @param object $node
     457         */
    413458        final protected function _render_item( $node ) {
    414459                if ( $node->type != 'item' )
     
    483528        }
    484529
     530        /**
     531         * @param string $id    Unused.
     532         * @param object $node
     533         */
    485534        public function recursive_render( $id, $node ) {
    486535                _deprecated_function( __METHOD__, '3.3', 'WP_Admin_bar::render(), WP_Admin_Bar::_render_item()' );
Note: See TracChangeset for help on using the changeset viewer.