[theme-reviewers] Page templates in sub-folders, new in 3.4

Chip Bennett chip at chipbennett.net
Thu Mar 29 16:57:50 UTC 2012


"authors.php" is not a *page* template. Looking at where this change takes
place in core<http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-theme.php?rev=20318#L990>,
it appears that it applies *specifically* to custom templates for static
pages:

$page_templates = array();

$files = (array) self::scandir( $this->get_stylesheet_directory(), 'php', 1
);

foreach ( $files['php'] as $file => $full_path ) {
      $headers = get_file_data( $full_path, array( 'Template Name' =>
'Template Name' ) );
     * if ( empty( $headers['Template Name'] ) )*
*            continue;*
      $page_templates[ $file ] = $this->translate_header( 'Template Name',
$headers['Template Name'] );
}


But I could be wrong. :)

Chip

On Thu, Mar 29, 2012 at 11:47 AM, Angelo Bertolli <angelo at bertolli.org>wrote:

> On 03/29/2012 12:43 PM, Doug Stewart wrote:
> >
> http://nacin.com/2012/03/29/page-templates-in-subdirectories-new-in-wordpress-3-4/
> >
> > http://core.trac.wordpress.org/changeset/20318
> >
> > Organizational BOOM.
>
> Does this apply to only alternate page templates, or does it also apply
> to canonical pages (e.g. authors.php) ?
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120329/ca922946/attachment.htm>


More information about the theme-reviewers mailing list