Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Set Template part area to 'uncategorized'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Nov 19, 2021
1 parent ff180eb commit c9c2f57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Utils/BlockTemplateUtils.php
Expand Up @@ -109,6 +109,9 @@ public static function gutenberg_build_template_result_from_post( $post ) {
$template->has_theme_file = $has_theme_file;
$template->is_custom = true;
$template->post_types = array(); // Don't appear in any Edit Post template selector dropdown.
if ( 'wp_template_part' === $post->post_type ) {
$template->area = 'uncategorized';
}

return $template;
}
Expand Down Expand Up @@ -137,6 +140,9 @@ public static function gutenberg_build_template_result_from_file( $template_file
$template->has_theme_file = true;
$template->is_custom = false; // Templates loaded from the filesystem aren't custom, ones that have been edited and loaded from the DB are.
$template->post_types = array(); // Don't appear in any Edit Post template selector dropdown.
if ( 'wp_template_part' === $template_type ) {
$template->area = 'uncategorized';
}
return $template;
}

Expand Down

0 comments on commit c9c2f57

Please sign in to comment.