Yoast\WP\SEO\User_Meta\User_Interface
Custom_Meta_Integration::user_profile
Adds the inputs needed for SEO values to the User Profile page.
Метод класса: Custom_Meta_Integration{}
Хуки из метода
Возвращает
void. Ничего (null).
Использование
$Custom_Meta_Integration = new Custom_Meta_Integration(); $Custom_Meta_Integration->user_profile( $user );
- $user(WP_User) (обязательный)
- User instance to output for.
Код Custom_Meta_Integration::user_profile() Custom Meta Integration::user profile Yoast 28.4
public function user_profile( $user ) {
\wp_nonce_field( 'wpseo_user_profile_update', 'wpseo_nonce' );
/* translators: %1$s expands to Yoast SEO */
$yoast_user_settings_header = \sprintf( \__( '%1$s settings', 'wordpress-seo' ), 'Yoast SEO' );
echo '
<div class="yoast yoast-settings">
<h2 id="wordpress-seo">' . \esc_html( $yoast_user_settings_header ) . '</h2>';
foreach ( $this->custom_meta_collector->get_sorted_custom_meta() as $meta ) {
if ( ! $meta->is_setting_enabled() ) {
continue;
}
$meta->render_field( $user->ID );
}
\do_action( 'wpseo_render_user_profile', $user );
echo '</div>';
}