WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Helpers

Author_Archive_Helper::author_has_public_posts() public Yoast 1.0

Returns whether the author has at least one public post.

{} Это метод класса: Author_Archive_Helper{}

FUNC_MORE_INFO

Возвращает

true/false. Whether the author has at least one public post.

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

$Author_Archive_Helper = new Author_Archive_Helper();
$Author_Archive_Helper->author_has_public_posts( $author_id );
$author_id(число) (обязательный)
The author ID.

Код Author_Archive_Helper::author_has_public_posts() Yoast 15.6.2

<?php
public function author_has_public_posts( $author_id ) {
	// First check if the author has at least one public post.
	$has_public_post = $this->author_has_a_public_post( $author_id );
	if ( $has_public_post ) {
		return true;
	}

	// Then check if the author has at least one post where the status is the same as the global setting.
	$has_public_post_depending_on_the_global_setting = $this->author_has_a_post_with_is_public_null( $author_id );
	if ( $has_public_post_depending_on_the_global_setting ) {
		return null;
	}

	return false;
}