WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn

Idn::validateBidiLabel() private Yoast 1.0

{} Это метод класса: Idn{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$result = Idn::validateBidiLabel( $label, \YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Info $info );
$label(строка) (обязательный)

Заметки

Код Idn::validateBidiLabel() Yoast 15.1.1

<?php
private static function validateBidiLabel($label, \YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Info $info)
{
    if (1 === \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::RTL_LABEL, $label)) {
        $info->bidiDomain = \true;
        // Step 1. The first character must be a character with Bidi property L, R, or AL.
        // If it has the R or AL property, it is an RTL label
        if (1 !== \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_1_RTL, $label)) {
            $info->validBidiDomain = \false;
            return;
        }
        // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES,
        // CS, ET, ON, BN, or NSM are allowed.
        if (1 === \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_2, $label)) {
            $info->validBidiDomain = \false;
            return;
        }
        // Step 3. In an RTL label, the end of the label must be a character with Bidi property
        // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM.
        if (1 !== \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_3, $label)) {
            $info->validBidiDomain = \false;
            return;
        }
        // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa.
        if (1 === \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_4_AN, $label) && 1 === \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_4_EN, $label)) {
            $info->validBidiDomain = \false;
            return;
        }
        return;
    }
    // We are a LTR label
    // Step 1. The first character must be a character with Bidi property L, R, or AL.
    // If it has the L property, it is an LTR label.
    if (1 !== \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_1_LTR, $label)) {
        $info->validBidiDomain = \false;
        return;
    }
    // Step 5. In an LTR label, only characters with the Bidi properties L, EN,
    // ES, CS, ET, ON, BN, or NSM are allowed.
    if (1 === \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_5, $label)) {
        $info->validBidiDomain = \false;
        return;
    }
    // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or
    // EN, followed by zero or more characters with Bidi property NSM.
    if (1 !== \preg_match(\YoastSEO_Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex::BIDI_STEP_6, $label)) {
        $info->validBidiDomain = \false;
        return;
    }
}