Commit Graph

1288 Commits

Author SHA1 Message Date
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
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
jrfnl 92d8673e4a 🔧 PHPCS: add section headings
This is intended to make it clearer for a newcomer to PHPCS to understand how the ruleset is build up and what each part of the ruleset means.
2018-02-27 14:34:50 +01:00
jrfnl 94767ab051 🔧 PHPCS: tidy up config file
Comply with strict XML standard.
2018-02-27 14:34:50 +01:00
jrfnl a0d2892cad 🔧 Travis: update the versions used by the various PHPCS libaries
As WPCS and PHPCompatibility were for a little while (May - July 2017) not compatible with PHPCS 3.x, the library tags cloned were previously fixed to prevent issues with that.

As both WPCS as well as the PHPCompatibility standard are now compatible with PHPCS 3.x, the changes made in PR 1110 and PR 1183 can be reverted.

Notes:
* PHPCS - use `master`.
    WPCS uses a limited set of sniffs from PHPCS itself.
    Most of these sniffs are long established, stable and rarely get updated, so using PHPCS `master` should be safe.
* WPCS - use the latest release `0.14.0`.
    WPCS is the main source of CS violations and is under active development. This means that new versions of WPCS will easily break the build, so should be managed.
* PHPCompatibility - use `master`.
    PHPCompatibility checks PHP cross-version compatibility.
    It is actively developed and heavily unit tested, so any new violations found in `_s` because of changes in that library, should actually be addressed in `_s` ASAP.

    The PHPCompatibility library became compatible with PHPCS 3.x and improved compatibility with Composer installs in version `8.0.0` which was a breaking change.
    To account for that, the location where the library is cloned to and the `phpcs --installed_paths` command have been updated.
    Ref: https://github.com/wimg/PHPCompatibility/pull/446
2018-02-27 14:34:49 +01:00
jrfnl 6a0e5b8df1 Travis: stop build testing against HHVM, test against nightly
At some point in time, PHP was lagging behind and HHVM seemed like the future. What with PHP 7 being released and doing incredibly well, that time has passed and the popularity of HHVM is now marginal.

This commit drops testing against HHVM and starts testing against bleeding edge PHP nightly instead.
2018-02-27 09:34:14 +01:00
jrfnl 90e08bd964 Travis: speed up build times by disabling Xdebug
Xdebug is only **needed** when creating code coverage reports. Otherwise, it's just a nice extra, but a slow extra.
Disabling it will speed up the build times.

As suggested by John Blackbourn in https://johnblackbourn.com/reducing-travis-ci-build-times-for-wordpress-projects/

With an additional improvement to stabilize the command as suggested by Niklas Keller in  https://twitter.com/kelunik/status/954242454676475904
2018-02-27 09:33:27 +01:00
Chris Runnells 05511d4846
Merge pull request #1265 from crunnells/fix/1249
Update "Requires at least" version number in readme.txt
2018-02-26 14:59:27 -10:00
Chris Runnells 97620dcd79 Update minimum version requirement
the_custom_logo() was introduced in WP 4.5, so the requirement needed to be updated to reflect this. Fixes #1249
2018-02-26 14:54:27 -10:00
Ram Ratan Maurya 7963cf16c1
Update header.php 2018-02-19 16:07:07 +05:30
Laurel 388951f1ee
Merge pull request #1226 from Ismail-elkorchi/_s_posted
Split _s_posted_on into two functions
2018-01-26 09:50:01 -08:00
Laurel cd10ba650b
Merge pull request #1231 from webmandesign/patch-2
Fixing localization function inside `printf()`
2018-01-26 09:43:17 -08:00
Laurel c5f33c1966
Merge pull request #1228 from SergeyBiryukov/patch-1
Make comments number comparison work as expected
2018-01-26 09:42:42 -08:00
Laurel 115dd8209c
Merge pull request #1158 from Automattic/add-featured-image-content-options
_s: Add featured images to Post and Pages with the ability to hide them via Content Options.
2017-12-13 09:17:23 -08:00
laurelfulford c6427768ef Update array using associative keys to have each value on a new line. 2017-12-12 15:26:47 -10:00
Benoît Chantre 100081feee Use full width layout when there’s no sidebar 2017-11-12 20:37:24 +01:00
Oliver Juhas eb3945f37b
Fixing localization function inside `printf()` 2017-11-05 19:13:42 +01:00
Sergey Biryukov 120875117c
Clarify "singularly identifiable articles" 2017-11-01 03:17:09 +01:00