@@ -122,7 +122,7 @@ public function admin_render_profile_fields( WP_User $user ) {
122
122
/**
123
123
* Save team list profile fields.
124
124
*
125
- * @param int $user_id ID of the user currently being edited .
125
+ * @param int $user_id The current user's ID .
126
126
*/
127
127
public function admin_save_profile_fields ( $ user_id ) {
128
128
if ( ! current_user_can ( 'edit_user ' , $ user_id ) ) {
@@ -143,18 +143,14 @@ public function admin_save_profile_fields( $user_id ) {
143
143
*
144
144
* @param string $val The current column value.
145
145
* @param string $column_name Name of the current column.
146
- * @param int $user_id ID of the current user.
147
- * @return string
146
+ * @param int $user_id The current user's ID .
147
+ * @return string The column content. Either 'Visible' or 'Hidden'.
148
148
*/
149
149
public function admin_add_visibility_column_content ( $ val , $ column_name , $ user_id ) {
150
150
$ visibility = get_user_meta ( $ user_id , 'rplus_wp_team_list_visibility ' , true );
151
151
152
- if ( 'rplus_wp_team_list_visibility ' === $ column_name ) {
153
- $ val = __ ( 'Visible ' , 'wp-team-list ' );
154
-
155
- if ( 'hidden ' === $ visibility ) {
156
- $ val = __ ( 'Hidden ' , 'wp-team-list ' );
157
- }
152
+ if ( 'wp_team_list_visibility ' === $ column_name ) {
153
+ return ( 'hidden ' === $ visibility ) ? __ ( 'Hidden ' , 'wp-team-list ' ) : __ ( 'Visible ' , 'wp-team-list ' );
158
154
}
159
155
160
156
return $ val ;
@@ -167,7 +163,7 @@ public function admin_add_visibility_column_content( $val, $column_name, $user_i
167
163
* @return array The modified columns list.
168
164
*/
169
165
public function admin_add_visibility_column ( $ columns ) {
170
- $ columns ['rplus_wp_team_list_visibility ' ] = __ ( 'Team List ' , 'wp-team-list ' );
166
+ $ columns ['wp_team_list_visibility ' ] = __ ( 'Team List ' , 'wp-team-list ' );
171
167
172
168
return $ columns ;
173
169
}
@@ -276,7 +272,7 @@ protected function load_template( WP_User $user, $template = 'rplus-wp-team-list
276
272
_deprecated_argument (
277
273
__FUNCTION__ ,
278
274
'2.0.0 ' ,
279
- printf ( __ ( 'Use the %s filter instead. ' , 'wp-team-list ' ), '<code>rplus_wp_team_list_template </code> ' )
275
+ printf ( __ ( 'Use the %s filter instead. ' , 'wp-team-list ' ), '<code>wp_team_list_template </code> ' )
280
276
);
281
277
}
282
278
@@ -506,6 +502,12 @@ public function filter_mce_css( $stylesheets ) {
506
502
* @return false|string User avatar or false on failure.
507
503
*/
508
504
public function get_avatar ( WP_User $ user ) {
505
+ /**
506
+ * Filter the team list avatar size.
507
+ *
508
+ * @param int $size Avatar size. Default 50.
509
+ * @param WP_User $user Current user object.
510
+ */
509
511
$ size = apply_filters ( 'wp_team_list_avatar_size ' , 90 , $ user );
510
512
511
513
return get_avatar ( $ user ->ID , $ size );
0 commit comments