Automattic\WooCommerce\Internal\Admin\Settings
SettingsUIRequestContext::apply_section_navigation
Set the shell section navigation from the page registration.
Top-level pages never carry section navigation: the classic section links render with the settings header instead. Drill-down pages keep schema-provided navigation and default to none, since the header breadcrumbs replace it.
Метод класса: SettingsUIRequestContext{}
Хуков нет.
Возвращает
array.
Использование
// private - только в коде основоного (родительского) класса $result = $this->apply_section_navigation( $schema ): array;
- $schema(массив) (обязательный)
- Resolved settings UI schema.
Код SettingsUIRequestContext::apply_section_navigation() SettingsUIRequestContext::apply section navigation WC 11.2.2
private function apply_section_navigation( array $schema ): array {
if ( ! isset( $schema['shell'] ) || ! is_array( $schema['shell'] ) ) {
$schema['shell'] = array();
}
if ( ! $this->is_drill_down() || ! isset( $schema['shell']['sectionNavigation'] ) ) {
$schema['shell']['sectionNavigation'] = array();
}
return $schema;
}