Automattic\WooCommerce\Admin
PageController::get_current_page()
Get the current page.
Метод класса: PageController{}
Хуков нет.
Возвращает
Массив|true|false
. Current page or false if not registered with this controller.
Использование
$PageController = new PageController(); $PageController->get_current_page();
Код PageController::get_current_page() PageController::get current page WC 8.7.0
public function get_current_page() { // If 'current_screen' hasn't fired yet, the current page calculation // will fail which causes `false` to be returned for all subsquent calls. if ( ! did_action( 'current_screen' ) ) { _doing_it_wrong( __FUNCTION__, esc_html__( 'Current page retrieval should be called on or after the `current_screen` hook.', 'woocommerce' ), '0.16.0' ); } if ( is_null( $this->current_page ) ) { $this->determine_current_page(); } return $this->current_page; }