Skip to content

Commit

Permalink
Use internal strip_tags helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed May 6, 2024
1 parent 7b6af8d commit 7738727
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/User_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,8 @@ public function create( $args, $assoc_args ) {
if ( is_multisite() ) {
$result = wpmu_validate_user_signup( $user->user_login, $user->user_email );
if ( is_wp_error( $result['errors'] ) && ! empty( $result['errors']->errors ) ) {
$message = $result['errors']->get_error_message();
$message = trim( wp_strip_all_tags( $message ) );
$message = str_replace( 'Error: ', '', $message );
$message = Utils\strip_tags( $result['errors']->get_error_message() );
$message = trim( str_replace( 'Error:', '', $message ) );
WP_CLI::error( $message );
}
$user_id = wpmu_create_user( $user->user_login, $user->user_pass, $user->user_email );
Expand Down

0 comments on commit 7738727

Please sign in to comment.