Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19978 closed task (blessed) (fixed)

Twenty Twelve

Reported by: nacin's profile nacin Owned by:
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: Cc:

Description (last modified by lancewillett)

In [19842]:

Initial import of the Twenty Twelve theme, by Drew Strojny. This time around we're trying something different than the previous twenty-something themes, a much more minimalist approach that affords easy use as a CMS in addition to being blog-forward. More information will be on wpdevel soon. Props drewstrojny and lancewillett.

Attachments (3)

19978-upgrade.diff (444 bytes) - added by markmcwilliams 12 years ago.
Include the files for Twenty Twelve in the 3.4 upgrade process!
19978-ssl-webfont.patch (903 bytes) - added by ocean90 12 years ago.
navigation_enqueuing.patch (686 bytes) - added by dimadin 12 years ago.

Download all attachments as: .zip

Change History (79)

#1 @nacin
12 years ago

In [19843]:

Synchronize archive.php docs with Twenty Eleven. Go easy on the PHP/HTML context switching. see #19978.

#2 @lancewillett
12 years ago

  • Cc lancewillett drewstrojny added

#3 @nacin
12 years ago

In [19844]:

Freshen up the docs in functions.php. Remove is_admin() check from twentytwelve_enqueue_scripts(). Remove function_exists() wrappers from functions that are hooked in. Kill locale.php handling. see #19978.

#4 follow-up: @nacin
12 years ago

[19845] — Move the wp_enqueue_style() to header.php.

I like the change to proper enqueueing of styles in a theme, but burying it in functions.php isn't very intuitive, or consistent with how JS is handled in header.php. Given how simple this theme is, let's keep it in header.php.

#5 @lancewillett
12 years ago

  • Description modified (diff)

See #19627 for related "Default to static front page" action.

#6 @Mamaduka
12 years ago

  • Cc georgemamadashvili@… added

#7 @DrewAPicture
12 years ago

  • Cc xoodrew@… added

#8 @ocean90
12 years ago

  • Cc ocean90 added

#9 @hd-J
12 years ago

  • Cc jeremy@… added

@markmcwilliams
12 years ago

Include the files for Twenty Twelve in the 3.4 upgrade process!

#10 in reply to: ↑ 4 @Mamaduka
12 years ago

Replying to nacin:

[19845] — Move the wp_enqueue_style() to header.php.

I like the change to proper enqueueing of styles in a theme, but burying it in functions.php isn't very intuitive, or consistent with how JS is handled in header.php. Given how simple this theme is, let's keep it in header.php.

We could use get_stylesheet_uri() for more simplicity, also suggested by Theme Review guidelines - http://codex.wordpress.org/Theme_Review#Site_Information

Last edited 12 years ago by Mamaduka (previous) (diff)

#11 @lancewillett
12 years ago

In [19915]:

Twenty Twelve template changes and fixes ... see #19978.

  • Add custom header support
  • header.php: use get_stylesheet_uri() to load stylesheet, props Mamaduka
  • Add full-width template, including adding relevant body_class value as a CSS hook
  • Hide sidebar on all views if no active widgets exist
  • Fix site title output (was missing site title)
  • Remove "featured" title for sticky posts
  • Add content template files for aside, image, link, and quote post formats
  • Indent content-single.php to match content.php
  • Remove sample JPG since Twenty Twelve ships with no default header images

... and style updates, props drewstrojny

  • Better footer styles
  • Styling for full-width layouts
  • Add basic styles for archive views
  • Refine post header/footer styles a bit

#12 @lancewillett
12 years ago

In working on the comment markup I realized instead of hacking it to pieces with a custom callback passed to wp_list_comments() we should eat our own dogfood and improve the markup that WP spits out by default.

The only reason we might still keep the custom Twenty Twelve comments callback is to use HTML5 semantic elements.

Otherwise: see #20088 for my patch and more details.

#13 @lancewillett
12 years ago

In [19957]:

Twenty Eleven and Twenty Twelve: fix incorrect end HTML comment left over from Twenty Ten.

See #19978.

#14 @lancewillett
12 years ago

