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
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
Bring code style up to the latest standards
- This PR addresses code-style issues identified when testing the code against the WordPress Coding Standards.
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.
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.
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.
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.
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.
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.