Skip to:
Content

BuddyPress.org

Changeset 9987


Ignore:
Timestamp:
07/02/2015 07:08:07 PM (9 years ago)
Author:
boonebgorges
Message:

Improve formatting of inline documentation in bp-core-buddybar.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-buddybar.php

    r9819 r9987  
    1717 * @param array $args {
    1818 *     Array describing the new nav item.
    19  *     @type string $name Display name for the nav item.
    20  *     @type string $slug Unique URL slug for the nav item.
    21  *     @type bool|string $item_css_id Optional. 'id' attribute for the nav
    22  *           item. Default: the value of $slug.
    23  *     @type bool $show_for_displayed_user Optional. Whether the nav item
    24  *           should be visible when viewing a member profile other than your
    25  *           own. Default: true.
    26  *     @type bool $site_admin_only Optional. Whether the nav item should be
    27  *           visible only to site admins (those with the 'bp_moderate' cap).
    28  *           Default: false.
    29  *     @type int $position Optional. Numerical index specifying where the item
    30  *           should appear in the nav array. Default: 99.
    31  *     @type callable $screen_function The callback function that will run
    32  *           when the nav item is clicked.
    33  *     @type bool|string $default_subnav_slug Optional. The slug of the default
    34  *           subnav item to select when the nav item is clicked.
     19 *     @type string      $name                    Display name for the nav item.
     20 *     @type string      $slug                    Unique URL slug for the nav item.
     21 *     @type bool|string $item_css_id             Optional. 'id' attribute for the nav item. Default: the value of `$slug`.
     22 *     @type bool        $show_for_displayed_user Optional. Whether the nav item should be visible when viewing a
     23 *                                                member profile other than your own. Default: true.
     24 *     @type bool        $site_admin_only         Optional. Whether the nav item should be visible only to site admins
     25 *                                                (those with the 'bp_moderate' cap). Default: false.
     26 *     @type int         $position                Optional. Numerical index specifying where the item should appear in
     27 *                                                the nav array. Default: 99.
     28 *     @type callable    $screen_function         The callback function that will run when the nav item is clicked.
     29 *     @type bool|string $default_subnav_slug     Optional. The slug of the default subnav item to select when the nav
     30 *                                                item is clicked.
    3531 * }
    3632 * @return bool|null Returns false on failure.
     
    138134 *
    139135 * @param array $args {
    140  *     @type string $parent_slug The slug of the nav item whose default is
    141  *           being changed.
    142  *     @type callable $screen_function The new default callback function that
    143  *           will run when the nav item is clicked.
    144  *     @type string $subnav_slug The slug of the new default subnav item.
     136 *     @type string   $parent_slug     The slug of the nav item whose default is being changed.
     137 *     @type callable $screen_function The new default callback function that will run when the nav item is clicked.
     138 *     @type string   $subnav_slug     The slug of the new default subnav item.
    145139 * }
    146140 */
     
    245239 * @param array $args {
    246240 *     Array describing the new subnav item.
    247  *     @type string $name Display name for the subnav item.
    248  *     @type string $slug Unique URL slug for the subnav item.
    249  *     @type string $parent_slug Slug of the top-level nav item under which the
    250  *           new subnav item should be added.
    251  *     @type string $parent_url URL of the parent nav item.
    252  *     @type bool|string $item_css_id Optional. 'id' attribute for the nav
    253  *           item. Default: the value of $slug.
    254  *     @type bool $user_has_access Optional. True if the logged-in user has
    255  *           access to the subnav item, otherwise false. Can be set dynamically
    256  *           when registering the subnav; eg, use bp_is_my_profile() to restrict
    257  *           access to profile owners only. Default: true.
    258  *     @type bool $site_admin_only Optional. Whether the nav item should be
    259  *           visible only to site admins (those with the 'bp_moderate' cap).
    260  *           Default: false.
    261  *     @type int $position Optional. Numerical index specifying where the item
    262  *           should appear in the subnav array. Default: 90.
    263  *     @type callable $screen_function The callback function that will run
    264  *           when the nav item is clicked.
    265  *     @type string $link Optional. The URL that the subnav item should point
    266  *           to. Defaults to a value generated from the $parent_url + $slug.
    267  *     @type bool $show_in_admin_bar Optional. Whether the nav item should be
    268  *           added into the group's "Edit" Admin Bar menu for group admins.
    269  *           Default: false.
     241 *     @type string      $name              Display name for the subnav item.
     242 *     @type string      $slug              Unique URL slug for the subnav item.
     243 *     @type string      $parent_slug       Slug of the top-level nav item under which the new subnav item should
     244 *                                          be added.
     245 *     @type string      $parent_url        URL of the parent nav item.
     246 *     @type bool|string $item_css_id       Optional. 'id' attribute for the nav item. Default: the value of `$slug`.
     247 *     @type bool        $user_has_access   Optional. True if the logged-in user has access to the subnav item,
     248 *                                          otherwise false. Can be set dynamically when registering the subnav;
     249 *                                          eg, use `bp_is_my_profile()` to restrict access to profile owners only.
     250 *                                          Default: true.
     251 *     @type bool        $site_admin_only   Optional. Whether the nav item should be visible only to site admins
     252 *                                          (those with the 'bp_moderate' cap). Default: false.
     253 *     @type int         $position          Optional. Numerical index specifying where the item should appear in the
     254 *                                          subnav array. Default: 90.
     255 *     @type callable    $screen_function   The callback function that will run when the nav item is clicked.
     256 *     @type string      $link              Optional. The URL that the subnav item should point to. Defaults to a value
     257 *                                          generated from the `$parent_url` + `$slug`.
     258 *     @type bool        $show_in_admin_bar Optional. Whether the nav item should be added into the group's "Edit"
     259 *                                          Admin Bar menu for group admins. Default: false.
    270260 * }
    271261 * @return bool|null Returns false on failure.
     
    364354 * @since BuddyPress (2.1.0)
    365355 *
    366  * @param array $subnav_item The subnav array added to bp_options_nav in
    367  *        bp_core_new_subnav_item().
     356 * @param array $subnav_item The subnav array added to bp_options_nav in `bp_core_new_subnav_item()`.
    368357 * @return array
    369358 */
     
    490479 * @since BuddyPress (1.5.0)
    491480 *
    492  * @param string $nav_item The slug of the top-level nav item whose subnav
    493  *        items you're checking. Default: the current component slug.
    494  * @return bool $has_subnav True if the nav item is found and has subnav
    495  *        items; false otherwise.
     481 * @param string $nav_item The slug of the top-level nav item whose subnav items you're checking.
     482 *                         Default: the current component slug.
     483 * @return bool $has_subnav True if the nav item is found and has subnav items; false otherwise.
    496484 */
    497485function bp_nav_item_has_subnav( $nav_item = '' ) {
     
    509497     *
    510498     * @param bool   $has_subnav Whether or not there is any subnav items.
    511      * @param string $nav_item   The slug of the top-level nav item whose subnav
    512      *                           items you're checking.
     499     * @param string $nav_item   The slug of the top-level nav item whose subnav items you're checking.
    513500     */
    514501    return apply_filters( 'bp_nav_item_has_subnav', $has_subnav, $nav_item );
     
    548535 *
    549536 * @param string $parent_id The slug of the parent navigation item.
    550  * @param string $slug The slug of the subnav item to be removed.
     537 * @param string $slug      The slug of the subnav item to be removed.
    551538 */
    552539function bp_core_remove_subnav_item( $parent_id, $slug ) {
     
    592579 *
    593580 * @param string $context Context of this preference check. 'admin' or 'front'.
    594  * @param int $user Optional. ID of the user to check. Default: 0 (which falls
    595  *        back to the logged-in user's ID).
     581 * @param int    $user    Optional. ID of the user to check. Default: 0 (which falls back to the logged-in user's ID).
    596582 * @return bool True if the toolbar should be showing for this user.
    597583 */
Note: See TracChangeset for help on using the changeset viewer.