In [19958]:

Twenty Twelve style updates, props drewstrojny. See #19978.

And, use a simpler and more consistent site-header class value. Props iandstewart.

#15 @lancewillett
12 years ago

In [19959]:

Twenty Twelve: no need to translate the footer generator URL. See #19978.

#16 @lancewillett
12 years ago

In [19960]:

Twenty Twelve: add ARIA role of "navigation" to the all nav elements. Props iandstewart, see #19978.

#17 @lancewillett
12 years ago

In [19961]:

Twenty Twelve: no need for threaded comment reply JS to load if comments are closed. Props iandstewart, see #19978.

#18 follow-up: @nacin
12 years ago

In [19963]:

Revert [19959]. The footer generator URL should be translated (think pt.wordpress.org). see #19978.

#19 in reply to: ↑ 18 ; follow-up: @lancewillett
12 years ago

Replying to nacin:

Revert [19959]. The footer generator URL should be translated (think pt.wordpress.org)

Interesting ... seems really odd to me that a URL would be translated, versus using a plugin or server-side redirect to send people to the correct site.

#20 in reply to: ↑ 19 @nacin
12 years ago

Replying to lancewillett:

Replying to nacin:

Revert [19959]. The footer generator URL should be translated (think pt.wordpress.org)

Interesting ... seems really odd to me that a URL would be translated, versus using a plugin or server-side redirect to send people to the correct site.

There is code on wordpress.org to detect the user's language and suggest a local site for them. However, local sites are distinct entities, with their own showcase, forums, blog, etc., not simply a translated version of wordpress.org. So we treat them as such, and translate URLs like http://wordpress.org, http://wordpress.org/support/, etc.

#21 follow-up: @nacin
12 years ago

In [19969]:

Twenty Twelve always trumps its pretenders. see #19978.

#22 @chipbennett
12 years ago

  • Cc chip@… added

I would be happy to take on any tasks that you might want to throw my way: inline docs, code cleanup, guidelines conformance, best practice/coding standards, functionality. Just let me know how I can help!

#23 follow-up: @Mamaduka
12 years ago

Google web font Open Sans is released under Apache License v2.0, which is compatible only with GPL v3, can we still use it?

Last edited 12 years ago by Mamaduka (previous) (diff)

#24 in reply to: ↑ 23 ; follow-up: @chipbennett
12 years ago

Replying to Mamaduka:

Google web font Open Sans is released under Apache License v2.0, which is compatible only with GPL v3, can we still use it?

FYI, here is the list of repository-acceptable font licenses. Apache License isn't on that list.

#25 in reply to: ↑ 24 ; follow-up: @Mamaduka
12 years ago

Replying to chipbennett:

Replying to Mamaduka:

Google web font Open Sans is released under Apache License v2.0, which is compatible only with GPL v3, can we still use it?

FYI, here is the list of repository-acceptable font licenses. Apache License isn't on that list.

Checked that list first and asked here only to be sure, that we didn't miss something in Theme Review guidelines.

#26 in reply to: ↑ 25 @chipbennett
12 years ago

Replying to Mamaduka:

Checked that list first and asked here only to be sure, that we didn't miss something in Theme Review guidelines.

The list in the Guidelines is compiled/maintained by external projects (GNU and Fedora; see links in the Guidelines). I just double-checked the original sources, and neither one has added Apache 2.0 as a GPL-compatible font license.

Also, it appears that Apache defers to FSF regarding the Apache license incompatibility with GPLv2.

#27 follow-up: @Mamaduka
12 years ago

So that font needs to be removed/changed.

#28 in reply to: ↑ 27 ; follow-up: @nacin
12 years ago

Replying to Mamaduka:

So that font needs to be removed/changed.

We won't be releasing any theme with a non-GPLv2 font, so yes.

#29 @lancewillett
12 years ago

In [20003]:

Twenty Twelve: use the time element for image attachment views, and esc_html() for get_the_date() in the element's output. Props iandstewart, see #19978.

#30 @lancewillett
12 years ago

In [20006]:

