WPSEO_Metabox::get_tabs()
Returns the relevant metabox tabs for the current view.
Метод класса: WPSEO_Metabox{}
Хуков нет.
Возвращает
WPSEO_Metabox_Section[]
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_tabs();
Код WPSEO_Metabox::get_tabs() WPSEO Metabox::get tabs Yoast 24.7
private function get_tabs() { $tabs = []; $label = __( 'SEO', 'wordpress-seo' ); if ( $this->seo_analysis->is_enabled() ) { $label = '<span class="wpseo-score-icon-container" id="wpseo-seo-score-icon"></span>' . $label; } $tabs[] = new WPSEO_Metabox_Section_React( 'content', $label ); if ( $this->readability_analysis->is_enabled() ) { $tabs[] = new WPSEO_Metabox_Section_Readability(); } if ( $this->inclusive_language_analysis->is_enabled() ) { $tabs[] = new WPSEO_Metabox_Section_Inclusive_Language(); } if ( $this->is_advanced_metadata_enabled ) { $tabs[] = new WPSEO_Metabox_Section_React( 'schema', '<span class="wpseo-schema-icon"></span>' . __( 'Schema', 'wordpress-seo' ), '' ); } if ( $this->social_is_enabled ) { $tabs[] = new WPSEO_Metabox_Section_React( 'social', '<span class="dashicons dashicons-share"></span>' . __( 'Social', 'wordpress-seo' ), '', [ 'html_after' => '<div id="wpseo-section-social"></div>', ] ); } $tabs = array_merge( $tabs, $this->get_additional_tabs() ); return $tabs; }