- 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-ms-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 } … … 86 86 87 87 /** 88 * Get the views : the links above the WP List Table. 89 * 90 * @since 2.0.0 91 * 92 * @uses WP_MS_Users_List_Table::get_views() to get the users views. 93 */ 94 public function get_views() { 95 return parent::get_views(); 88 * Display the users screen views 89 * 90 * @since 2.5.0 91 * 92 * @global string $role The name of role the users screens is filtered by 93 */ 94 public function views() { 95 global $role; 96 97 // Used to reset the role 98 $reset_role = $role; 99 100 // Temporarly set the role to registered 101 $role = 'registered'; 102 103 // Used to reset the screen id once views are displayed 104 $reset_screen_id = $this->screen->id; 105 106 // Temporarly set the screen id to the users one 107 $this->screen->id = 'users-network'; 108 109 // Use the parent function so that other plugins can safely add views 110 parent::views(); 111 112 // Reset the role 113 $role = $reset_role; 114 115 // Reset the screen id 116 $this->screen->id = $reset_screen_id; 96 117 } 97 118
Note: See TracChangeset
for help on using the changeset viewer.