Skip to content

Commit

Permalink
Remove postType checks
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Aug 7, 2020
1 parent b4f8bf0 commit 02b06ed
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ function get_template_types() {
* Adds necessary filters to use 'wp_template' posts instead of theme template files.
*/
function gutenberg_add_template_loader_filters() {
if ( ! post_type_exists( 'wp_template' ) ) {
return;
}

foreach ( get_template_types() as $template_type ) {
if ( 'embed' === $template_type ) { // Skip 'embed' for now because it is not a regular template type.
continue;
Expand Down Expand Up @@ -426,7 +422,7 @@ function gutenberg_strip_php_suffix( $template_file ) {
function gutenberg_template_loader_filter_block_editor_settings( $settings ) {
global $post;

if ( ! $post || ! post_type_exists( 'wp_template' ) || ! post_type_exists( 'wp_template_part' ) ) {
if ( ! $post ) {
return $settings;
}

Expand Down

0 comments on commit 02b06ed

Please sign in to comment.