Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#17351 closed defect (bug) (fixed)

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

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

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

Download all attachments as: .zip

Change History (18)

@cklosows
15 years ago

The Theme Options Area

@cklosows
15 years ago

Theme uses correct color on render still though.

#1 @cklosows
15 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
15 years ago

  • Milestone Awaiting Review3.2
  • Owner set to nacin
  • Status newaccepted

#3 @nacin
15 years ago

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

#4 @cklosows
15 years ago

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

@cklosows
15 years ago

#5 @cklosows
15 years ago

  • Keywords has-patch needs-testing added

#6 @lancewillett
15 years ago

  • Cc lancewillett added
  • Description modified (diff)
  • Summary TwentyEleven Link Color Option For Dark Theme Does not Show in AdminTwenty 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
15 years ago

Uses correct default value on page load, JS improvements

#7 @studionashvegas
15 years ago

  • Resolutionworksforme
  • Status acceptedclosed

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

#8 @nacin
15 years ago

  • Resolution worksforme
  • Status closedreopened

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
15 years ago

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

@nacin
15 years ago

#10 @nacin
15 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
15 years ago

  • Component ThemesBundled Theme

@dcowgill
15 years ago

Updated diff to the latest in trunk.

#12 @nacin
15 years ago

  • Resolutionfixed
  • Status reopenedclosed

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.