wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_add_block_template_info is private and should not be used in themes or plugins directly.
_add_block_template_info › WordPress Function
Seit5.9.0
Veraltetn/v
› _add_block_template_info ( $template_item )
Zugriff: |
|
Parameter: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Attempts to add custom template information to the template item.
Quellcode
function _add_block_template_info( $template_item ) { if ( ! wp_theme_has_theme_json() ) { return $template_item; } $theme_data = wp_get_theme_data_custom_templates(); if ( isset( $theme_data[ $template_item['slug'] ] ) ) { $template_item['title'] = $theme_data[ $template_item['slug'] ]['title']; $template_item['postTypes'] = $theme_data[ $template_item['slug'] ]['postTypes']; } return $template_item; }