Yoast\WP\SEO\Builders
Indexable_Post_Builder::is_public_attachment()
Determines the value of is_public for attachments.
Метод класса: Indexable_Post_Builder{}
Хуков нет.
Возвращает
true|false|null
. False when it has no parent. Null when it has a parent.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_public_attachment( $indexable );
- $indexable(Indexable) (обязательный)
- The indexable.
Код Indexable_Post_Builder::is_public_attachment() Indexable Post Builder::is public attachment Yoast 24.6
protected function is_public_attachment( $indexable ) { // If the attachment has no parent, it should not be public. if ( empty( $indexable->post_parent ) ) { return false; } // If the attachment has a parent, the is_public should be NULL. return null; }