Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::is_site_editor()
Checks if the current URL is the Site Editor.
Метод класса: AssetDataRegistry{}
Хуков нет.
Возвращает
true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_site_editor();
Код AssetDataRegistry::is_site_editor() AssetDataRegistry::is site editor WC 7.7.2
protected function is_site_editor() { $url_path = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; return str_contains( $url_path, 'site-editor.php' ); }