/** * Get the link to the Edited By Me tab of the logged in user * * @package BuddyPress_Docs * @since 1.2 */ function bp_docs_get_mydocs_edited_link() { return apply_filters('bp_docs_get_mydocs_edited_link', trailingslashit(bp_docs_get_mydocs_link() . BP_DOCS_EDITED_SLUG)); }
/** * Sets up Docs menu under My Account toolbar * * @since 1.3 */ public function setup_admin_bar($wp_admin_nav = array()) { global $bp; $wp_admin_nav = array(); if (is_user_logged_in()) { $title = bp_docs_get_user_tab_name(); // Add the "My Account" sub menus $wp_admin_nav[] = array('parent' => $bp->my_account_menu_id, 'id' => 'my-account-' . $this->id, 'title' => $title, 'href' => bp_docs_get_mydocs_link()); $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-started', 'title' => __('Started By Me', 'bp-docs'), 'href' => bp_docs_get_mydocs_started_link()); $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-edited', 'title' => __('Edited By Me', 'bp-docs'), 'href' => bp_docs_get_mydocs_edited_link()); $wp_admin_nav[] = array('parent' => 'my-account-' . $this->id, 'id' => 'my-account-' . $this->id . '-create', 'title' => __('Create New Doc', 'bp-docs'), 'href' => bp_docs_get_create_link()); } parent::setup_admin_bar($wp_admin_nav); }