From 04805287fae6a2d66419aa2dd23424b16b8964bf Mon Sep 17 00:00:00 2001 From: Enrique Piqueras Date: Tue, 3 Dec 2019 15:36:34 -0800 Subject: [PATCH] Template Loader: Use `glob` constant instead of numeric value. (#18893) * Template Loader: Use `glob` constant instead of numeric value. * Template Loader: Remove `glob` flags. --- lib/template-loader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/template-loader.php b/lib/template-loader.php index 59ef444afaa05e..f69957dc824a8e 100644 --- a/lib/template-loader.php +++ b/lib/template-loader.php @@ -147,12 +147,12 @@ function gutenberg_find_template( $template_file ) { // See if there is a theme block template with higher priority than the resolved template post. $higher_priority_block_template_path = null; $higher_priority_block_template_priority = PHP_INT_MAX; - $block_template_files = glob( get_stylesheet_directory() . '/block-templates/*.html', 1 ) ?: array(); + $block_template_files = glob( get_stylesheet_directory() . '/block-templates/*.html' ) ?: array(); if ( is_child_theme() ) { - $block_template_files = array_merge( $block_template_files, glob( get_template_directory() . '/block-templates/*.html', 1 ) ?: array() ); + $block_template_files = array_merge( $block_template_files, glob( get_template_directory() . '/block-templates/*.html' ) ?: array() ); } if ( gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing-demo' ) ) { - $block_template_files = array_merge( $block_template_files, glob( dirname( __FILE__ ) . '/demo-block-templates/*.html', 1 ) ?: array() ); + $block_template_files = array_merge( $block_template_files, glob( dirname( __FILE__ ) . '/demo-block-templates/*.html' ) ?: array() ); } foreach ( $block_template_files as $path ) { $theme_block_template_priority = $slug_priorities[ basename( $path, '.html' ) ];