Yoast\WP\SEO\Builders
Indexable_Author_Builder::get_author_meta
Retrieves the author meta.
Метод класса: Indexable_Author_Builder{}
Хуков нет.
Возвращает
Строку|null. The value of the meta field.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_author_meta( $user_id, $key );
- $user_id(int) (обязательный)
- The user to retrieve the indexable for.
- $key(строка) (обязательный)
- The meta entry to retrieve.
Код Indexable_Author_Builder::get_author_meta() Indexable Author Builder::get author meta Yoast 26.5
protected function get_author_meta( $user_id, $key ) {
$value = \get_the_author_meta( $key, $user_id );
if ( \is_string( $value ) && $value === '' ) {
return null;
}
return $value;
}