Yoast\WP\SEO\User_Meta\Framework\Custom_Meta
Author_Pronouns::render_field
Renders the custom meta's field in the user form.
Метод класса: Author_Pronouns{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$Author_Pronouns = new Author_Pronouns(); $Author_Pronouns->render_field( $user_id ): void;
- $user_id(int) (обязательный)
- The user ID.
Код Author_Pronouns::render_field() Author Pronouns::render field Yoast 28.4
public function render_field( $user_id ): void {
echo '
<label for="' . \esc_attr( $this->get_field_id() ) . '">'
. \esc_html__( 'Pronouns to use', 'wordpress-seo' )
. '</label>';
echo '
<input
class="yoast-settings__text regular-text"
type="text" id="' . \esc_attr( $this->get_field_id() ) . '"
name="' . \esc_attr( $this->get_field_id() ) . '"
value="' . \esc_attr( $this->get_value( $user_id ) )
. '"/><br>'
. '<p class="description">' . \esc_html__( 'Enter the pronouns for the author, for example "she/her", "he/him", or "they/them".', 'wordpress-seo' ) . '</p>';
}