wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
_add_block_template_info is private and should not be used in themes or plugins directly.
_add_block_template_info › WordPress Function
Desde5.9.0
Obsoleton/a
› _add_block_template_info ( $template_item )
| Acesso: |
|
| Parâmetros: |
|
| Retorna: |
|
| Definido em: |
|
| Codex: |
Attempts to add custom template information to the template item.
Fonte
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;
}