Ensure we're matching the complete theme directory when excluding parent templates from the theme editor. props chrisbliss18, fixes #16607 for the 3.1 branch.

git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-02-21 18:55:48 +00:00
parent 861d81ad6c
commit 46c2bc99bf
4 changed files with 5 additions and 5 deletions

View File

@ -180,7 +180,7 @@ if ($allowed_files) :
$template_dir = $themes[$theme]['Template Dir'];
foreach ( $themes[$theme]['Template Files'] as $template_file ) {
// Don't show parent templates.
if ( $is_child_theme && strpos( $template_file, $themes[$theme]['Template Dir'] ) === 0 )
if ( $is_child_theme && strpos( $template_file, trailingslashit( $template_dir ) ) === 0 )
continue;
$description = trim( get_file_description($template_file) );
@ -202,7 +202,7 @@ if ($allowed_files) :
$stylesheet_dir = $themes[$theme]['Stylesheet Dir'];
foreach ( $themes[$theme]['Stylesheet Files'] as $style_file ) {
// Don't show parent styles.
if ( $is_child_theme && strpos( $style_file, $themes[$theme]['Template Dir'] ) === 0 )
if ( $is_child_theme && strpos( $style_file, trailingslashit( $template_dir ) ) === 0 )
continue;
$description = trim( get_file_description($style_file) );

View File

@ -216,7 +216,6 @@ add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
// Login actions
add_action( 'login_head', 'wp_enqueue_scripts', 1 );
add_action( 'login_head', 'wp_print_head_scripts', 9 );
add_action( 'login_footer', 'wp_print_footer_scripts' );

View File

@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @global string $wp_version
*/
$wp_version = '3.1-RC5';
$wp_version = '3.1-RC5-17466';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -79,7 +79,8 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
<?php
}
do_action('login_head'); ?>
do_action( 'login_enqueue_scripts' );
do_action( 'login_head' ); ?>
</head>
<body class="login">
<?php if ( !is_multisite() ) { ?>