WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 22 months ago

Last modified 19 months ago

#19978 closed task (blessed) (fixed)

Twenty Twelve

Reported by: 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 2 years ago.
Include the files for Twenty Twelve in the 3.4 upgrade process!
19978-ssl-webfont.patch (903 bytes) - added by ocean90 2 years ago.
navigation_enqueuing.patch (686 bytes) - added by dimadin 2 years ago.

Download all attachments as: .zip

Change History (79)

comment:1 nacin2 years ago

In [19843]:

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

comment:2 lancewillett2 years ago

  • Cc lancewillett drewstrojny added

comment:3 nacin2 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.

comment:4 follow-up: nacin2 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.

comment:5 lancewillett2 years ago

  • Description modified (diff)

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

comment:6 Mamaduka2 years ago

  • Cc georgemamadashvili@… added

comment:7 DrewAPicture2 years ago

  • Cc xoodrew@… added

comment:8 ocean902 years ago

  • Cc ocean90 added

comment:9 hd-J2 years ago

  • Cc jeremy@… added

markmcwilliams2 years ago

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

comment:10 in reply to: ↑ 4 Mamaduka2 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

Version 0, edited 2 years ago by Mamaduka (next)

comment:11 lancewillett2 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

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

comment:13 lancewillett2 years ago

In [19957]:

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

See #19978.

comment:14 lancewillett2 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.

comment:15 lancewillett2 years ago

In [19959]:

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

comment:16 lancewillett2 years ago

In [19960]:

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

comment:17 lancewillett2 years ago

In [19961]:

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

comment:18 follow-up: nacin2 years ago

In [19963]:

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

comment:19 in reply to: ↑ 18 ; follow-up: lancewillett2 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.

comment:20 in reply to: ↑ 19 nacin2 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.

comment:21 follow-up: nacin2 years ago

In [19969]:

Twenty Twelve always trumps its pretenders. see #19978.

comment:22 chipbennett2 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!

comment:23 follow-up: Mamaduka2 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 2 years ago by Mamaduka (previous) (diff)

comment:24 in reply to: ↑ 23 ; follow-up: chipbennett2 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.

comment:25 in reply to: ↑ 24 ; follow-up: Mamaduka2 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.

comment:26 in reply to: ↑ 25 chipbennett2 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.

comment:27 follow-up: Mamaduka2 years ago

So that font needs to be removed/changed.

comment:28 in reply to: ↑ 27 ; follow-up: nacin2 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.

comment:29 lancewillett2 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.

comment:30 lancewillett2 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.

comment:31 follow-up: lancewillett2 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.

comment:32 lancewillett2 years ago

In [20009]:

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

comment:33 lancewillett2 years ago

In [20010]:

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

comment:34 lancewillett2 years ago

In [20011]:

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

comment:35 jdingman2 years ago

  • Cc jdingman@… added

comment:36 in reply to: ↑ 28 ; follow-up: nacin2 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.

comment:37 in reply to: ↑ 36 ; follow-up: Mamaduka2 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.

comment:38 lancewillett2 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.

comment:39 in reply to: ↑ 37 chipbennett2 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?).

comment:40 drewstrojny2 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.

comment:41 nacin2 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.

comment:42 follow-up: drewstrojny2 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.

comment:43 in reply to: ↑ 42 lancewillett2 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.

comment:44 lancewillett2 years ago

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

ocean902 years ago

comment:45 follow-up: ocean902 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.)

comment:46 in reply to: ↑ 21 lancewillett2 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".

comment:47 follow-up: nacin2 years ago

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

comment:48 in reply to: ↑ 47 lancewillett2 years ago

Replying to nacin:

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

Woot.

comment:49 in reply to: ↑ 45 emiluzelac2 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 2 years ago by emiluzelac (previous) (diff)

comment:50 kwight2 years ago

  • Cc kwight@… added

comment:51 nacin2 years ago

  • Milestone changed from 3.4 to Future Release

Per dev chat today.

comment:52 follow-ups: chipbennett2 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?

comment:53 in reply to: ↑ 52 ; follow-up: nacin2 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

comment:54 in reply to: ↑ 53 chipbennett2 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.

comment:55 in reply to: ↑ 52 lancewillett2 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/

comment:56 in reply to: ↑ 31 ; follow-up: dimadin2 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.

comment:57 in reply to: ↑ 56 lancewillett2 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.

comment:58 ocean902 years ago

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

comment:59 nacin2 years ago

In [20219]:

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

comment:60 nacin2 years ago

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

comment:61 nacin22 months ago

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

comment:62 alexvorn222 months ago

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

comment:63 follow-up: drewstrojny22 months 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.

comment:64 navjotjsingh22 months ago

  • Cc navjotjsingh@… added

comment:65 in reply to: ↑ 63 nacin22 months 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).

comment:66 emiluzelac22 months ago

Please see screenshot

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

that's exactly what Nacin is saying :)

comment:67 drewstrojny22 months 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 :)

comment:68 nacin22 months 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.

comment:69 nacin22 months ago

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

comment:70 nacin22 months ago

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

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

comment:71 lancewillett22 months 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

comment:72 DrewAPicture22 months ago

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

comment:73 follow-up: DrewAPicture22 months ago

Edit: See comment:73

Last edited 21 months ago by DrewAPicture (previous) (diff)

comment:74 in reply to: ↑ 73 Mamaduka21 months ago

Replying to DrewAPicture:

#21223 Make title truly pluggable

Wrong ticket, here's correct one - #21233

comment:75 ramiy21 months ago

#21256 ticket could be related to Twenty Twelve theme.

comment:76 mrwweb19 months ago

Relevant new ticket: #21942

Note: See TracTickets for help on using tickets.