Changeset 10474 for trunk/src/bp-core/bp-core-admin.php
- Timestamp:
- 01/27/2016 08:23:37 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-admin.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-admin.php
r10417 r10474 117 117 */ 118 118 private function includes() { 119 require( $this->admin_dir . 'bp-core-admin-classes.php' ); 119 120 require( $this->admin_dir . 'bp-core-admin-actions.php' ); 120 121 require( $this->admin_dir . 'bp-core-admin-settings.php' ); … … 175 176 add_filter( 'ms_user_row_actions', 'bp_core_admin_user_row_actions', 10, 2 ); 176 177 add_filter( 'user_row_actions', 'bp_core_admin_user_row_actions', 10, 2 ); 178 179 // Emails 180 add_filter( 'bp_admin_menu_order', array( $this, 'emails_admin_menu_order' ), 20 ); 177 181 } 178 182 … … 296 300 ); 297 301 298 // Fudge the highlighted subnav item when on a BuddyPress admin page. 302 $hooks[] = add_theme_page( 303 _x( 'Emails', 'screen heading', 'buddypress' ), 304 _x( 'Emails', 'screen heading', 'buddypress' ), 305 $this->capability, 306 'bp-emails-customizer-redirect', 307 'bp_email_redirect_to_customizer' 308 ); 309 299 310 foreach( $hooks as $hook ) { 300 311 add_action( "admin_head-$hook", 'bp_core_modify_admin_menu_highlight' ); … … 768 779 <a href="https://bbpress.org">bbPress</a>, 769 780 <a href="https://github.com/ichord/Caret.js">Caret.js</a>, 781 <a href="http://tedgoas.github.io/Cerberus/">Cerberus</a>, 770 782 <a href="https://github.com/carhartl/jquery-cookie">jquery.cookie</a>, 771 783 <a href="https://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a>, … … 874 886 // Done! 875 887 return $display; 888 } 889 890 /** 891 * Add Emails menu item to custom menus array. 892 * 893 * Several BuddyPress components have top-level menu items in the Dashboard, 894 * which all appear together in the middle of the Dashboard menu. This function 895 * adds the Emails screen to the array of these menu items. 896 * 897 * @since 2.4.0 898 * 899 * @param array $custom_menus The list of top-level BP menu items. 900 * @return array $custom_menus List of top-level BP menu items, with Emails added. 901 */ 902 public function emails_admin_menu_order( $custom_menus = array() ) { 903 array_push( $custom_menus, 'edit.php?post_type=' . bp_get_email_post_type() ); 904 return $custom_menus; 876 905 } 877 906
Note: See TracChangeset
for help on using the changeset viewer.