Commit Graph

1304 Commits

Author SHA1 Message Date
Ismail El Korchi 1df1677846
Merge pull request #1388 from Ismail-elkorchi/fix-wpcs
Fix WordPress Coding Standards for PHP, JS and SCSS files
2020-04-07 20:47:44 +01:00
Niels Lange aa1e770956
Merge pull request #1389 from alihusnainarshad/master
Updated Credits Year of Automattic
2020-04-07 22:48:07 +07:00
Ali Husnain Arshad f1e2c8dc08
Updated Credits Year of Automattic
from 2017 to 2020
2020-04-07 18:39:37 +05:00
Ismail El Korchi d4ef6775d1 Add instruction to replace the _S_VERSION in the readme file 2020-04-06 22:26:57 +01:00
Ismail El Korchi f94fc1e59b Fix PHP, CSS AND JS coding standards 2020-04-05 21:49:27 +01:00
Ismail El Korchi 2351bef6ca
Merge pull request #1367 from devcogs/comments-1366
escape get_the_title
2020-04-05 17:57:01 +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
Ismail El Korchi 04ead0d757
Merge pull request #1385 from wpamitkumar/wpamitkumar
Update reference link URL & Fix Typo Error.
2020-03-28 12:31:21 +01:00
Amit Dudhat 72013c79c0 Update reference link URL & Fix Typo Error. 2020-03-28 16:03:01 +05:30
Arnab Wahid 132319ee8e
Merge pull request #1301 from arnabwahid/master
image alignment fix + mitigate build error in `woocommerce.php`
2020-03-23 22:47:07 +00:00
Ismail El Korchi 154ffe9cf2
Merge pull request #1350 from DannyCooper/master
Add wp_body_open() and shim for sites older than 5.2
2020-03-18 16:49:10 +01:00
Danny Cooper 8573a2a325 Add wp_body_open() shim for sites older than 5.2 2019-03-28 14:13:32 +00:00
Chris Runnells 28f0a5b4e5
Merge pull request #1332 from ponsfrilus/master
README: Harmonized punctuation in this ordered list
2019-02-12 14:50:29 -10:00
Nicolas Borboën 26a1c007dd
Merge pull request #1 from ponsfrilus/ponsfrilus-patch-1
Punctuation in ordered list (README.md)
2018-11-27 15:08:06 +01:00
Nicolas Borboën f4d3ee7f8a
Punctuation in ordered list
Harmonized punctuation in this ordered list.
2018-11-27 15:05:38 +01:00
Ulrich Pogson c3a4a7f860
Merge pull request #1296 from arnabwahid/master
Remove Microformat Classes `.hentry`
2018-11-11 20:52:27 +01:00
Ulrich Pogson 550c2481d2
Merge pull request #1283 from bahiirwa/master
Add WooCommerce to docs
2018-11-11 20:51:55 +01:00
Ulrich Pogson c0bea3ea0e
Merge pull request #1320 from szepeviktor/patch-2
Unscramble echo to readable printf
2018-11-11 17:15:17 +01:00
Viktor Szépe 399c891927
Unscramble echo to readable printf
Is it OK?
2018-09-22 06:51:58 +02:00
Arnab Wahid bf61e8ffbe 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
2018-06-27 13:59:10 +05:30
arnabwahid a52ca7441d Remove Microformat Classes `.hentry`
Discussed in #1268
This PR removes .hentry microformat class, adds `.post` and `.page` instead ( in both `_posts-and-pages.scss` & `style.css` ).
2018-05-30 17:31:09 +05:30
alaczek 9274f322d0
Merge pull request #1255 from Automattic/add-neg-tabindex-to-featured-images
Add 'tabindex=-1' to the featured image markup, to improve accessibil…
2018-05-29 11:25:35 +10:00
alaczek b83226143d
Merge pull request #1262 from mauryaratan/patch-3
Replace http with https in header.php
2018-05-29 11:22:42 +10:00
Laurence Bahiirwa cd103a441f Add WooCommerce to docs
Add details to documentation about the enabled features and how the intergration is linked to theme
2018-04-09 08:54:23 +03:00
Laurel f5f3a0a05b
Merge pull request #1173 from benoitchantre/no-sidebar-class
no-sidebar class
2018-04-06 11:02:47 -07:00
Ulrich Pogson c4ad6256ac
Merge pull request #1279 from mboynes/patch-1
Fix datetime values
2018-04-03 13:48:47 +02:00
Laurel Fulford 43cfcb96dd Add 'tabindex=-1' to the featured image markup, to improve accessibility. 2018-04-02 16:50:45 -07:00
Matthew Boynes 884a7b0821
Fix datetime values 2018-03-16 20:39:14 -04:00
David A. Kennedy 72e34ef6bc
Merge pull request #1267 from jrfnl/feature/cs-update
Bring code style up to the latest standards
- This PR addresses code-style issues identified when testing the code against the WordPress Coding Standards.
2018-03-02 18:45:51 -05:00
Chris Runnells 648d11e2b3
Merge pull request #1229 from SergeyBiryukov/patch-2
Clarify "singularly identifiable articles"
2018-03-02 13:37:07 -10:00
David A. Kennedy da3e0224a4
Merge pull request #1266 from jrfnl/feature/travis-tweaks
Two travis tweaks
- speed up build times by disabling Xdebug
- stop build testing against HHVM, test against nightly
2018-03-02 18:24:07 -05:00
Chris Runnells 2aa0da6abe
Merge pull request #1271 from Automattic/fixes-1148/remove-post-format-function-call
Replace the get_post_format() calls in get_template_part() with get_post_type()
2018-02-28 11:24:59 -10:00
Chris Runnells 8ac4e43a1e
Merge pull request #1272 from Ismail-elkorchi/normalize.css
Update Normalize.css to v8.0.0
2018-02-28 10:53:31 -10:00
Ismail El Korchi 36d551ea40 Update Normalize.css to v8.0.0
Fixes https://github.com/Automattic/_s/issues/1269
2018-02-28 14:22:10 +00:00
Laurel Fulford 47829ce9cd Replace the get_post_format() calls in get_template_part() to complete the post format removal that was started in #1017. Fixes #1148. 2018-02-27 17:07:58 -08:00
jrfnl f03dfdecd5 Contributing: add directive about compliance with WPCS 2018-02-27 15:03:17 +01:00
jrfnl eb091acf66 CS: reformat a very long line
This line was quite unreadable.

