hookMethods(); } /** * Filter the core template part areas to add custom areas needed for * the theme. * * Core only supports four icons at the moment, so the `icon` field * value doesn't actually work. But the value must be defined to avoid * an error. * @link https://github.com/WordPress/gutenberg/issues/36814 * * @hook default_wp_template_part_areas * @since 1.0.0 * @link https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/ */ public function areaDefinitions( array $default_area_definitions ): array { $custom_areas = [ [ 'area' => 'loop', 'area_tag' => 'div', 'label' => __( 'Loop', 'anselm' ), 'description' => __( 'The Loop template part defines an area that contains the post list on blog, search results, and other archive-type pages.', 'anselm' ), 'icon' => 'layout' ], [ 'area' => 'comments', 'area_tag' => 'section', 'label' => __( 'Comments', 'anselm' ), 'description' => __( 'The Comments template part defines a page area that contains the post comments list and form.', 'anselm' ), 'icon' => 'comments' ] ]; return [ ...$default_area_definitions, ...$custom_areas ]; } }