) { $schema['pageTypes'][ $page_type['value'] ] = [ 'label' => $page_type['name'], 'value' => $page_type['value'], ]; } $schema['articleTypeDefaults'] = []; $schema['pageTypeDefaults'] = []; foreach ( $post_types as $name => $post_type ) { $schema['articleTypeDefaults'][ $name ] = WPSEO_Options::get_default( 'wpseo_titles', "schema-article-type-$name" ); $schema['pageTypeDefaults'][ $name ] = WPSEO_Options::get_default( 'wpseo_titles', "schema-page-type-$name" ); } return $schema; } /** * Transforms the post types, to represent them. * * @param WP_Post_Type[] $post_types The WP_Post_Type array to transform. * * @return array The post types. */ protected function transform_post_types( $post_types ) { $transformed = []; $new_post_types = $this->options->get( 'new_post_types', [] ); foreach ( $post_types as $post_type ) { $transformed[ $post_type->name ] = [ 'name' => $post_type->name, 'route' => $this->get_route( $post_type->name, $post_type->rewrite, $post_type->rest_base ), 'label' => $post_type->label, 'singularLabel' => $post_type->labels->singular_name, 'hasArchive' => $this->post_type_helper->has_archive( $post_type ), 'hasSchemaArticleType' => $this->article_helper->is_article_post_type( $post_type->name ), 'menuPosition' => $post_type->menu_position, 'isNew' => \in_array( $post_type->name, $new_post_types, true ), ]; } \uasort( $transformed, [ $this, 'compare_post_types' ] ); return $transformed; } /** * Compares two post types. * * @param array $a The first post type. * @param array $b The second post type. * * @return int The order. */ protected function compare_post_types( $a, $b ) { if ( $a['menuPosition'] === null && $b['menuPosition'] !== null ) { return 1; } if ( $a['menuPosition'] !== null && $b['menuPosition'] === null ) { return -1; } if ( $a['menuPosition'] === null && $b['menuPosition'] === null ) { // No position specified, order alphabetically by label. return \strnatcmp( $a['label'], $b['label'] ); } return ( ( $a['menuPosition'] < $b['menuPosition'] ) ? -1 : 1 ); } /** * Transforms the taxonomies, to represent them. * * @param WP_Taxonomy[] $taxonomies The WP_Taxonomy array to transform. * @param string[] $post_type_names The post type names. * * @return array The taxonomies. */ protected function transform_taxonomies( $taxonomies, $post_type_names ) { $transformed = []; $new_taxonomies = $this->options->get( 'new_taxonomies', [] ); foreach ( $taxonomies as $taxonomy ) { $transformed[ $taxonomy->name ] = [ 'name' => $taxonomy->name, 'route' => $this->get_route( $taxonomy->name, $taxonomy->rewrite, $taxonomy->rest_base ), 'label' => $taxonomy->label, 'showUi' => $taxonomy->show_ui, 'singularLabel' => $taxonomy->labels->singular_name, 'postTypes' => \array_filter( $taxonomy->object_type, static function ( $object_type ) use ( $post_type_names ) { return \in_array( $object_type, $post_type_names, true ); } ), 'isNew' => \in_array( $taxonomy->name, $new_taxonomies, true ), ]; } \uasort( $transformed, static function ( $a, $b ) { return \strnatcmp( $a['label'], $b['label'] ); } ); return $transformed; } /** * Gets the route from a name, rewrite and rest_base. * * @param string $name The name. * @param array $rewrite The rewrite data. * @param string $rest_base The rest base. * * @return string The route. */ protected function get_route( $name, $rewrite, $rest_base ) { $route = $name; if ( isset( $rewrite['slug'] ) ) { $route = $rewrite['slug']; } if ( ! empty( $rest_base ) ) { $route = $rest_base; } // Always strip leading slashes. while ( \substr( $route, 0, 1 ) === '/' ) { $route = \substr( $route, 1 ); } return $route; } /** * Retrieves the fallbacks. * * @return array The fallbacks. */ protected function get_fallbacks() { $site_logo_id = \get_option( 'site_logo' ); if ( ! $site_logo_id ) { $site_logo_id = \get_theme_mod( 'custom_logo' ); } if ( ! $site_logo_id ) { $site_logo_id = '0'; } return [ 'siteLogoId' => $site_logo_id, ]; } } Uncategorized Archives - Page 5367 of 6369 - iConsult India

iConsult India

July 13, 2026

BetSport Italia: Guida alla Piattaforma di Scommesse e Casinò La piattaforma BetSport è un sito di betting e casinò digitale […]

July 12, 2026

Контент-статьи Лимиты депо Таймеры сессий Варианты самоисключения Контроль над затратами В условиях ужесточения нормативно-правовой базы приборы отвечающей забавы должны ходить […]

July 10, 2026

In-Depth Review of Luckzie Casino for Online Gamblers Luckzie Casino offers a diverse range of gaming options for players in […]

July 10, 2026

Статии Клетъчна отдушна реакция Разумно ориентиране Причина виж Използваемост на софтуерната програма Тад регулира Съвпадения на методите Молба за огнище […]

July 8, 2026

Fivebet: Recensione Completa su Scommesse e Casinò Online Fivebet si presenta come un operatore di scommesse e casinò online presente […]

July 8, 2026

Контент-заметки Тестирование генератора случайных чисел Аудиты 3 сторонок Лад прозрачности Требования ко лицензированию Противоположность интерактивный-казино с сертификатом добросовестной забавы а […]

July 7, 2026

Контент-статьи Инструменты правления временем Инструменты для аппараты лимитов Проверка лица Программы самоисключения Добавочные сбережения Операторы интерактивный-игорный дом должны вытянуть за […]

July 6, 2026

1King Güncel Giriş ve Üyelik Rehberi 1King Casino bir sitedir. Slot oyunları sunar. Offshore bir lisansı olduğu ifade ediliyor. Türkiye’de […]

July 4, 2026

Betbuffon Casino: Przewodnik po Ofertach i Funkcjach Betbuffon Casino to platforma, która przyciąga uwagę graczy online w Polsce. Oferuje szeroki […]

July 3, 2026

  Com o crescimento da popularidade dos cassinos online, é cada vez mais importante escolher um site que seja seguro […]

July 3, 2026

  Com o crescimento da popularidade dos cassinos online, é cada vez mais importante escolher um site que seja seguro […]

July 2, 2026

Recensione Pistollo: catalogo, bonus e sicurezza Pistollo riunisce sotto lo stesso brand un casinò online e una sezione di scommesse. […]

Scroll to Top