Yoast\WP\SEO\Presenters

Abstract_Indexable_Tag_Presenter::escape_value()protectedYoast 1.0

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() Yoast 22.4

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 );
	}
}