Additionally, it was using the "heavy" `wp_kses_data()` function to escape item count phrase, while that phrase should not contain HTML in the first place and therefore can use the lighter `esc_html()` function to do the output escaping.
2018-02-27 14:34:55 +01:00
jrfnl 1abaebcdaa CS: correct indentation of a newly introduced function 2018-02-27 14:34:54 +01: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
jrfnl ec877e48c3 CS: fix up embedded PHP inconsistencies introduced in the mean time. 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
jrfnl 54ad32a598 🔖 CS: whitelist two global variable overrides
The one in `functions.php` can be considered a bug in WPCS and has been reported as such.
Once that issue is fixed, the whitelisting can be removed.

The one in `inc/wpcom.php` will need to remain as WPCS does not keep track of globals introduced by wpcom.
2018-02-27 14:34:53 +01:00
jrfnl 7c24fc751d 🔧 PHPCS: remove exclusions
The ruleset contained some exclusions which are no longer needed.
2018-02-27 14:34:53 +01:00
jrfnl cb7117a408 🔧 PHPCS: add a comprehensive PHPCompatibility exceptions ruleset
WordPress provides backfills for a number of PHP native functions and constants.
These can therefore be safely used in themes and plugins.

This commit adds a whitelist for the PHPCompatibility ruleset of the backfills currently provided by WP.

N.B.: At this moment, none of the whitelisted classes/constants/functions/interfaces are used in `_s`.
However, `_s` is also a teaching tool and an example for others, so having this whitelist block in there serves that purpose and allows for themes which are build onto `_s` to use these PHP features without having to worry about cross-version compatibility notices.
2018-02-27 14:34:52 +01:00
jrfnl cac65d8a54 🔧 PHPCS: enable checking for globals being prefixed
Everything which is defined in the global namespace should be prefixed to prevent conflicts with other themes and plugins.

This snippet enables the sniff which verifies this and tells it which prefix to look for.
2018-02-27 14:34:52 +01:00
jrfnl 60071168e5 🔧 PHPCS: add configuration for array double arrow alignment
This configuration makes the sniff less finicky when all array items are multi-line.

It allow allows for cleaner diffs as an array will not need to be reformatted when the array item with the largest key has been removed.

Refs:
* https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#array-alignment-allow-for-new-lines
* https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#array-alignment-allow-non-exact-alignment
* https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#array-alignment-maximum-column
2018-02-27 14:34:52 +01:00
jrfnl 9ff286964b 🔧 PHPCS: specify the minimum supported WP version
A number of additional sniffs have been added to WPCS which all use the `minimum_supported_version` property to know which WP version to check against.

As setting these properties for each sniff becomes tedious and would necessitate the ruleset to be adjusted each time a new sniff which uses that property becomes available, WPCS now offers a (forward-compatible) way to set the minimum supported WP version for all sniffs in one go.
2018-02-27 14:34:51 +01:00
jrfnl 878fbde6c4 🔧 PHPCS: speed up by checking files in parallel
This uses a new feature which is available since PHPCS 3.x.
The effect will depend on the system on which PHPCS is being run, but if parallel processing can be run, the build should be faster using this option.
2018-02-27 14:34:51 +01:00
jrfnl dd7a1604e6 🔧 PHPCS: clean up the file paths PHPCS shows
This uses a new feature which is available since PHPCS 3.x.
2018-02-27 14:34:50 +01:00
jrfnl c453749f7a 🔧 PHPCS: don't ignore warnings, don't list scanned files
The `-n` flag will ignore warnings completely, while often it is useful to see them and to fix them.

Using `--runtime-set ignore_warnings_on_exit 1` in the Travis script instead, warnings will be shown, both when a developer runs PHPCS on their own machine, as well as in Travis, but warnings will not cause a failed Travis build.

The `-v` flag will list each file being scanned. This is intended for debugging purposes and not needed for normal use.
2018-02-27 14:34:50 +01:00