WordPress.org

Make WordPress Core

Ticket #53399: 53399-adminbar-docblocks.diff

File 53399-adminbar-docblocks.diff, 8.0 KB (added by audrasjb, 2 months ago)

Docs: Toolbar: Miscellaneous docblock corrections and improvements.

  • src/wp-includes/admin-bar.php

    diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php
    index b35a49fe1a..ba85e1f1ae 100644
    a b  
    88 */
    99
    1010/**
    11  * Instantiate the admin bar object and set it up as a global for access elsewhere.
     11 * Instantiates the admin bar object and set it up as a global for access elsewhere.
    1212 *
    1313 * UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR.
    1414 * For that, use show_admin_bar(false) or the {@see 'show_admin_bar'} filter.
    function wp_admin_bar_render() { 
    8484        }
    8585
    8686        /**
    87          * Load all necessary admin bar items.
     87         * Loads all necessary admin bar items.
    8888         *
    8989         * This is the hook used to add, remove, or manipulate admin bar items.
    9090         *
    9191         * @since 3.1.0
    9292         *
    93          * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference
     93         * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance, passed by reference.
    9494         */
    9595        do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );
    9696
    function wp_admin_bar_render() { 
    114114}
    115115
    116116/**
    117  * Add the WordPress logo menu.
     117 * Adds the WordPress logo menu.
    118118 *
    119119 * @since 3.3.0
    120120 *
    121  * @param WP_Admin_Bar $wp_admin_bar
     121 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    122122 */
    123123function wp_admin_bar_wp_menu( $wp_admin_bar ) {
    124124        if ( current_user_can( 'read' ) ) {
    function wp_admin_bar_wp_menu( $wp_admin_bar ) { 
    198198}
    199199
    200200/**
    201  * Add the sidebar toggle button.
     201 * Adds the sidebar toggle button.
    202202 *
    203203 * @since 3.8.0
    204204 *
    205  * @param WP_Admin_Bar $wp_admin_bar
     205 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    206206 */
    207207function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) {
    208208        if ( is_admin() ) {
    function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) { 
    217217}
    218218
    219219/**
    220  * Add the "My Account" item.
     220 * Adds the "My Account" item.
    221221 *
    222222 * @since 3.3.0
    223223 *
    224  * @param WP_Admin_Bar $wp_admin_bar
     224 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    225225 */
    226226function wp_admin_bar_my_account_item( $wp_admin_bar ) {
    227227        $user_id      = get_current_user_id();
    function wp_admin_bar_my_account_item( $wp_admin_bar ) { 
    258258}
    259259
    260260/**
    261  * Add the "My Account" submenu items.
     261 * Adds the "My Account" submenu items.
    262262 *
    263263 * @since 3.1.0
    264264 *
    265  * @param WP_Admin_Bar $wp_admin_bar
     265 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    266266 */
    267267function wp_admin_bar_my_account_menu( $wp_admin_bar ) {
    268268        $user_id      = get_current_user_id();
    function wp_admin_bar_my_account_menu( $wp_admin_bar ) { 
    328328}
    329329
    330330/**
    331  * Add the "Site Name" menu.
     331 * Adds the "Site Name" menu.
    332332 *
    333333 * @since 3.3.0
    334334 *
    335  * @param WP_Admin_Bar $wp_admin_bar
     335 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    336336 */
    337337function wp_admin_bar_site_menu( $wp_admin_bar ) {
    338338        // Don't show for logged out users.
    function wp_admin_bar_site_menu( $wp_admin_bar ) { 
    413413 *
    414414 * @since 4.3.0
    415415 *
    416  * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
     416 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    417417 * @global WP_Customize_Manager $wp_customize
    418418 */
    419419function wp_admin_bar_customize_menu( $wp_admin_bar ) {
    function wp_admin_bar_customize_menu( $wp_admin_bar ) { 
    455455}
    456456
    457457/**
    458  * Add the "My Sites/[Site Name]" menu and all submenus.
     458 * Adds the "My Sites/[Site Name]" menu and all submenus.
    459459 *
    460460 * @since 3.1.0
    461461 *
    462  * @param WP_Admin_Bar $wp_admin_bar
     462 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    463463 */
    464464function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
    465465        // Don't show for logged out users or single site mode.
    function wp_admin_bar_my_sites_menu( $wp_admin_bar ) { 
    665665}
    666666
    667667/**
    668  * Provide a shortlink.
     668 * Provides a shortlink.
    669669 *
    670670 * @since 3.1.0
    671671 *
    672  * @param WP_Admin_Bar $wp_admin_bar
     672 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    673673 */
    674674function wp_admin_bar_shortlink_menu( $wp_admin_bar ) {
    675675        $short = wp_get_shortlink( 0, 'query' );
    function wp_admin_bar_shortlink_menu( $wp_admin_bar ) { 
    692692}
    693693
    694694/**
    695  * Provide an edit link for posts and terms.
     695 * Provides an edit link for posts and terms.
    696696 *
    697697 * @since 3.1.0
    698698 * @since 5.5.0 Added a "View Post" link on Comments screen for a single post.
    function wp_admin_bar_shortlink_menu( $wp_admin_bar ) { 
    703703 *                                global $user_ID, which contains the ID of the current user.
    704704 * @global int      $post_id      The ID of the post when editing comments for a single post.
    705705 *
    706  * @param WP_Admin_Bar $wp_admin_bar
     706 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    707707 */
    708708function wp_admin_bar_edit_menu( $wp_admin_bar ) {
    709709        global $tag, $wp_the_query, $user_id, $post_id;
    function wp_admin_bar_edit_menu( $wp_admin_bar ) { 
    836836}
    837837
    838838/**
    839  * Add "Add New" menu.
     839 * Adds "Add New" menu.
    840840 *
    841841 * @since 3.1.0
    842842 *
    843  * @param WP_Admin_Bar $wp_admin_bar
     843 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    844844 */
    845845function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
    846846        $actions = array();
    function wp_admin_bar_new_content_menu( $wp_admin_bar ) { 
    912912}
    913913
    914914/**
    915  * Add edit comments link with awaiting moderation count bubble.
     915 * Adds edit comments link with awaiting moderation count bubble.
    916916 *
    917917 * @since 3.1.0
    918918 *
    919  * @param WP_Admin_Bar $wp_admin_bar
     919 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    920920 */
    921921function wp_admin_bar_comments_menu( $wp_admin_bar ) {
    922922        if ( ! current_user_can( 'edit_posts' ) ) {
    function wp_admin_bar_comments_menu( $wp_admin_bar ) { 
    945945}
    946946
    947947/**
    948  * Add appearance submenu items to the "Site Name" menu.
     948 * Adds appearance submenu items to the "Site Name" menu.
    949949 *
    950950 * @since 3.1.0
    951951 *
    952  * @param WP_Admin_Bar $wp_admin_bar
     952 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    953953 */
    954954function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
    955955        $wp_admin_bar->add_group(
    function wp_admin_bar_appearance_menu( $wp_admin_bar ) { 
    10271027}
    10281028
    10291029/**
    1030  * Provide an update link if theme/plugin/core updates are available.
     1030 * Provides an update link if theme/plugin/core updates are available.
    10311031 *
    10321032 * @since 3.1.0
    10331033 *
    1034  * @param WP_Admin_Bar $wp_admin_bar
     1034 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    10351035 */
    10361036function wp_admin_bar_updates_menu( $wp_admin_bar ) {
    10371037
    function wp_admin_bar_updates_menu( $wp_admin_bar ) { 
    10611061}
    10621062
    10631063/**
    1064  * Add search form.
     1064 * Adds search form.
    10651065 *
    10661066 * @since 3.3.0
    10671067 *
    1068  * @param WP_Admin_Bar $wp_admin_bar
     1068 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    10691069 */
    10701070function wp_admin_bar_search_menu( $wp_admin_bar ) {
    10711071        if ( is_admin() ) {
    function wp_admin_bar_search_menu( $wp_admin_bar ) { 
    10921092}
    10931093
    10941094/**
    1095  * Add a link to exit recovery mode when Recovery Mode is active.
     1095 * Adds a link to exit recovery mode when Recovery Mode is active.
    10961096 *
    10971097 * @since 5.2.0
    10981098 *
    1099  * @param WP_Admin_Bar $wp_admin_bar
     1099 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    11001100 */
    11011101function wp_admin_bar_recovery_mode_menu( $wp_admin_bar ) {
    11021102        if ( ! wp_is_recovery_mode() ) {
    function wp_admin_bar_recovery_mode_menu( $wp_admin_bar ) { 
    11181118}
    11191119
    11201120/**
    1121  * Add secondary menus.
     1121 * Adds secondary menus.
    11221122 *
    11231123 * @since 3.3.0
    11241124 *
    1125  * @param WP_Admin_Bar $wp_admin_bar
     1125 * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
    11261126 */
    11271127function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) {
    11281128        $wp_admin_bar->add_group(
    function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) { 
    11461146}
    11471147
    11481148/**
    1149  * Style and scripts for the admin bar.
     1149 * Prints style and scripts for the admin bar.
    11501150 *
    11511151 * @since 3.1.0
    11521152 */
    function wp_admin_bar_header() { 
    11581158}
    11591159
    11601160/**
    1161  * Default admin bar callback.
     1161 * Prints default admin bar callback.
    11621162 *
    11631163 * @since 3.1.0
    11641164 */
    function is_admin_bar_showing() { 
    12461246}
    12471247
    12481248/**
    1249  * Retrieve the admin bar display preference of a user.
     1249 * Retrieves the admin bar display preference of a user.
    12501250 *
    12511251 * @since 3.1.0
    12521252 * @access private