Yoast\WP\SEO\AI\Content_Planner\Application

Category_Repository_Interface::find_by_name │ public │ Yoast 1.0

Finds a category by name, returning the empty-category sentinel when no term matches.

The empty-category sentinel is a Category with name "" and id -1. It signals "no category" to the frontend so it can hide the category UI and skip applying any category to the post.

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

Хуков нет.

Возвращает

Category. The resolved category, or the empty-category sentinel when no term matches.

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

$Category_Repository_Interface = new Category_Repository_Interface();
$Category_Repository_Interface->find_by_name( $name ): Category;
$name(строка) (обязательный)
The category name.

Код Category_Repository_Interface::find_by_name() Yoast 28.9

public function find_by_name( string $name ): Category;