WordPress.org

Make WordPress Core

Opened 4 years ago

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

Download all attachments as: .zip

Change History (18)

@cklosows4 years ago

The Theme Options Area

@cklosows4 years ago

Theme uses correct color on render still though.

comment:1 @cklosows4 years ago

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

comment:2 @nacin4 years ago

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

comment:3 @nacin4 years ago

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

comment:4 @cklosows4 years ago

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

@cklosows4 years ago

comment:5 @cklosows4 years ago

  • Keywords has-patch needs-testing added

comment:6 @lancewillett4 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.

@lancewillett4 years ago

Uses correct default value on page load, JS improvements

comment:7 @studionashvegas4 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.

comment:8 @nacin4 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.

comment:9 @studionashvegas4 years ago

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

@nacin4 years ago

comment:10 @nacin4 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.

comment:11 @westi4 years ago

  • Component changed from Themes to Bundled Theme

@dcowgill4 years ago

Updated diff to the latest in trunk.

comment:12 @nacin4 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.