Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#17351 closed defect (bug) (fixed)

Twenty Eleven: link color option for dark theme does not show in admin

Reported by: cklosows's profile cklosows Owned by: nacin's profile nacin
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.2
Component: Bundled Theme Keywords: has-patch needs-testing
Focuses: Cc:

Description (last modified by lancewillett)

When updating to use the 'Dark' version of the Twenty Eleven theme, the 'Link Color' does not update to the proper default color for the Dark CSS (#E4741F). It remains stating the default color is (#1b8be0). The rendering of the page does use the correct CSS Color.

Screencaps attached

Attachments (6)

theme-options.png (27.3 KB) - added by cklosows 14 years ago.
The Theme Options Area
renders-correctly.png (6.2 KB) - added by cklosows 14 years ago.
Theme uses correct color on render still though.
17351.patch (2.2 KB) - added by cklosows 14 years ago.
17351-2.diff (4.3 KB) - added by lancewillett 14 years ago.
Uses correct default value on page load, JS improvements
17351.diff (5.7 KB) - added by nacin 14 years ago.
theme-options.php.diff (4.5 KB) - added by dcowgill 14 years ago.
Updated diff to the latest in trunk.

Download all attachments as: .zip

Change History (18)

@cklosows
14 years ago

The Theme Options Area

@cklosows
14 years ago

Theme uses correct color on render still though.

#1 @cklosows
14 years ago

I forgot to mention, that the field to edit the link color does save any changes, this only effects the default colors.

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.2
  • Owner set to nacin
  • Status changed from new to accepted

#3 @nacin
14 years ago

Patch welcome on this, otherwise I'll get to it in a day or so.

#4 @cklosows
14 years ago

I'll try and get a patch done this weekend.

@cklosows
14 years ago

#5 @cklosows
14 years ago

  • Keywords has-patch needs-testing added

#6 @lancewillett
14 years ago

  • Cc lancewillett added
  • Description modified (diff)
  • Summary changed from TwentyEleven Link Color Option For Dark Theme Does not Show in Admin to Twenty Eleven: link color option for dark theme does not show in admin

Thanks cklosows. Your patch looks like a great start, but I'd like to see the default color value also be correct when loading the page (not just after a radio input change). Also, the hex value in the color input field and the color swatch should not change if a user has gone with a custom color.

I'll cook up an update to the patch and post it here.

@lancewillett
14 years ago

Uses correct default value on page load, JS improvements

#7 @studionashvegas
14 years ago

  • Resolution set to worksforme
  • Status changed from accepted to closed

Tested - works great. Sidenote: non-default colors DO remain even upon theme switch.

#8 @nacin
14 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Not using worksforme correctly - those are for bugs we can't reproduce and are therefore invalid.

I have a better idea on this patch so hold off on commit.

#9 @studionashvegas
14 years ago

Ah, sorry about that. Will know for next time.

@nacin
14 years ago

#10 @nacin
14 years ago

Attached patch:

  • Registers default colors to each color scheme.
  • Introduces twentyeleven_get_default_link_color( $color_scheme = null ) to select the default color based on the color scheme.
  • Changes the default color when the scheme is switched, and if the old default was in use, then it is transitioned to the new default.
  • Properly handles the scheme-specific default link color in the save handler.
  • Adds width/height parameters to the theme layout and color scheme images, to prevent repaint on load.

Note that nothing is hardcoded, thus continuing to allow color schemes to be added via a filter.

#11 @westi
14 years ago

  • Component changed from Themes to Bundled Theme

@dcowgill
14 years ago

Updated diff to the latest in trunk.

#12 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [18198]:

Twenty Eleven: Properly handle the default link color for the dark theme. props dcowgill for the patch refresh. fixes #17351.

Note: See TracTickets for help on using tickets.