wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
wp_get_theme_data_template_parts › WordPress Function
Depuis6.4.0
Dépréciéen/a
› wp_get_theme_data_template_parts ( Pas de paramètres )
Retourne: |
|
Défini(e) dans: |
|
Codex: |
Returns the metadata for the template parts defined by the theme.
Fonctions en relation: wp_get_theme_data_custom_templates, get_template_part, get_embed_template, wp_print_media_templates, wp_get_theme_preview_path
Source
function wp_get_theme_data_template_parts() { $cache_group = 'theme_json'; $cache_key = 'wp_get_theme_data_template_parts'; $can_use_cached = ! wp_is_development_mode( 'theme' ); $metadata = false; if ( $can_use_cached ) { $metadata = wp_cache_get( $cache_key, $cache_group ); if ( false !== $metadata ) { return $metadata; } } if ( false === $metadata ) { $metadata = WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_template_parts(); if ( $can_use_cached ) { wp_cache_set( $cache_key, $metadata, $cache_group ); } } return $metadata; }