[wp-trac] [WordPress Trac] #13774: Theme installer should support child themes

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 30 03:24:16 UTC 2011


#13774: Theme installer should support child themes
-----------------------------------------------+-----------------------
 Reporter:  westi                              |       Owner:  dd32
     Type:  task (blessed)                     |      Status:  accepted
 Priority:  normal                             |   Milestone:  3.3
Component:  Upgrade/Install                    |     Version:  3.0
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch 3.3-early needs-testing  |
-----------------------------------------------+-----------------------
Changes (by dd32):

 * keywords:  has-patch 3.3-early => has-patch 3.3-early needs-testing


Comment:

 > attachment 13774.3.diff  added

 Just posting what I've got for testing, Most of Janes suggestions have
 been added with the exception of a few which I felt don't fit the current
 UI.
  * "You may now begin using Child Theme 2.0." is a good line, but isn't
 consistent, we should do that when we repaint the upgraders to make them
 all visually similar.

  * Combined the ''Theme Requires a parent theme''... and ''checking for
 parent theme'' into a single string: ''This theme requires a parent theme,
 Checking if <strong>parent-theme</strong> is installed…'' It fits the
 overall flow better IMHO.

  * The failure string for when a Parent them can't be installed is
 currently: ''<strong>The parent theme could not be found, You will need to
 install the parent theme %s before you can use this child
 theme.</strong>''

  * The ''This theme requires a parent theme, Checking if <strong>parent-
 theme</strong> is installed…'' line uses the parent theme slug, as this is
 what is within the style.css file.. It could be altered to display the
 actual themes name (But it'll do that /after/ it's searched for the theme
 being installed and checking the installer API..)

 Examples:
 '''Parent Theme already installed''':
 {{{
 <h2>Installing Theme: Child Theme 3.0</h2>

 Downloading install package from http://wordpress.org/....zip…

 Unpacking the package…

 Installing the theme…

 This theme requires a parent theme, Checking if <strong>parent-
 theme</strong> is installed…

 The Parent theme, <strong>Parent Theme 2.0</strong>, is currently
 installed.

 Successfully installed the theme <strong>Child Theme 3.0</strong>.

 Preview | Activate | Return to Theme Installer
 }}}

 '''Parent Theme Not Installed'''
 {{{
 <h2>Installing Theme: Child Theme 3.0</h2>

 Downloading install package from http://wordpress.org/...zip…

 Unpacking the package…

 Installing the theme…

 This theme requires a parent theme, Checking if <strong>parent-
 theme</strong> is installed…

 Preparing to install <strong>Parent Theme 2.0</strong>…

 Downloading install package from http://wordpress.org/.zip…

 Unpacking the package…

 Installing the theme…

 Successfully installed the parent theme <strong>Parent Theme 2.0</strong>.

 Successfully installed the theme <strong>Child Theme 3.0</strong>.

 Preview | Activate | Return to Theme Installer
 }}}

 '''Parent Theme can't be installed'''
 {{{
 <h2>Installing Theme: Child Theme 3.0</h2>

 Downloading install package from http://wordpress.org/.....zip…

 Unpacking the package…

 Installing the theme…

 This theme requires a parent theme, Checking if <strong>non-existant-
 theme</strong> is installed…

 <strong>The parent theme could not be found, You will need to install the
 parent theme non-existant-theme before you can use this child
 theme.</strong>

 Successfully installed the theme <strong>Child Theme 3.0</strong>.

 Return to Theme Installer
 }}}

 The Final case of "Child's installed, Parent Failed, It was a success!"
 wording is a bit disconnected, but that's quite common with errors in the
 upgraders right now, Ideally they should all be fixed at the same time
 rather than wrapped in this patch.

 This is all good for testing now, Note however, That this is not as simple
 to test as no child themes are currently available in the Extend
 directory, Line 679 of the patch forces all install attempts to have "The
 Common Blog" as a parent theme.. So just imagine that's a parent (or
 change it to a non-existant theme for testing there).

 It also works for themes uploaded from zip files:
 {{{
 Installing Theme from uploaded file: twentyeleven-child.zip

 Unpacking the package…

 Installing the theme…

 This theme requires a parent theme, Checking if twentyeleven is installed…

 Preparing to install Twenty Eleven 1.2…

 Downloading install package from
 http://wordpress.org/extend/themes/download/twentyeleven.1.2.zip…

 Unpacking the package…

 Installing the theme…

 Successfully installed the parent theme Twenty Eleven 1.2.

 Theme installed successfully.

 Preview | Activate | Return to Themes page
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13774#comment:22>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list