#29127 closed defect (bug) (fixed)
Bundled Themes: fix escaping and minor code style issues
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
Not urgent, but all bundled themes needed a look with PHP Code Sniffer and plugins like Theme Check and VIP Scanner to catch anything we've missed (or was introduced after the last thorough check).
Attachments (9)
Change History (26)
@
11 years ago
Twenty Eleven cleanup: note — removes extract()
from Twenty_Eleven_Ephemera_Widget
code, see #22400
#2
follow-up:
↓ 3
@
11 years ago
For the WordPress Coding Standards sniffs, I've had to exclude WordPress.WhiteSpace.ScopeIndent.Incorrect
because the themes and plugins I'm working on never pass them without serious code adjustments that I'm not comfortable making due to readability and such. If you end up using every Coding Standards rule and excluding nothing, can you note that? I want to make sure that I'm following the examples of the default themes as closely as possible but a few of these rulesets are very tedious without big payback. (In general I love them, though, and have been scanning everything with them.)
#3
in reply to:
↑ 2
@
11 years ago
Replying to philiparthurmoore:
If you end up using every Coding Standards rule and excluding nothing, can you note that?
Yes, I added this to WordPress/ruleset.xml
(might not be the best way to do it, but worked for me):
<rule ref="WordPress.WhiteSpace.ScopeIndent"> // Ignore wp-content/themes/ entirely for scope indent checks. <exclude-pattern>*/wp-content/themes/*</exclude-pattern> </rule>
#4
follow-ups:
↓ 5
↓ 6
@
11 years ago
- Milestone changed from 4.0 to Future Release
Twenty Fourteen patch looks good.
Twenty Thirteen patch:
- Can we move the definition of
$style
to the top of the function?
Twenty Twelve patch:
- In
header.php
: Addingesc_url()
aroundheader_image()
will not work, as it echoes its content. - Can we move the definition of
$style
to the top of the function? - Let's keep the new line at end of file in
inc/custom-header.php
.
Twenty Eleven patch:
- Do we allow HTML in the site description? If we do, using
esc_html()
around the site description might break things. - In
header.php
: Addingesc_url()
aroundheader_image()
will not work, as it echoes its content.
Twenty Ten patch:
- In
category.php
: Usingesc_html()
around the category description might break things. - If we allow HTML in the site description, using
esc_html()
around the site description might break things. - In
header.php
: Addingesc_url()
aroundheader_image()
will not work, as it echoes its content.
#6
in reply to:
↑ 4
@
11 years ago
Replying to obenland:
- Can we move the definition of
$style
to the top of the function?- In
header.php
: Addingesc_url()
aroundheader_image()
will not work, as it echoes its content.- In
category.php
: Usingesc_html()
around the category description might break things.
Fixed.
- Do we allow HTML in the site description? If we do, using
esc_html()
around the site description might break things.
Fixed. We do not allow HTML, and it's escaped with esc_html()
already: see https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php#L3303
#16
@
10 years ago
- Keywords needs-testing needs-refresh removed
- Resolution set to fixed
- Status changed from new to closed
Open new tickets for new issues.
Twenty Fourteen cleanup