Yoast\WP\SEO\User_Meta\Framework\Custom_Meta

Noindex_Author::render_field()publicYoast 1.0

Renders the custom meta's field in the user form.

Метод класса: Noindex_Author{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$Noindex_Author = new Noindex_Author();
$Noindex_Author->render_field( $user_id ): void;
$user_id(int) (обязательный)
The user ID.

Код Noindex_Author::render_field() Yoast 25.1

public function render_field( $user_id ): void {
	echo '

	<input
		class="yoast-settings__checkbox double"
		type="checkbox"
		id="' . \esc_attr( $this->get_field_id() ) . '"
		name="' . \esc_attr( $this->get_field_id() ) . '"
		value="on" '
		. \checked( $this->get_value( $user_id ), 'on', false )
	. '/>';

	echo '

	<label class="yoast-label-strong" for="' . \esc_attr( $this->get_field_id() ) . '">'
		. \esc_html__( 'Do not allow search engines to show this author\'s archives in search results.', 'wordpress-seo' )
	. '</label><br>';
}