$sanitized, 'search_columns' => array( 'user_login', 'user_nicename' ), 'number' => 1, 'hide_empty' => true, 'fields' => 'ID', ) ); if ( $user->get_results() ) { \add_settings_error( 'activitypub_blog_identifier', 'activitypub_blog_identifier', \esc_html__( 'You cannot use an existing author’s name for the blog profile ID.', 'activitypub' ) ); return Blog::get_default_username(); } return $sanitized; } /** * Get the sanitized value of a constant. * * @param mixed $value The constant value. * * @return string The sanitized value. */ public static function constant_value( $value ) { if ( is_bool( $value ) ) { return $value ? 'true' : 'false'; } if ( is_string( $value ) ) { return esc_attr( $value ); } if ( is_array( $value ) ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r return print_r( $value, true ); } return $value; } }