Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/08/2014 06:47:36 PM (10 years ago)
Author:
r-a-y
Message:

Remove 'Edit' post link on BuddyPress pages.

Changes in bp_core_load_template() (r8932) to set the post to the current
BP directory page and #5418 to set the post type to 'page' resulted in
showing the "Edit" post link at the bottom of BuddyPress pages and in
the WP Toolbar for users with the 'edit_post' capability.

Since the "Edit" post link does not make sense on BuddyPress pages, this
commit manually removes the 'Edit' post link from rendering on BuddyPress
pages and in the WP Toolbar.

Fixes #5853.

File:
1 edited

Legend:

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

    r8764 r8994  
    4040            )
    4141        ) );
     42
     43        // Remove 'Edit' post link as it's not applicable to BP
     44        // Remove when https://core.trac.wordpress.org/ticket/29538 is addressed
     45        if ( is_buddypress() ) {
     46            $wp_admin_bar->remove_node( 'edit' );
     47        }
    4248    }
    4349}
Note: See TracChangeset for help on using the changeset viewer.