Unable to translate statuses in users list column
-
In
new-user-approve/includes/user-list.php:140
in public function status_column the user status from DB is just returned as it is. But in order to translate it we need internationalization before the return statement.An example solution is:
public function status_column( $val, $column_name, $user_id ) { switch ( $column_name ) { case 'pw_user_status' : $status = pw_new_user_approve()->get_user_status( $user_id ); if ( $status == 'approved' ) { $status_i18n = __( 'approved', 'new-user-approve' ); } else if ( $status == 'denied' ) { $status_i18n = __( 'denied', 'new-user-approve' ); } else if ( $status == 'pending' ) { $status_i18n = __( 'pending', 'new-user-approve' ); } return $status_i18n; break; default: } return $val; }
similar to
new-user-approve/new-user-approve.php:232
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Unable to translate statuses in users list column’ is closed to new replies.