Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21980 closed defect (bug) (fixed)

Themes without Options when being activated hide all other Theme screenshots.

Reported by: sterlo's profile sterlo Owned by: nacin's profile nacin
Milestone: 3.4.3 Priority: normal
Severity: minor Version: 3.4
Component: Themes Keywords:
Focuses: Cc:

Description

This is caused by some IF logic being slightly off.

Basically - Line #203 of wp-admin/themes.php needs to be moved to #201 - just above the closing div.

It's just excluding the closing DIV for themes without options.
Problem is apparent if you created a theme with a minimal stylesheet and empty index.php file and then activated it. You should see all the default WordPress themes have their thumbnails hidden.

The commit that introduced the issue:

GIT: https://github.com/WordPress/WordPress/commit/98b61d9a171ffafbcc33305e30568462480d238c#L4R194

SVN: http://core.svn.wordpress.org/!svn/bc/21010/trunk/wp-admin/themes.php

Here's the DIFF of the fix:

diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index 5e83da8..5b56fd7 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -198,9 +198,9 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
                                <li><?php echo $option; ?></li>
                        <?php endforeach; ?>
                </ul>
+               <?php endif; // options ?>
        </div>
        <?php
-               endif; // options
        endif; // options || edit_theme_options
        ?>

I don't think a patch is needed.

Change History (3)

#1 in reply to: ↑ description @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.4.3
  • Version changed from trunk to 3.4

Replying to sterlo:

I don't think a patch is needed.

Patches are helpful because most of us apply them with three or four keystrokes, without even opening our editors. :-)

Diff looks good. Definitely obvious how [21010] erred.

#2 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21965]:

Fix nesting on themes.php when there are no options links to display for the current theme. props sterlo. fixes #21980.

#3 @nacin
11 years ago

In [21966]:

Fix nesting on themes.php when there are no options links to display for the current theme. props sterlo. fixes #21980 for the 3.4 branch.

Note: See TracTickets for help on using tickets.