WordPress.org

Make WordPress Core

Opened 14 months ago

Last modified 12 months ago

#20448 closed task (blessed) (fixed)

Update Twenty Ten and Twenty Eleven to use 3.4 features — at Version 24

Reported by: nacin Owned by: koopersmith
Priority: high Milestone: 3.4
Component: Bundled Theme Version: 3.4
Severity: major Keywords: has-patch
Cc: kovshenin@…, georgemamadashvili@…, wdfee, aadams@…, chip@…, Ken@…, pavelevap@…, michael@…

Description (last modified by nacin)

Twenty Eleven can be given three distinct updates for 3.4:

  • Flexible heights for headers (when a post thumbnail header is not in use)
  • Adding Twenty Eleven's theme options to customize
  • Providing Text Domain and Domain Path headers

Additionally, a theme just doesn't need a $locale.php file — indeed, core almost never needs one either anymore. I suggest we remove the reference, something I had already done for Twenty Twelve when it was in trunk.

Change History (29)

comment:1 nacin14 months ago

In [20470]:

Flexible heights for Twenty Eleven's custom headers. see #20448.

comment:2 nacin14 months ago

In [20471]:

Twenty Eleven: Remove $locale.php file support. see #20448.

nacin14 months ago

comment:3 nacin14 months ago

  • Keywords has-patch added
  • Owner set to koopersmith
  • Status changed from new to reviewing

comment:4 nacin14 months ago

In [20473]:

Twenty Ten: Remove $locale.php file support. see #20448.

comment:5 nacin14 months ago

In [20474]:

Flexible heights for Twenty Ten's custom headers. see #20448.

comment:6 kovshenin14 months ago

  • Cc kovshenin@… added

comment:7 follow-up: ocean9014 months ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from Update Twenty Eleven to use 3.4 features to Update Twenty (Ten|Eleven) to use 3.4 features

comment:8 Mamaduka14 months ago

  • Cc georgemamadashvili@… added

comment:9 wdfee14 months ago

  • Cc wdfee added

comment:10 nacin14 months ago

  • Priority changed from normal to high
  • Severity changed from normal to major
  • Summary changed from Update Twenty (Ten|Eleven) to use 3.4 features to Update Twenty Ten and Twenty Eleven to use 3.4 features

twentyeleven-customize.diff:ticket:19910 from Otto42 adds postMessage support for Twenty Eleven.

comment:11 koopersmith14 months ago

In [20649]:

Theme Customizer: Pass the WP_Customize instance to all actions fired inside the class. Plugins/themes should not refer to the $wp_customize global. see #19910, #20448.

Otto4214 months ago

Patch for twentyeleven to support postMessage updating of title, description, and header text-color

comment:12 Otto4214 months ago

20448.twentyeleven.diff is an updated version of the previous patch (in #19910) to take into account [20649] and to add a somewhat smarter way of doing the JS includes for the postMessage handling.

Otto4214 months ago

Add color scheme and partially working link-color options to customizer

comment:13 follow-up: Otto4214 months ago

New patch adds color scheme and link color choices to the customizer.

The link color stuff is partially broken because twentyeleven stores the link color in the database with the # in front of it, while the customizer's color control expects it to not have that. I wrote a function to add the # to make the previewer work, but the control appears wonky when you first load the page.

Uploading the patch anyway in case somebody can see a better solution than myself. I think we'll probably need to make the color control capable of handling the data value with or without the # on the color to get the widest use out of it.

comment:14 in reply to: ↑ 13 nacin14 months ago

Replying to Otto42:

New patch adds color scheme and link color choices to the customizer.

I take it you might have missed 20448.diff :-) Looks good. Obviously far more comprehensive than my initial attempt. I ran into the same issue with #, and I think koopersmith said he was going to work on that.

Otto4214 months ago

Add layouts too

comment:15 follow-up: Otto4214 months ago

Yeah, I did miss that. :)

Patch 3 adds layouts using much the same method nacin's patch used, but with the addition of calling twentyeleven_layouts() to get the list of layouts instead of hardcoding them.

comment:16 kovshenin14 months ago

Just a note that header_textcolor is also the checkbox that should show/hide the header text. Hidden when "blank" or empty string. Also see #20600

Last edited 14 months ago by kovshenin (previous) (diff)

comment:17 nacin14 months ago

  • Version set to 3.4

comment:18 andyadams14 months ago

  • Cc aadams@… added

comment:19 andyadams14 months ago

I've hit a bug where the default "full page refresh" preview of an option doesn't work unless I already have values saved in the DB for the theme.

So, to replicate:

  • Delete the twentyeleven_theme_options value from your database.
  • Open the customizer for TwentyEleven and toggle the dark/light color scheme, and it won't update.
  • Click "Save" on the customizer pane to save the current options.
  • Try toggling the color scheme again, and it will work.

It looks like the customizer is expecting a value to be in the DB? This doesn't have to do with saving defaults in the database, does it?!?

comment:20 Otto4214 months ago

Hahahahaha! #blamenacin

comment:21 Otto4214 months ago

andyadams: Patch that should correct this problem is now in #19910. However, I'm not sure that it's the final version of the patch that will be used. But I can confirm that the problem exists.

comment:22 chipbennett14 months ago

  • Cc chip@… added

comment:23 in reply to: ↑ 15 kobenland14 months ago

Replying to Otto42:

Patch 3 adds layouts using much the same method nacin's patch used, but with the addition of calling twentyeleven_layouts() to get the list of layouts instead of hardcoding them.

Would it make sense to move the JavaScript into its own file, and enqueue it via the 'wp_enqueue_scripts' hook? Works well for me.

comment:24 follow-up: nacin14 months ago

  • Description modified (diff)

#15858 — we also should add Text Domain and Domain Path headers until a subsequent phase of i18n ideally renders those unnecessary.

Note: See TracTickets for help on using tickets.