Yoast\WP\SEO\Exceptions\Indexable
Indexing_Failed_Exception::get_object_description
Describes the failing object as specifically as its indexable allows.
Id-less object types fall back to the sub type when present (e.g. "system-page (404)", "post-type-archive (book)") and to the bare object type otherwise (e.g. "home-page").
Метод класса: Indexing_Failed_Exception{}
Хуков нет.
Возвращает
string. The object description, e.g. "post #123", "system-page (404)" or "home-page".
Использование
$Indexing_Failed_Exception = new Indexing_Failed_Exception(); $Indexing_Failed_Exception->get_object_description();
Код Indexing_Failed_Exception::get_object_description() Indexing Failed Exception::get object description Yoast 28.7
public function get_object_description() {
if ( $this->object_id !== null ) {
return \sprintf( '%1$s #%2$d', $this->object_type, $this->object_id );
}
if ( $this->object_sub_type !== null ) {
return \sprintf( '%1$s (%2$s)', $this->object_type, $this->object_sub_type );
}
return $this->object_type;
}