Yoast\WP\SEO\Helpers
Current_Page_Helper::is_trash_overview
Returns whether the current admin overview (list table) shows the trash.
Mirrors the check WP_Posts_List_Table itself uses to decide it is on the trash view.
Метод класса: Current_Page_Helper{}
Хуков нет.
Возвращает
bool. Whether the current admin overview shows the trash.
Использование
$Current_Page_Helper = new Current_Page_Helper(); $Current_Page_Helper->is_trash_overview(): bool;
Код Current_Page_Helper::is_trash_overview() Current Page Helper::is trash overview Yoast 28.7
public function is_trash_overview(): bool {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
return isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] === 'trash';
}