WPSEO_Rewrite::convert_encoded_to_upper
Walks through category nicename and convert encoded parts into uppercase using $this->encode_to_upper().
Метод класса: WPSEO_Rewrite{}
Хуков нет.
Возвращает
Строку. The convered URI string.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->convert_encoded_to_upper( $name );
- $name(строка) (обязательный)
- The encoded category URI string.
Код WPSEO_Rewrite::convert_encoded_to_upper() WPSEO Rewrite::convert encoded to upper Yoast 27.3
protected function convert_encoded_to_upper( $name ) {
// Checks if name has any encoding in it.
if ( strpos( $name, '%' ) === false ) {
return $name;
}
$names = explode( '/', $name );
$names = array_map( [ $this, 'encode_to_upper' ], $names );
return implode( '/', $names );
}