* Add docblocks to hooks used in customizer class.
This resolves PHP linting errors.
* Omit feat items blocks from txt color selector
Confirmed that the featured items WooCommerce blocks are the only Woo
blocks with a dark overlay.
By omiting them from the ruleset that sets the default text color, we
allow the block to use it's set default of white text over the
background overlay, improving color contrast.
* Refactor to use :has() selector.
Instead of directly targeting the Featured Items blocks, we can use the
`:has()` selector to omit blocks that contain a child div with the
`has-background-dim` class in the editor.
Since browser support is not to where we need at the time of publishing
this, we can also add a temp fallback with `@supports`.
* Remove/resolve items from merge conflict.
* Add docblocks to hooks used in customizer class.
This resolves PHP linting errors.
* Fix spacing warnings
Minor update to fix `Equals sign not aligned correctly; expected 1 space
but found X spaces` warnings.
* update squizlabs/php_codesniffer and WP coding standards to latest
* revamp phpcs sniffer rulesets:
- update to php-compatibility (wimg is defunct)
- add version for woocommerce-sniffs
* streamline phpcs config (get it working at all):
- update min WP version to 5.3
- remove references to rules we don't have installed
- WordPress.VIP
- WordPress.XSS
* fix 2x phpcs errors (automatically via phpcbf)
* update phps ignore unescaped output comment to current format
* add npm scripts for php linter and linter autofixer
* auto-fix PHP linter errors using phpcbf :
Before phpcbf:
[x] PEAR Functions Function call signature multiple arguments 127
[x] Generic White space Disallow space indent spaces used 10
[ ] WordPres WP Enqueued resource parameters missing version 6
[ ] PHPCompa Language construct New language constructs t_ns_separator found 4
[ ] WordPres Security Escape output output not escaped 4
[ ] PHPCompa Parameter values New HTMLEntities encoding default not set 2
[ ] WordPres Date time Restricted functions date_date 2
[x] Generic Files End file newline not found 1
[x] PEAR Functions Function call signature close bracket line 1
[x] PEAR Functions Function call signature content after open bracket 1
[x] Squiz White space Superfluous whitespace end line 1
[x] WordPres Arrays Comma after array item no comma 1
phpcbf fixed all [x] violations, all whitespace/formatting
After phpcbf:
WordPres WP Enqueued resource parameters missing version 6
PHPCompa Language construct New language constructs t_ns_separator found 4
WordPres Security Escape output output not escaped 4
PHPCompa Parameter values New HTMLEntities encoding default not set 2
WordPres Date time Restricted functions date_date 2
Note - this commit does not include auto-fixed files with other
violations. These will follow in separate commit (after fixing!)
* fix phpcs violations:
- numerous formatting issues fixed automatically
- manually fix missing version param in calls to wp_enqueue_style
* fix phpcs violations:
- numerous formatting issues fixed automatically
- fix missing deps param in call to wp_enqueue_style
* update phpcs test php version to match min requirement (5.6)
* fix phpcs violations including some missing escaping:
- numerous formatting issues fixed automatically
- prefer gmdate() over potentially ambiguous date()
- escape output (a real issue!) of comment dates
* fix violations (all automated formatting fixes)
* reinstate WordPress rule/standard in phpcs.xml (minimise PR changes)
* exclude build (pre-zip) ./storefront & tighten excludes for dep folders
* bulk-update Security.EscapeOutput.OutputNotEscaped ignore comment:
- the previous comment format is no longer supported
- bulk replacing these to reduce phpcs warning overhead
- move footer bar override css rule after default footer link color rule
- use exact same specificity/not selectors so it's clear it's intended to override