Skip to:
Content

bbPress.org

Changeset 5851


Ignore:
Timestamp:
07/15/2015 10:20:32 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Admin: Check that the user can view the About page before adding the toolbar item.

This changeset ensures that only capable users will see the link to bbPress's admin-area "About" page.

Props ocean90. Fixes #2836.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/admin.php

    r5829 r5851  
    535535     */
    536536    public function admin_bar_about_link( $wp_admin_bar ) {
    537         if ( is_user_logged_in() ) {
     537        if ( is_user_logged_in() && current_user_can( 'bbp_about_page' ) ) {
    538538            $wp_admin_bar->add_menu( array(
    539539                'parent' => 'wp-logo',
Note: See TracChangeset for help on using the changeset viewer.