Ticket #22515: 22515.2.diff
| File 22515.2.diff, 3.1 KB (added by , 14 years ago) |
|---|
-
wp-admin/includes/class-wp-upgrader.php
671 671 /* translators: 1: theme name, 2: version */ 672 672 $this->strings['parent_theme_currently_installed'] = __('The parent theme, <strong>%1$s %2$s</strong>, is currently installed.'); 673 673 /* translators: 1: theme name, 2: version */ 674 $this->strings['parent_theme_invalid'] = __( '<strong>%1$s %2$s</strong>, is currently installed, but it is not a valid parent theme for <strong>%3$s %4$s</strong>.' ); 675 /* translators: 1: theme name, 2: version */ 676 $this->strings['theme_broken'] = __( '<strong>%1$s %2$s</strong> is installed but “broken” and cannot be used.' ); 677 /* translators: 1: theme name, 2: version */ 674 678 $this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme, <strong>%1$s %2$s</strong>.'); 675 679 $this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.'); 676 680 } … … 684 688 685 689 $this->skin->feedback( 'parent_theme_search' ); 686 690 687 if ( ! $theme_info->parent()->errors() ) { 691 if ( $theme_info->parent()->exists() ) { 692 // But, this installed parent theme is not a valid parent of the theme we're trying to install. 693 // (We assume later on that any theme we install now from WordPress.org *is* a valid parent theme.) 694 if ( $theme_info->errors() && in_array( 'theme_parent_invalid', $theme_info->errors()->get_error_codes() ) ) { 695 $name = $theme_info->display('Name'); 696 $version = $theme_info->display('Version'); 697 698 $this->skin->feedback( 'parent_theme_invalid', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version' ), $name, $version ); 699 700 // The theme is installed, but broken. Eh, we'll call it a wash. 701 $this->strings['process_success'] = sprintf( $this->strings['theme_broken'], $name, $version ); 702 add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') ); 703 return $install_result; 704 } 705 688 706 $this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version') ); 707 689 708 // We already have the theme, fall through. 690 709 return $install_result; 691 710 } -
wp-includes/class-wp-theme.php
254 254 // Parent theme is missing. 255 255 $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), $this->template ) ); 256 256 $this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) ); 257 $this->parent = new WP_Theme( $this->template, $this->theme_root, $this ); 257 258 return; 258 259 } 259 260 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)