Opened 13 years ago
Closed 13 years ago
#21230 closed enhancement (fixed)
Twenty Twelve: Namespace all the things
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
Per the WPTRT guidelines:
Themes are required to use a unique slug as a prefix for anything in the public namespace
I hope I cought it all - if not, this ticket might serve for all namespace related issues.
Attachments (2)
Change History (17)
#2
in reply to:
↑ 1
@
13 years ago
Replying to nacin:
The archive.php changes modify a de facto standard that has found its way into Twenty Eleven and a number of wpcom-themes. (Twenty Ten does not have tag/category descriptions shown in the theme.)
So wouldn't now be the perfect time to change that? :)
We have
'twentytwelve_author_bio_avatar_size'
'twentytwelve_attachment_size'
'twentytwelve_default_theme_options'
'twentytwelve_options_validate'
- even
'twentytwelve_credits'
so prefixing the last two would just make sense.
#4
follow-up:
↓ 6
@
13 years ago
I'm only referring tag_archive_meta and category_archive_meta. 16 different themes in http://wpcom-themes.svn.wordpress.org, including Twenty Eleven, Toolbox, and _s, use these "generic" filters. I'll defer to lancewillett and iandstewart as to whether they have seen this as intentional, or just subconscious copy-paste.
#5
@
13 years ago
A standard could be adopted where the prefix of all the things (variables and hooks introduced by the theme) could be "theme." Justification: It's not like plugins where conflicts can occur as only one theme runs at a time, and its simple and copy/paste friendly. Just an idea. I'm not sure if or how many core function/variable/hooks use "theme" as a prefix tho.
#6
in reply to:
↑ 4
@
13 years ago
Replying to nacin:
I'm only referring tag_archive_meta and category_archive_meta. 16 different themes in http://wpcom-themes.svn.wordpress.org, including Twenty Eleven, Toolbox, and _s, use these "generic" filters. I'll defer to lancewillett and iandstewart as to whether they have seen this as intentional, or just subconscious copy-paste.
Not intentional, we should prefix all the things.
#7
follow-up:
↓ 8
@
13 years ago
Do we even need those filters, in that case? They seem redundant as there's a filter in tag_description(), etc.
#8
in reply to:
↑ 7
;
follow-up:
↓ 9
@
13 years ago
Replying to nacin:
Do we even need those filters, in that case? They seem redundant as there's a filter in tag_description(), etc.
Good point. I vote to remove in favor of existing filters in core.
#9
in reply to:
↑ 8
;
follow-ups:
↓ 10
↓ 11
@
13 years ago
I was just testing it, and the descriptions get put out as part of the <h1>
tag. Is this by design?
#10
in reply to:
↑ 9
@
13 years ago
Replying to obenland:
I was just testing it, and the descriptions get put out as part of the
<h1>
tag. Is this by design?
That's probably a regression, I'll double check with Drew and fix it up.
#11
in reply to:
↑ 9
@
13 years ago
Replying to obenland:
I was just testing it, and the descriptions get put out as part of the
<h1>
tag. Is this by design?
@obenland, can you open a new ticket for the archive h1 thing? Keeping this one for the namespacing and filter issue.
#12
@
13 years ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In [21268]:
#13
@
13 years ago
Alright, with templates not being in the public namespace and the two filters gone - that leaves the two script/style handles in functions.php
--> 21230.2.diff
Technically, templates are not loaded in the public namespace, so the stuff in image.php is not necessary. The functions.php changes look proper. The archive.php changes modify a de facto standard that has found its way into Twenty Eleven and a number of wpcom-themes. (Twenty Ten does not have tag/category descriptions shown in the theme.)