Changeset 4236 for trunk/bbp-admin/bbp-users.php
- Timestamp:
- 10/09/2012 06:52:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbp-admin/bbp-users.php
r4222 r4236 48 48 49 49 // Admin styles 50 add_action( 'admin_head', 50 add_action( 'admin_head', array( $this, 'admin_head' ) ); 51 51 52 52 // User profile edit/display actions 53 add_action( 'edit_user_profile', array( $this, 'user_profile_forums' ) ); 54 55 // User profile save actions 56 add_action( 'edit_user_profile_update', array( $this, 'user_profile_update' ) ); 53 add_action( 'edit_user_profile', array( $this, 'user_profile_forums' ) ); 57 54 58 55 // Noop WordPress additional caps output area … … 70 67 * @uses sanitize_html_class() To sanitize the classes 71 68 */ 72 public function admin_head() { 69 public function admin_head() { 73 70 ?> 74 71 … … 80 77 vertical-align: top; 81 78 } 82 79 83 80 div.bbp-user-capabilities h4 { 84 81 margin: 0 0 10px; 85 82 } 86 83 87 84 p.bbp-default-caps-wrapper { 88 85 clear: both; … … 100 97 * @since bbPress (r2464) 101 98 * 102 * @param $user_id The user id103 * @uses do_action() Calls 'bbp_user_profile_update'104 * @return bool Always false105 */106 public function user_profile_update( $user_id ) {107 108 // Bail if no user109 if ( empty( $user_id ) )110 return;111 112 // Either reset caps for role113 if ( ! empty( $_POST['bbp-default-caps'] ) ) {114 bbp_reset_user_caps( $user_id );115 116 // Or set caps individually117 } else {118 bbp_save_user_caps( $user_id );119 }120 }121 122 /**123 * Responsible for saving additional profile options and settings124 *125 * @since bbPress (r2464)126 *127 99 * @param WP_User $profileuser User data 128 100 * @uses do_action() Calls 'bbp_user_profile_forums' 129 101 * @return bool Always false 130 102 */ 131 public function user_profile_forums( $profileuser ) { 103 public function user_profile_forums( $profileuser ) { 132 104 133 105 // Bail if current user cannot edit users
Note: See TracChangeset
for help on using the changeset viewer.