Twenty Twelve: better "no posts found" message and action for index view. If a logged-in user can edit posts, show an appropriate message. Otherwise, show the normal "no posts found" message. See #19978.

#31 follow-up: @lancewillett
12 years ago

In [20007]:

Twenty Twelve: add support for toggling the navigation menu in small screens. See #19978.

Triggered when a viewport is under 600 pixels wide. This functionality depends on JS being enabled, and will naturally fall back to a normal, expanded menu for a client without JS.

Props iandstewart for the original JS file and concept.

#32 @lancewillett
12 years ago

In [20009]:

Twenty Twelve: correctly enqueue the fonts CSS file, see #19978.

#33 @lancewillett
12 years ago

In [20010]:

Twenty Twelve: better comment markup and styles, props drewstrojny. See #19978.

#34 @lancewillett
12 years ago

In [20011]:

Twenty Twelve: remove an unneeded, presentational class value, see #19978.

#35 @jdingman
12 years ago

  • Cc jdingman@… added

#36 in reply to: ↑ 28 ; follow-up: @nacin
12 years ago

Replying to nacin:

Replying to Mamaduka:

So that font needs to be removed/changed.

We won't be releasing any theme with a non-GPLv2 font, so yes.

Sorry, I didn't have all the facts. The font is not packaged with the theme. It links directly from Google Web Fonts.

#37 in reply to: ↑ 36 ; follow-up: @Mamaduka
12 years ago

Replying to nacin:

Sorry, I didn't have all the facts. The font is not packaged with the theme. It links directly from Google Web Fonts.

That means we can approve themes that use non-GPL fonts linked from Google Web Fonts.

#38 @lancewillett
12 years ago

Font issue update:

Matt gave us his approval for using Open Sans in the default theme, as long as it’s a theme option—off by default—and not bundled directly with the theme.

I’m fine with having an option to turn on linked google fonts

I don’t think the license of the font being apache 2 is a minus — the options for fonts aren’t great and that’s probably more efficient than GPL

for a font you really want something like LGPL or apache so you don't get into anything weird with licensing of documents / things created with the font

The bottom line is since the font will be off by default the theme should still look great without it.

#39 in reply to: ↑ 37 @chipbennett
12 years ago

Replying to Mamaduka:

Replying to nacin:

Sorry, I didn't have all the facts. The font is not packaged with the theme. It links directly from Google Web Fonts.

That means we can approve themes that use non-GPL fonts linked from Google Web Fonts.

If it's not bundled with the Theme, then there is no licensing issue whatsoever.

