default_wp_template_part_areas
Filters the list of allowed template part area values.
Usage
add_filter( 'default_wp_template_part_areas', 'wp_kama_default_wp_template_part_areas_filter' ); /** * Function for `default_wp_template_part_areas` filter-hook. * * @param array[] $default_area_definitions The allowed template part area values. * * @return array[] */ function wp_kama_default_wp_template_part_areas_filter( $default_area_definitions ){ // filter... return $default_area_definitions; }
- $default_area_definitions(array[])
The allowed template part area values.
-
...$0(array)
Data for the template part area.-
area(string)
Template part area name. -
label(string)
Template part area label. -
description(string)
Template part area description. -
icon(string)
Template part area icon. - area_tag(string)
Template part area tag.
-
-
Changelog
Since 5.9.0 | Introduced. |
Where the hook is called
default_wp_template_part_areas
wp-includes/block-template-utils.php 120
return apply_filters( 'default_wp_template_part_areas', $default_area_definitions );