Example #1
0
    public function user_tab_name_setting_markup()
    {
        $name = bp_docs_get_user_tab_name();
        ?>
		<input name="bp-docs-user-tab-name" id="bp-docs-user-tab-name" type="text" value="<?php 
        echo esc_html($name);
        ?>
" />
		<p class="description"><?php 
        _e("Change the word on users' Docs tabs from 'Docs' to whatever you'd like. Keep in mind that this will not change the text anywhere else on the page. For a more thorough text change, create a <a href='http://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/'>language file</a> for BuddyPress Docs.", 'bp-docs');
        ?>
</p>

		<?php 
    }
Example #2
0
 /**
  * Creates component navigation (Member > Docs)
  *
  * @since 1.2
  * @todo Make the 'Docs' label customizable by the admin
  */
 function setup_nav($main_nav = array(), $sub_nav = array())
 {
     $main_nav = array('name' => bp_docs_get_user_tab_name(), 'slug' => bp_docs_get_docs_slug(), 'position' => 80, 'screen_function' => array(&$this, 'template_loader'), 'default_subnav_slug' => BP_DOCS_STARTED_SLUG);
     $parent_url = trailingslashit(bp_displayed_user_domain() . bp_docs_get_docs_slug());
     $mydocs_label = bp_is_my_profile() ? __('My Docs ', 'bp-docs') : sprintf(__('%s&#8217;s Docs'), bp_get_user_firstname(bp_get_displayed_user_fullname()));
     $sub_nav[] = array('name' => bp_is_my_profile() ? __('Started By Me', 'bp-docs') : sprintf(__('Started By %s', 'bp-docs'), bp_get_user_firstname()), 'slug' => BP_DOCS_STARTED_SLUG, 'parent_url' => $parent_url, 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array(&$this, 'template_loader'), 'position' => 10);
     $sub_nav[] = array('name' => bp_is_my_profile() ? __('Edited By Me', 'bp-docs') : sprintf(__('Edited By %s', 'bp-docs'), bp_get_user_firstname()), 'slug' => BP_DOCS_EDITED_SLUG, 'parent_url' => $parent_url, 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array(&$this, 'template_loader'), 'position' => 20);
     parent::setup_nav($main_nav, $sub_nav);
 }