Yoast\WP\SEO\Presenters
Abstract_Indexable_Tag_Presenter::escape_value
Escaped the output.
Метод класса: Abstract_Indexable_Tag_Presenter{}
Хуков нет.
Возвращает
Строку. The escaped value.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->escape_value( $value );
- $value(строка) (обязательный)
- The desired method of escaping;
'html','url'or'attribute'.
Код Abstract_Indexable_Tag_Presenter::escape_value() Abstract Indexable Tag Presenter::escape value Yoast 27.7
protected function escape_value( $value ) {
switch ( $this->escaping ) {
case 'html':
return \esc_html( $value );
case 'url':
return \esc_url( $value, null, 'attribute' );
case 'attribute':
default:
return \esc_attr( $value );
}
}