Yoast_Input_Validation::set_error_descriptions()
Sets the error descriptions.
Метод класса: Yoast_Input_Validation{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = Yoast_Input_Validation::set_error_descriptions( $descriptions );
- $descriptions(массив)
- An associative array of error descriptions. For each entry, the key must be the setting variable.
По умолчанию: []
Список изменений
С версии 12.1 | Введена. |
Код Yoast_Input_Validation::set_error_descriptions() Yoast Input Validation::set error descriptions Yoast 22.4
public static function set_error_descriptions( $descriptions = [] ) { $defaults = [ 'baiduverify' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Baidu verification codes can only contain letters, numbers, hyphens, and underscores. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'baiduverify' ) ), 'facebook_site' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the Facebook Page URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'facebook_site' ) ), 'googleverify' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Google verification codes can only contain letters, numbers, hyphens, and underscores. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'googleverify' ) ), 'instagram_url' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the Instagram URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'instagram_url' ) ), 'linkedin_url' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the LinkedIn URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'linkedin_url' ) ), 'msverify' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Bing confirmation codes can only contain letters from A to F, numbers, hyphens, and underscores. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'msverify' ) ), 'myspace_url' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the MySpace URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'myspace_url' ) ), 'pinterest_url' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the Pinterest URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'pinterest_url' ) ), 'pinterestverify' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Pinterest confirmation codes can only contain letters from A to F, numbers, hyphens, and underscores. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'pinterestverify' ) ), 'twitter_site' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Twitter usernames can only contain letters, numbers, and underscores. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'twitter_site' ) ), 'wikipedia_url' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the Wikipedia URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'wikipedia_url' ) ), 'yandexverify' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Yandex confirmation codes can only contain letters from A to F, numbers, hyphens, and underscores. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'yandexverify' ) ), 'youtube_url' => sprintf( /* translators: %s: additional message with the submitted invalid value */ esc_html__( 'Please check the format of the YouTube URL you entered. %s', 'wordpress-seo' ), self::get_dirty_value_message( 'youtube_url' ) ), ]; $descriptions = wp_parse_args( $descriptions, $defaults ); self::$error_descriptions = $descriptions; }