This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.
This commit also includes:
* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
* `wp-admin/admin-header.php`
* `wp-admin/admin-footer.php`
* `wp-includes/version.php`
Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes#48082.
Built from https://develop.svn.wordpress.org/trunk@47198
git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change makes several changes to ensure consistency and accuracy for default theme headers:
- Removes `WordPress` from `Requires at least` headers.
- Ensures the `Requires at least` and `Requires PHP` headers are present in every default theme’s `style.css` file.
- Ensures `Tested up to` is present in every `readme.txt` file.
- Removes any headers not processed in both the `style.css` and `readme.txt` files for each theme.
Props Otto42, afragen.
Fixes#48517.
Built from https://develop.svn.wordpress.org/trunk@46676
git-svn-id: http://core.svn.wordpress.org/trunk@46476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
WordPress 5.2 adds the `wp_body_open()` function, and the default themes make use of it. This patch adds a shim for `wp_body_open` to bundled themes so this function will also work in older versions of WordPress.
Props lgedeon, johnbillion, timph, ramiy, pento.
Fixes#46679.
Built from https://develop.svn.wordpress.org/trunk@45256
git-svn-id: http://core.svn.wordpress.org/trunk@45065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
For many bundled theme related stylesheets, a version is either not specified, or specified as a hardcoded date string when enqueued. This is problematic when a stylesheet is updated and the version number is not (which has happened several times recently). This change ensures that all bundled theme related stylesheets use the theme’s version as the stylesheet version. This ensures cache busting for theme stylesheets every time a theme is updated and guarantees that users receive any new or updated styles included in the update when visiting the site for the first time after an update.
Props parsmizban, ianbelanger, dswebsme.
Fixes#39997.
Built from https://develop.svn.wordpress.org/trunk@45213
git-svn-id: http://core.svn.wordpress.org/trunk@45022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Enables inserting (asynchronous) JavaScript right after the opening `body` tag.
* Add a `wp_body_open` helper function that triggers the `wp_body_open` action.
* Call `wp_body_open` in core themes immediately after the opening `body` tag.
Props joostdevalk, valendesigns, nacin, saracup, jorbin, mikeschinkel, jonnybojangles, lgedeon, Willscrlt, Denis-de-Bernardy, lexiqueen, sky_76, welcher, westonruter, ramiy, joyously.
Fixes#12563.
Built from https://develop.svn.wordpress.org/trunk@45042
git-svn-id: http://core.svn.wordpress.org/trunk@44851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Seventeen's original styles for the block editor custom colors had some issues: they weren't being applied to the button blocks due to lack of specificity, and when applied to paragraph blocks, there was no padding in the editor. This update makes sure the colors and related styles work as expected.
Fixes#45426.
Built from https://develop.svn.wordpress.org/trunk@44402
git-svn-id: http://core.svn.wordpress.org/trunk@44232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When existing scripts or styles are updated in default themes, the version numbers in the enqueues should also be bumped to make sure the old files don't cache. This update bumps version numbers for changes since version 5.0, for themes Twenty Eleven through Twenty Nineteen.
Fixes#45679.
Built from https://develop.svn.wordpress.org/trunk@44382
git-svn-id: http://core.svn.wordpress.org/trunk@44212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the original block editor styles were added to the existing default themes, the button blocks were styled to match how each theme styled the `button` tag.
However, the styles should respect the block editor's default style, "Rounded", and allow switching to the other styles, like "Outlined" and "Square".
Fixes#45541.
Built from https://develop.svn.wordpress.org/trunk@44381
git-svn-id: http://core.svn.wordpress.org/trunk@44211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The markup for the default block appender changed from a text input to a text area in the editor; this update makes the same change in the default theme styles.
Props laurelfulford.
Merges [44212] into trunk.
Fixes#45450.
Built from https://develop.svn.wordpress.org/trunk@44312
git-svn-id: http://core.svn.wordpress.org/trunk@44142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Remove unnecessary `ol` styles from editor. Twenty Seventeen was designed with bolded numbers for its ordered list styles. This was removed from the theme prior to launch, but it was left in the editor styles, so it needed to be removed there, too.
- To improve accessibility, the cookies content checkbox in the comment form needed some visible indication when it’s in focus.
- Twenty Seventeen’s editor styles contained an Internet Explorer 8 specific fix that stopped images from being scalable in the editor in other browsers. Since the editor no longer supports IE8, this fix can safely be removed.
- Fix the `font-family` used for Simplified Chinese (zh_CN) in the block editor CSS.
Props mmaumio, edpittol, pratikthink, afercia, audrasjb, mihaivalentin, subrataemfluence, vaishalipanchal, ze3kr, laurelfulford.
Merges [44203-44205] and [44235] into trunk.
Fixes#44775, #44699, #39738, #45408.
Built from https://develop.svn.wordpress.org/trunk@44307
git-svn-id: http://core.svn.wordpress.org/trunk@44137 1a063a9b-81f0-0310-95a4-ce76da25c4cd