diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 7bd9dca3bf..e7e142d6fb 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -1021,18 +1021,15 @@ final class WP_Theme implements ArrayAccess { /** * Filter list of page templates for a theme. * - * This filter does not currently allow for page templates to be added. - * * @since 3.9.0 + * @since 4.4.0 Converted to allow complete control over the `$page_templates` array. * * @param array $page_templates Array of page templates. Keys are filenames, * values are translated names. * @param WP_Theme $this The theme object. * @param WP_Post|null $post The post being edited, provided for context, or null. */ - $return = apply_filters( 'theme_page_templates', $page_templates, $this, $post ); - - return array_intersect_assoc( $return, $page_templates ); + return (array) apply_filters( 'theme_page_templates', $page_templates, $this, $post ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 3489867b00..22040a64f0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34994'; +$wp_version = '4.4-alpha-34995'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.