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
If the commenter doesn't have cookies set, they won't see the comment preview again. Showing an expanded message will help offset any confusion if they revisit the site later, and their comment is still in moderation, but they can't see it anymore.
Props birgire, superpoincare.
Fixes#47461. See #43857.
Built from https://develop.svn.wordpress.org/trunk@46117
git-svn-id: http://core.svn.wordpress.org/trunk@45929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Hook documentation should be on the line directly above the line containing the `do_action()` or `apply_filters()` call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.
Includes minor code layout fixes.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46088
git-svn-id: http://core.svn.wordpress.org/trunk@45900 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
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
Update a mistake in Twenty Eleven's block editor styles that erroneously sets the `font-size` to `300`, when it should set the `font-weight` to `300`. This was causing browsers in quirks mode to make the editor font size very large.
Also, simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.
Props laurelfulford.
Merges [44190] and [44191] to trunk.
Fixes#45421, #45433.
Built from https://develop.svn.wordpress.org/trunk@44301
git-svn-id: http://core.svn.wordpress.org/trunk@44131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add `add_theme_support( 'responsive-embeds' );` to all of the responsive default themes as part of their block editor support. This makes sure any embeds coming from the new block-based editor maintain their aspect ratios at different screen sizes.
Merges [43868] into trunk.
Props laurelfulford.
Fixes#45274.
Built from https://develop.svn.wordpress.org/trunk@44227
git-svn-id: http://core.svn.wordpress.org/trunk@44057 1a063a9b-81f0-0310-95a4-ce76da25c4cd