diff --git a/lib/compat/wordpress-6.8/template-parts.php b/lib/compat/wordpress-6.8/template-parts.php index 1f126d1bdd98ee..7f7fb32a0e6a5e 100644 --- a/lib/compat/wordpress-6.8/template-parts.php +++ b/lib/compat/wordpress-6.8/template-parts.php @@ -31,7 +31,7 @@ function gutenberg_add_default_template_types_to_index( WP_REST_Response $respon $indexed_template_types[] = $template_type; } - $response->data['defaultTemplateTypes'] = indexed_template_types(); + $response->data['defaultTemplateTypes'] = $indexed_template_types; return $response; } diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index 3aa1c4daca96e7..493675b4513489 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -1716,15 +1716,17 @@ export const __experimentalGetDefaultTemplateTypes = createRegistrySelector( * @return {Array} The template part areas. */ export const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector( - ( select ) => () => { - const areas = - select( coreStore ).getEntityRecord( 'root', '__unstableBase' ) - ?.defaultTemplatePartAreas ?? []; - - return areas.map( ( item ) => { - return { ...item, icon: getTemplatePartIcon( item.icon ) }; - } ); - } + ( select ) => + createSelector( () => { + const areas = select( coreStore ).getEntityRecord( + 'root', + '__unstableBase' + ); + + return areas.map( ( item ) => { + return { ...item, icon: getTemplatePartIcon( item.icon ) }; + } ); + } ) ); /**