I think Matt's suggestion (via Lance's comment) is a perfectly sane approach (though I don't know why it would need to be disabled by default?).

#40 @drewstrojny
12 years ago

though I don't know why it would need to be disabled by default?

The reason we're leaving it off by default is for RTL and non-supported languages. Otherwise, those users would have a broken default experience.

#41 @nacin
12 years ago

The reason we're leaving it off by default is for RTL and non-supported languages. Otherwise, those users would have a broken default experience.

Assuming Matt, Lance, and Drew don't object to it being a default for other reasons, we can easily code it to be a default except for in non-supported languages.

#42 follow-up: @drewstrojny
12 years ago

Assuming Matt, Lance, and Drew don't object to it being a default for other reasons, we can easily code it to be a default except for in non-supported languages.

I'd be on board, but we'd also have to consider setting the appropriate character sets based on the language. Otherwise those users would be required to manually choose a character set, and have a broken experience by default. I'm not familiar with the nitty gritty on how that would all work, but if you're confident it would be comprehensive, I'm all for it.

Loading all character sets by default would be another option, but that's adding a bunch of extra bloat and decreasing page load time for everyone, which I don't think is a good idea.

#43 in reply to: ↑ 42 @lancewillett
12 years ago

Replying to drewstrojny:

Assuming Matt, Lance, and Drew don't object to it being a default for other reasons, we can easily code it to be a default except for in non-supported languages.

Yep, let's shoot for that. A quick check of the language and load the necessary language sets on demand—instead of loading *all* sets for everyone.

#44 @lancewillett
12 years ago

( In [20017] Twenty Twelve: make proper use of the cached jQuery collection in navigation.js, props mattwiebe. Fixes #20131. )

#45 follow-up: @ocean90
12 years ago

19978-ssl-webfont.patch

Google allows us to load fonts via https too. We should use this if is_ssl() is true.

(#16560 would be good now.)

#46 in reply to: ↑ 21 @lancewillett
12 years ago

Replying to nacin:

In [19969]:

Twenty Twelve always trumps its pretenders. see #19978.

Nacin, can you revert r19969? Then we should probably move this ticket to "Future Release".

#47 follow-up: @nacin
12 years ago

[19969] and the surrounding code is gone in core, see #20103.

#48 in reply to: ↑ 47 @lancewillett
12 years ago

Replying to nacin:

[19969] and the surrounding code is gone in core, see #20103.

Woot.

#49 in reply to: ↑ 45 @emiluzelac
12 years ago

  • Cc emil@… added

Replying to ocean90:

19978-ssl-webfont.patch

Google allows us to load fonts via https too. We should use this if is_ssl() is true.

(#16560 would be good now.)

I don't think that is_ssl() is necessary at all. (less is more)

This works well for both and there are no issues with any of the servers that I manage for my clients:
@import url(//fonts.googleapis.com/css?family=Droid+Sans);

Also see what Google itself does when loading fonts (same thing):

Emil

Last edited 12 years ago by emiluzelac (previous) (diff)

#50 @kwight
12 years ago

  • Cc kwight@… added

#51 @nacin
12 years ago

  • Milestone changed from 3.4 to Future Release

Per dev chat today.

#52 follow-ups: @chipbennett
12 years ago

Out of curiosity: would it be possible for the default Theme actually to use the default output of wp_list_comments()?

I've noticed that Twenty Ten, Twenty Eleven, and now Twenty Twelve all use custom callbacks wp wp_list_comments() output. Given the prominence of the default Theme, and its likelihood to be used to fork and/or to create child Themes, IMHO it makes sense that the default Theme should use the default output for comments - or else, if the core-defined markup is inadequate, perhaps the core output should be updated?

#53 in reply to: ↑ 52 ; follow-up: @nacin
12 years ago

Replying to chipbennett:

Out of curiosity: would it be possible for the default Theme actually to use the default output of wp_list_comments()?

I've noticed that Twenty Ten, Twenty Eleven, and now Twenty Twelve all use custom callbacks wp wp_list_comments() output. Given the prominence of the default Theme, and its likelihood to be used to fork and/or to create child Themes, IMHO it makes sense that the default Theme should use the default output for comments - or else, if the core-defined markup is inadequate, perhaps the core output should be updated?

http://core.trac.wordpress.org/ticket/19978#comment:12

#54 in reply to: ↑ 53 @chipbennett
12 years ago

Replying to nacin:

Replying to chipbennett:

Out of curiosity: would it be possible for the default Theme actually to use the default output of wp_list_comments()?

I've noticed that Twenty Ten, Twenty Eleven, and now Twenty Twelve all use custom callbacks wp wp_list_comments() output. Given the prominence of the default Theme, and its likelihood to be used to fork and/or to create child Themes, IMHO it makes sense that the default Theme should use the default output for comments - or else, if the core-defined markup is inadequate, perhaps the core output should be updated?

http://core.trac.wordpress.org/ticket/19978#comment:12

#facepalm

Thanks, Nacin. Not sure how I missed that.

#55 in reply to: ↑ 52 @lancewillett
12 years ago

Replying to chipbennett:

Out of curiosity: would it be possible for the default Theme actually to use the default output of wp_list_comments()?

See #20088 and my notes in http://wpdevel.wordpress.com/2012/02/20/team-update-twenty-twelve-3/

#56 in reply to: ↑ 31 ; follow-up: @dimadin
12 years ago

  • Cc forumi@… added

Replying to lancewillett:

In [20007]:

Twenty Twelve: add support for toggling the navigation menu in small screens. See #19978.

Triggered when a viewport is under 600 pixels wide. This functionality depends on JS being enabled, and will naturally fall back to a normal, expanded menu for a client without JS.

Props iandstewart for the original JS file and concept.

navigation.js is enqueued in the wrong way. There is no need for wp_enqueue_script( 'jquery' ), and $deps argument in wp_enqueue_script() should be array, not string. Attached patch fixes this.

twentytwelve_scripts() should be called later so that jQuery is loaded in footer too (if it's not called earlier by some plugin). Also, navigation.js could get minification.

#57 in reply to: ↑ 56 @lancewillett
12 years ago

navigation.js is enqueued in the wrong way. There is no need for wp_enqueue_script( 'jquery' ), and $deps argument in wp_enqueue_script() should be array, not string.

Thanks for the notes, dirmadin. Will fix up that up soon.

I disagree on loading the JS later; and we probably won't minify JS in the default theme. You can certainly do it on your end, in production.

#58 @ocean90
12 years ago

Related: #20190 (Not sure if separate tickets are favored in this state.)

#59 @nacin
12 years ago

In [20219]:

Remove Twenty Twelve from 3.4. see #19978. see http://wp.me/pbNCB-yA.

#60 @nacin
12 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed
  • Type changed from task (blessed) to feature request

#61 @nacin
12 years ago

  • Milestone set to 3.5
  • Resolution maybelater deleted
  • Status changed from closed to reopened
  • Type changed from feature request to task (blessed)

#62 @alexvorn2
12 years ago

nice theme!
about the screenshot of the theme... need 250 px height, the current one has 200 px.

#63 follow-up: @drewstrojny
12 years ago

about the screenshot of the theme... need 250 px height, the current one has 200 px.

Let me know the exact dimensions for the screenshot and I'll work up a new one, it needs to be updated anyhow.

#64 @navjotjsingh
12 years ago

  • Cc navjotjsingh@… added

#65 in reply to: ↑ 63 @nacin
12 years ago

Replying to drewstrojny:

Let me know the exact dimensions for the screenshot and I'll work up a new one, it needs to be updated anyhow.

300px wide, 225px tall (not 250).

#66 @emiluzelac
12 years ago

Please see screenshot

  • Recommended 4:3 W:H ratio, size 300x225px.
  • Maximum size: 320:240px

that's exactly what Nacin is saying :)

#67 @drewstrojny
12 years ago

Replying to nacin:

300px wide, 225px tall (not 250).

Got it, thanks gents. Just to clear my name, I wasn't the one who created the current screenshot. I'm not saying who did, I would never throw Lance under the bus like that :)

#68 @nacin
12 years ago

In [21261]:

The Twenty Twelve for WordPress.

props drewstrojny, lancewillett.

also props corvannoorloos, jeffsebring, kobenland, iandstewart, mfields,
mtdesign, op12no2, philiparthurmoore, sixhours, mamaduka.

see #19978.

#69 @nacin
12 years ago

I am going to close out this ticket. Everyone should open new tickets for new issues. Feel free to cross-post them here.

#70 @nacin
12 years ago

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

I opened #21226 for the background color and #21227 for the screenshot.

#71 @lancewillett
12 years ago

Noting two recently added related tickets ...

  • #21065 Updating allowed tags
  • #21064 Recent Posts widget: provide optional post date display

.. and two older ones we might want to put in 3.5:

  • #20088 Improve comments markup
  • #19627 Themes should be able to opt-in to a static front page

#72 @DrewAPicture
12 years ago

Also, #21238 covers issues with the Sticky/Featured Post badge.

#73 follow-up: @DrewAPicture
12 years ago

Edit: See comment:73

Last edited 12 years ago by DrewAPicture (previous) (diff)

#74 in reply to: ↑ 73 @Mamaduka
12 years ago

Replying to DrewAPicture:

#21223 Make title truly pluggable

Wrong ticket, here's correct one - #21233

#75 @ramiy
12 years ago

#21256 ticket could be related to Twenty Twelve theme.

#76 @mrwweb
12 years ago

Relevant new ticket: #21942

Note: See TracTickets for help on using tickets.