- Timestamp:
- 02/12/2016 06:22:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-list-table.php
r10547 r10579 38 38 'plural' => 'signups', 39 39 'singular' => 'signup', 40 'screen' => buddypress()->members->admin->users_screen,40 'screen' => get_current_screen()->id, 41 41 ) ); 42 42 } … … 85 85 86 86 /** 87 * Get the views (the links above the WP List Table). 88 * 89 * @since 2.0.0 90 * 91 * @uses WP_Users_List_Table::get_views() to get the users views. 92 */ 93 public function get_views() { 94 return parent::get_views(); 87 * Display the users screen views 88 * 89 * @since 2.5.0 90 * 91 * @global string $role The name of role the users screens is filtered by 92 */ 93 public function views() { 94 global $role; 95 96 // Used to reset the role 97 $reset_role = $role; 98 99 // Temporarly set the role to registered 100 $role = 'registered'; 101 102 // Used to reset the screen id once views are displayed 103 $reset_screen_id = $this->screen->id; 104 105 // Temporarly set the screen id to the users one 106 $this->screen->id = 'users'; 107 108 // Use the parent function so that other plugins can safely add views 109 parent::views(); 110 111 // Reset the role 112 $role = $reset_role; 113 114 // Reset the screen id 115 $this->screen->id = $reset_screen_id; 95 116 } 96 117
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)