Commit Graph

57 Commits

Author SHA1 Message Date
Ismail El Korchi f94fc1e59b Fix PHP, CSS AND JS coding standards 2020-04-05 21:49:27 +01:00
bmcculley d1bb60c041 escape get_the_title
use wp_kses_post function on get_the_title to prevent potential
malicious issues.

Add wp_body_open() shim for sites older than 5.2

Bottom margin in image alignment

As proposed in #1273, `margin-botom: 1.5em;` added to all three image alignment classes.

tab line 178 inc/woocommerce.php

tab line 61 inc/custom-header.php

update additional get_the_title instances

switch from esc_html to wp_kses_post
2020-03-29 16:55:05 -04:00
jrfnl 98e3e75109 CS: prefix all variables
While template files are intended to be included from within a function, this doesn't guarantee they always will be.

Therefore all variables declared within template files also need to be prefixed with a theme specific prefix.

As these are "local" variables, renaming them does not constitute a BC-break.
2018-02-27 14:34:54 +01:00
Ulrich Pogson b26b6ebfa4 Move PHP tags on it’s own line & correct indention
This fixes a few of the errors from the news sniffs in WPCS 0.12.0 and also standardizes the indention between the PHP and HTML
2018-02-27 14:34:53 +01:00
Laurel cd10ba650b
Merge pull request #1231 from webmandesign/patch-2
Fixing localization function inside `printf()`
2018-01-26 09:43:17 -08:00
Oliver Juhas eb3945f37b
Fixing localization function inside `printf()` 2017-11-05 19:13:42 +01:00
Sergey Biryukov e5da804748
Fix comment number comparison in comments.php 2017-11-01 03:05:24 +01:00
Bappi 6bc640792a Update template hierarchy link 2017-10-29 14:51:29 +06:00
Truong Giang 9fcb8dab40 Correct code indentation 2017-07-27 00:37:56 +07:00
Jasper de Groot 34ab8ea00f Remove superfluous check from comment template (#935) 2017-07-14 11:52:14 -04:00
Dmitry Mayorov 8e67439859 Add comment navigation template tags 2017-06-30 15:25:57 +05:00
David A. Kennedy f56a070c2b Remove landmark roles
* With better browser support, these roles aren't needed now.
* Most newer browsers imply them via HTML5 semantics. See: http://html5doctor.com/on-html-belts-and-aria-braces/

Fixes #1132
2017-06-23 12:41:05 -04:00
jrfnl fd701834ff Add translator comments as the strings contain variables. 2016-12-23 15:59:15 +01:00
jrfnl 8dbca77003 Fix translatability of comments title.
As per the guidelines in https://codex.wordpress.org/I18n_for_WordPress_Developers#Plurals

This fixes an error notice which WPCS will start throwing once the - soon to be released - 0.10.0 version has become stable.
2016-12-23 15:47:35 +01:00
Tammie Lister e39f5e55db Merge pull request #1009 from B-07/patch-4
Add end comment
2016-12-23 12:20:57 +00:00
Bappi 354ff52901 Remove period from file header 2016-09-27 12:20:40 +06:00
Bappi c7cea499fc Add end comment
On line no 36
2016-08-17 08:24:36 +06:00
jrfnl 8470f55f92 Avoid going in and out of PHP unnecessarily.
Closes #854

Includes minor alignment changes for easier readability/detection of start/end of conditions.
2015-11-11 22:59:40 +01:00
Grant Palin af0a4749be Update comparisons to resolve the strict comparison warnings. See https://github.com/Automattic/_s/issues/784 2015-08-07 09:59:26 -07:00
PJ de9c9888b7 Updated documentation in comments at the top of files.
I tried to standardize and expand the documentation and links to
codex.wordpress.org in the comments at the top of most files.
2015-07-12 12:38:18 -04:00
Fränk Klein 175524922c Fix Codesniffer errors. 2015-05-27 22:19:14 +02:00
Fränk Klein 2aef92e5a3 Fix remaining PHPCS errors:
* Add ignoring in template-tags.php and comments.php.
* Escape header text color in custom-header.php.
2015-05-11 09:18:36 +02:00
Fränk Klein 062105ac9d Escape translations on comments.php.
See #737.
2015-05-05 12:37:07 +02:00
Philip Arthur Moore ff6337943b Better coding standards. See #737. 2015-04-29 08:32:11 +07:00
Stefan Brechbühl e45aff27ed Consistent navigation
Handle the comment navigation the same way as the new the_post_navigation() and the_posts_navigation().
2015-02-14 12:21:53 +01:00
Jack Lenox 0b96c02e02 Undid my multiline function corrections 2014-06-25 10:31:51 +01:00
Jack Lenox 776eaf6e94 Correcting some irregular capitalisation and coding standards issues 2014-06-25 00:13:36 +01:00
Satrya c780103027 There is no more _s_comment() in inc/template-tags.php 2014-02-07 23:08:48 +07:00
obenland 28a3044da9 _s: Minor formatting update. 2014-01-20 20:34:10 -08:00
Ulrich Pogson 4f2b0fab63 Add necessary arguments 2013-12-24 00:26:50 +01:00
Ulrich Pogson a29f2773aa Remove arguments 2013-12-22 22:01:16 +01:00
Ulrich Pogson cb52da6f23 Remove _s_comment 2013-12-22 21:33:16 +01:00
Philip Arthur Moore 6264437ff9 Add braces around single-line conditionals. See http://make.wordpress.org/core/2013/11/13/proposed-coding-standards-change-always-require-braces/. 2013-11-14 19:49:50 +07:00
Aahan Krish 1e1fd565e1 Removed extra indentation on div#comments 2013-10-10 22:46:32 +05:30
Brad Parbs bf6ecae7c4 minor code comment comma grammar fixes 2013-08-21 12:04:29 -05:00
Patrick Rauland 3d98e794d3 also changing overload to override in comments.php & archive.php 2013-08-20 07:27:46 -05:00
michaeldcain 31331b4b64 Switch "navigation-" back to "-navigation"
Original edit not needed for `[class*="navigation"]` selector. Matches
other class/id navigation naming conventions.
2013-07-11 16:42:45 -04:00
Jason Hoffmann b790c82151 Comments.php Spelling Issue 2013-05-20 14:12:09 -04:00
obenland 456cd3dd01 _s: Removes unnecessary switch in and out of PHP. 2013-04-28 04:13:55 -07:00
obenland 6056c1ed66 _s: Re-introduce `nav-` prefix for previous/next links.
This way we can select both links with `[class*="nav-"]`.
2013-04-05 09:34:08 -07:00
Philip Arthur Moore fe19f5433b Ditch all @since DocBlocks from theme. 2013-03-18 14:53:23 -05:00
obenland 1ba2f62752 _s: Use .screen-reader-text rather than .assistive-text.
With 3.6 introducing many HTML5 improvements the need for custom
searchform and comment templates will vanish. To cope with core's
.screen-reader-text class, let's make the switch early.

Commit also adds core's focus styles for screen reader texts, so they
can actually be used.
2013-03-13 15:39:05 -07:00
obenland c4f2aa32ce _s: Formatting changes:
- Reduce element comments to either the element id or the first element
class.
- Tabs > Spaces.
- Improve adherence to formatting guidelines.
2013-03-04 16:41:38 -08:00
obenland ad57a4af29 _s: Move role declaration to the end of the element for consistency. 2013-02-27 14:51:13 -08:00
obenland fa3d86936a _s: Simplify and unify navigation classes throughout Underscores.
For more information about the philosophy behind the new approach,
see http://24ways.org/2012/a-harder-working-class/
2013-02-27 14:47:03 -08:00
obenland d99f4c8115 _s: Adhere to WordPress CSS class naming conventions. See
http://make.wordpress.org/core/handbook/coding-standards/css/#selectors
for details.
2013-02-27 14:03:03 -08:00
Brian Fegter ec4c855158 Updated 'comments callback' location comment
The function has been moved outside of 'functions.php' and into 'inc/template-tags.php'. This directs developers to the proper location for the callback.
2013-02-12 10:40:31 -06:00
obenland 6793718e8a _s: Provide a context for the comments title strings.
There are languages that have more than one plural form. Sometimes these
languages need to add the %1$s placeholder in the original singular
version to help differentiate between these plural forms.

In case the original singular version ('One thought on
“%2$s”' in this case) is used elsewhere, the translation
with the faulty %1$s will be used, possibly ending up with the
placeholder not being replaced.

The context will prevent that from happening by seperating the strings.
2013-01-14 16:38:39 -08:00
Lance Willett 473b835299 Merge pull request #25 from kwight/comments-php-comment
Corrected reference to location of _s_comment(). Props kwight.
2012-08-06 16:14:24 -07:00
Kirk Wight 603369e307 Corrected reference to location of _s_comment()
* _s_comment() is now located in inc/template-tags.php, rather than
functions.php as stated
2012-06-12 17:42:14 -04:00