Commit Graph

559 Commits

Author SHA1 Message Date
desrosj b6d67c1519 Docs: Avoid using “CPT” instead of “custom post type”.
Additionally, when referring to built in Core post types, “custom” is unnecessary.

This also adds a period to the end of the `wp_global_styles` post type description.

Follow up to [38829], [51003], [52041], [52049], [52062].

See #53399, #54335, #54336.
Built from https://develop.svn.wordpress.org/trunk@52110


git-svn-id: http://core.svn.wordpress.org/trunk@51702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 14:18:06 +00:00
noisysocks c421e9b34a Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9
- First pass at adding the site editor from the Gutenberg plugin to
  wp-admin/site-editor.php.
- Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9.

Follows [52042].
See #54337.
Props youknowriad, aristath, hellofromtonya, gziolo.

Built from https://develop.svn.wordpress.org/trunk@52069


git-svn-id: http://core.svn.wordpress.org/trunk@51661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 02:17:17 +00:00
desrosj c2a7d2a773 Themes: Remove temporary Full Site Editing safety checks.
These checks were added in [51193] and [51197] as a temporary measure to prevent a site owner from activating a Full Site Editing theme when Gutenberg plugin was not active.

Because Core only had partial support for the features required for FSE, the front end of the site would display a white screen or error message to visitors. Unless the site owner visited the front end, there would be no indication that there was a problem.

Since 5.9 will include the remaining features required for FSE, these checks can be removed.

Props poena, jffng.
Fixes #54366. See #534190.
Built from https://develop.svn.wordpress.org/trunk@52044


git-svn-id: http://core.svn.wordpress.org/trunk@51636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 15:27:59 +00:00
John Blackbourn 4c3a23ba40 Docs: Fix some docblock syntax errors and add a missing canonical reference.
See #53399, #52867, #38942, #53668

Built from https://develop.svn.wordpress.org/trunk@52034


git-svn-id: http://core.svn.wordpress.org/trunk@51626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 10:44:59 +00:00
johnjamesjacoby f5991aed63 Themes: Introduce `get_header_image_tag_attributes` hook.
This change adds a filter inside of the `get_header_image_tag()` function allowing developers to filter the attributes of the header image HTML tag before they are escaped, concatenated, and returned.

Before this change, it was not possible to externally and preemptively intercept this array of attributes. After this change, these attributes can now be easily filtered, matching it nicely to the `wp_get_attachment_image_attributes` hook.

Props audrasjb, chaion07, junaidbhura, sabernhardt.

Fixes #38942.
Built from https://develop.svn.wordpress.org/trunk@51978


git-svn-id: http://core.svn.wordpress.org/trunk@51567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 17:21:58 +00:00
John Blackbourn 6babc3833b Docs: Miscellaneous docblock improvements.
See #53399

Built from https://develop.svn.wordpress.org/trunk@51955


git-svn-id: http://core.svn.wordpress.org/trunk@51544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-10-29 23:13:05 +00:00
hellofromTonya 07139653b9 Widgets: Revert [51705].
While the new name is much better, it doesn't fully tell what will happen when invoked nor does it fully solve the root problems. 

Why? The function is doing too much. And naming is hard.

Props azaozz, desrosj, andraganescu, zieladam, hellofromTonya.
See #53811.
Built from https://develop.svn.wordpress.org/trunk@51791


git-svn-id: http://core.svn.wordpress.org/trunk@51398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-09 21:40:57 +00:00
hellofromTonya 71977c215d Widgets: Rename and soft deprecate `retrieve_widgets()`.
The original name `retrieve_widgets()` was unclear as it suggested it was a getter, i.e. getting the widgets. This function does more than get: finds orphaned widgets, assigns them to the inactive sidebar, and updates the database.

The new name is `sync_registered_widgets()` which better represents what happens when this function is invoked.

The original `retrieve_widgets()` function is soft deprecated to avoid unnecessary code churn downstream for developers that support more than the latest version of WordPress.

Follow-up to [18630].

Props zieladam, timothyblynjacobs, andraganescu, hellofromTonya.
See #53811.
Built from https://develop.svn.wordpress.org/trunk@51705


git-svn-id: http://core.svn.wordpress.org/trunk@51311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-31 19:58:58 +00:00
John Blackbourn 72e66e8910 Themes: Correct the documented types for theme mod values.
A theme mod value can be of any type, not just a string.

See #53399

Built from https://develop.svn.wordpress.org/trunk@51578


git-svn-id: http://core.svn.wordpress.org/trunk@51189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-07 13:55:04 +00:00
Sergey Biryukov 9e33977bc9 Themes: Make sure `get_theme_mods()` always returns an array.
This avoids a "Cannot access offset of type string on string" fatal error in `set_theme_mod()` on PHP 8 if the `theme_mods_$theme_slug` option has an incorrect value, e.g. an empty string instead of an array.

With this change, `set_theme_mod()` should be able to resolve the issue by saving a correct value.

Follow-up to [15736], [15739], [30672], [32629], [32632].

Props xknown.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@51524


git-svn-id: http://core.svn.wordpress.org/trunk@51135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-01 14:55:56 +00:00
desrosj ccdb1766ae Themes: Remove mention of “FSE” in Core.
Props aristath, jorbin.
Fixes #53497.
Built from https://develop.svn.wordpress.org/trunk@51251


git-svn-id: http://core.svn.wordpress.org/trunk@50860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-28 19:11:57 +00:00
desrosj b588426f96 Docs: Fix typo in `widgets-block-editor` feature documentation.
Follow up to [51214].
Unprops desrosj.
See #53424.
Built from https://develop.svn.wordpress.org/trunk@51215


git-svn-id: http://core.svn.wordpress.org/trunk@50824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 01:10:57 +00:00
desrosj 94c655c892 Widgets: Add support for the Widgets Editor on `after_setup_theme` instead of `widgets_init`.
This better aligns with developer expectations, as `add_theme_support()` and `remove_theme_support()` are meant to be called within functions attached to the `after_setup_theme` hook.

This also adds the `widgets-block-editor` feature to the docblock for `add_theme_support()`. 

Props kevin940726, caseymilne, jamesros161, noisysocks, Mamaduka, audrasjb, zieladam, hellofromTonya, desrosj.
Fixes #53424.
Built from https://develop.svn.wordpress.org/trunk@51214


git-svn-id: http://core.svn.wordpress.org/trunk@50823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 01:08:58 +00:00
Peter Wilson 0d8727bec8 Themes: Improve Gutenberg check before activating an FSE theme.
Account for sites enabling Gutenberg as an mu-plugin when determining whether full-site-editing themes can be enabled. This replaces the check the plugin is active with a check whether the function `gutenberg_is_fse_theme()` is defined.

Follow up to [51193].

Props noisysocks, peterwilsoncc, SergeyBiryukov.
See #53410.


Built from https://develop.svn.wordpress.org/trunk@51197


git-svn-id: http://core.svn.wordpress.org/trunk@50806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 05:56:57 +00:00
desrosj 94841ace05 Themes: Prevent a Full Site Editing theme from being activated when Gutenberg is not active.
When a theme that uses the Full Site Editing feature is activated and the Gutenberg plugin is not present, the site will currently show a text notice on the front end. The user is not made aware of this unless they visit the front end of their site.

This adds a check that will prevent a theme from being activated when the `full-site-editing` tag is present in the theme’s `style.css` header and the Gutenberg plugin is not active to prevent this scenario.

These checks can be removed once Full Site Editing is completely merged into Core.

Props desrosj, marybaum, chanthaboune.
See #53410.
Built from https://develop.svn.wordpress.org/trunk@51193


git-svn-id: http://core.svn.wordpress.org/trunk@50802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 02:59:56 +00:00
Sergey Biryukov 08f5a1b098 Upgrade/Install: Remove parsing of `readme.txt` files for plugin or theme requirements.
This affects:
* `validate_plugin_requirements()`
* `validate_theme_requirements()`

Historically, the `Requires PHP` header was introduced in #meta2952 for the Plugin Directory first, so at the time it made sense to have it defined in the same place as `Requires at least`, which only existed in `readme.txt`. 

Since parsing of PHP and WordPress requirements was later added to WordPress core, the core should retrieve all the necessary data from the main plugin or theme file and not from `readme.txt`, which only contains the data meant for the Plugin or Theme Directory.

The recommended place for `Requires PHP` and `Requires at least` headers is as follows:
* The plugin's main PHP file
* The theme's `style.css` file

The place for the `Tested up to` header remains in `readme.txt` for the time being, as it's not used by WordPress core.

Follow-up to [44978], [45546], [47573], [47574], [meta5841], [meta9050].

Props afragen, Otto42, joyously, williampatton, audrasjb.
Fixes #48520. See #48515, #meta2952, #meta4514, #meta4621.
Built from https://develop.svn.wordpress.org/trunk@51092


git-svn-id: http://core.svn.wordpress.org/trunk@50701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 10:13:00 +00:00
John Blackbourn 391fc25eed Docs: Various docblock corrections and improvements.
See #51800

Built from https://develop.svn.wordpress.org/trunk@50395


git-svn-id: http://core.svn.wordpress.org/trunk@50006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-20 17:10:11 +00:00
Sergey Biryukov 7ced0efbf4 Docs: Use more consistent descriptions for `void|false` return values.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@49935


git-svn-id: http://core.svn.wordpress.org/trunk@49634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-05 16:48:07 +00:00
John Blackbourn dfe1f9b322 Docs: Promote many `bool` types to `true` or `false` where only that value is used.
See #51800

Built from https://develop.svn.wordpress.org/trunk@49927


git-svn-id: http://core.svn.wordpress.org/trunk@49626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-03 22:04:04 +00:00
Sergey Biryukov bb0b36a905 Themes: Clarify the `_doing_it_wrong()` message for post formats in `add_theme_support()`.
Follow-up to [49344], [49354], [49365].

See #51390.
Built from https://develop.svn.wordpress.org/trunk@49367


git-svn-id: http://core.svn.wordpress.org/trunk@49126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 00:08:06 +00:00
Sergey Biryukov d0268b2b69 Themes: Move the test for `post-formats` theme support to a more appropriate place.
Follow-up to [49344].

See #51390.
Built from https://develop.svn.wordpress.org/trunk@49354


git-svn-id: http://core.svn.wordpress.org/trunk@49114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-28 15:14:10 +00:00
Helen Hou-Sandí 3fc623c202 Post Formats: You have to pass an array of supported post formats.
This shows a `_doing_it_wrong()` message and also returns false instead of true if no array of formats is passed in `add_theme_support()`, avoiding a PHP error.

Post formats maintainership comes full circle. 🙃

Props Mista-Flo, sproutchris, garrett-eclipse.
Fixes #51390.

Built from https://develop.svn.wordpress.org/trunk@49344


git-svn-id: http://core.svn.wordpress.org/trunk@49104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-27 20:00:06 +00:00
Sergey Biryukov caa75a04a8 Themes: Add a return value to `set_theme_mod()` to allow for error handling.
Props latifi, hareesh-pillai.
Fixes #51296.
Built from https://develop.svn.wordpress.org/trunk@49214


git-svn-id: http://core.svn.wordpress.org/trunk@48976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 22:45:03 +00:00
Sergey Biryukov 0e3147c40e Coding Standards: Replace alias PHP functions with the canonical names.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

This replaces all uses of the following:
* `join()` with `implode()`
* `sizeof()` with `count()`
* `is_writeable()` with `is_writable()`
* `doubleval()` with a `(float)` cast

In part, this is a follow-up to #47746.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49193


git-svn-id: http://core.svn.wordpress.org/trunk@48955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:27:06 +00:00
Sergey Biryukov 12a36355e6 Code Modernization: Remove a single trailing percent sign before calling `sprintf()` on the `$default` parameter in `get_theme_mod()`.
This avoids a "Missing format specifier at end of string" fatal error on PHP 8, and maintains the current behaviour.

See #50913.
Built from https://develop.svn.wordpress.org/trunk@49068


git-svn-id: http://core.svn.wordpress.org/trunk@48830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-29 10:03:08 +00:00
Sergey Biryukov 7690f48cec Themes: Add `unlink-homepage-logo` to the `create_initial_theme_features()` registration for the `custom-logo` theme feature.
Follow-up to [48039], [48283], [48749].

Props TimothyBlynJacobs.
Fixes #37011.
Built from https://develop.svn.wordpress.org/trunk@48757


git-svn-id: http://core.svn.wordpress.org/trunk@48519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 19:43:05 +00:00
Sergey Biryukov df6e548b14 Accessibility: Themes: Only unlink custom logo on the home page if the theme declares support for that.
To accommodate for the change, the `custom-logo` theme feature now accepts the `unlink-homepage-logo` parameter.

If and when the logo is linked on the home page, the link has the `aria-current` attribute for better accessibility.

Follow-up to [48039], [48283].

Props sabernhardt, audrasjb, johnstonphilip, demetris.
Fixes #37011.
Built from https://develop.svn.wordpress.org/trunk@48749


git-svn-id: http://core.svn.wordpress.org/trunk@48511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 15:26:03 +00:00
Sergey Biryukov 92f66488a3 I18N: Remove `<code>` tags in `invalid_rest_prepare_callback` error message in `register_theme_feature()` for consistency with other strings.
Follow-up to [48611].

See #50758.
Built from https://develop.svn.wordpress.org/trunk@48612


git-svn-id: http://core.svn.wordpress.org/trunk@48374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:39:05 +00:00
Sergey Biryukov ac0b77f33c I18N: Move code out of a translatable string in `register_theme_feature()`.
Props ramiy.
Fixes #50758.
Built from https://develop.svn.wordpress.org/trunk@48611


git-svn-id: http://core.svn.wordpress.org/trunk@48373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:31:05 +00:00
Sergey Biryukov 4fcbb1ee5d Docs: Add a mention of `core-block-patterns` as a possible value for `add_theme_support()`.
Follow-up to [48492].

See #50669.
Built from https://develop.svn.wordpress.org/trunk@48598


git-svn-id: http://core.svn.wordpress.org/trunk@48360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 01:21:01 +00:00
John Blackbourn 9bc7d0a776 Docs: Another pass at some inline docs fixes mostly made by PHPCBF.
See #49572, #50744
Built from https://develop.svn.wordpress.org/trunk@48590


git-svn-id: http://core.svn.wordpress.org/trunk@48352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 21:11:05 +00:00
John Blackbourn 124972f2c6 Docs: Further corrections and improvements to various inline docblocks.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48576


git-svn-id: http://core.svn.wordpress.org/trunk@48338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 07:39:02 +00:00
John Blackbourn 1fbcdb2213 Docs: Various corrections to inline docblocks.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48573


git-svn-id: http://core.svn.wordpress.org/trunk@48335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:48:06 +00:00
Sergey Biryukov 4d8ef49618 Docs: Add return value description for `register_theme_directory()`.
Props stevenlinx.
Fixes #50665.
Built from https://develop.svn.wordpress.org/trunk@48491


git-svn-id: http://core.svn.wordpress.org/trunk@48253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-15 12:10:06 +00:00
Sergey Biryukov 9515141741 Docs: Link to `add_theme_support()` for the list of supported theme features in `current_theme_supports()` and related functions.
Props stevenlinx.
Fixes #50657.
Built from https://develop.svn.wordpress.org/trunk@48490


git-svn-id: http://core.svn.wordpress.org/trunk@48252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-15 11:23:06 +00:00
Sergey Biryukov 5aa7f46a4f Docs: Improve DocBlocks in `wp-includes/theme.php` per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48189


git-svn-id: http://core.svn.wordpress.org/trunk@47958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-27 12:02:03 +00:00
TimothyBlynJacobs 9dc7058be9 Themes: Introduce register_theme_feature API.
Currently themes can declare support for a given feature by using add_theme_support(). This commit adds a register_theme_feature() API that allows plugins and WordPress Core to declare a list of available features that themes can support.

The REST API uses this to expose a theme's supported features if the feature has been registered with "show_in_rest" set to true.

Props kadamwhite, spacedmonkey, williampatton, desrosj, TimothyBlynJacobs.
Fixes #49406.

Built from https://develop.svn.wordpress.org/trunk@48171


git-svn-id: http://core.svn.wordpress.org/trunk@47940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-25 22:13:10 +00:00
desrosj b83d6bd777 Docs: Remove the `custom-header-uploads` feature from docs.
This was deprecated in [20212] in favor of passing `”uploads” => true` to the `custom-header` feature, so it should not be specified as an available feature in the parameter documentation.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48169


git-svn-id: http://core.svn.wordpress.org/trunk@47938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-25 17:41:08 +00:00
Sergey Biryukov f1e9bdd9b5 Docs: Add missing `@return` description for some theme functions:
* `get_stylesheet_directory_uri()`
* `get_stylesheet_uri()`
* `get_locale_stylesheet_uri()`

Props stevenlinx.
Fixes #50450.
Built from https://develop.svn.wordpress.org/trunk@48138


git-svn-id: http://core.svn.wordpress.org/trunk@47907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-23 10:48:09 +00:00
Sergey Biryukov 0a2d2b93e6 Docs: Synchronize descriptions for some theme functions:
* `get_stylesheet_directory()`
* `get_stylesheet_directory_uri()`
* `get_template_directory()`
* `get_template_directory_uri()`

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48137


git-svn-id: http://core.svn.wordpress.org/trunk@47906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-23 10:43:09 +00:00
desrosj 4b60af1a6a General: Remove “whitelist” and “blacklist” in favor of more clear and inclusive language.
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

With this commit, all occurrences of “whitelist” and “blacklist” (with the single exception of the `$new_whitelist_options` global variable) are removed. A new ticket has been opened to explore renaming the `$new_whitelist_options` variable (#50434).

Changing to more specific names or rewording sentences containing these terms not only makes the code more inclusive, but also helps provide clarity. These terms are often ambiguous. What is being blocked or allowed is not always immediately clear. This can make it more difficult for non-native English speakers to read through the codebase.

Words matter. If one contributor feels more welcome because these terms are removed, this was worth the effort.

Props strangerstudios, jorbin, desrosj, joemcgill, timothyblynjacobs, ocean90, ayeshrajans, davidbaumwald, earnjam.
See #48900, #50434.
Fixes #50413.
Built from https://develop.svn.wordpress.org/trunk@48121


git-svn-id: http://core.svn.wordpress.org/trunk@47890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-22 17:26:13 +00:00
Andrea Fercia ae447adaf4 I18N: Restore the "Error:" prefix for error messages.
Partially reverts [48059] as there's no full consensus on the removal of the text prefix. Further actions should be taken to improve consistency and accessibility of the admin notices. Keeps some improvements to the translatable strings from [48059].

Fixes #47656.

Built from https://develop.svn.wordpress.org/trunk@48115


git-svn-id: http://core.svn.wordpress.org/trunk@47884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-21 14:00:09 +00:00
Sergey Biryukov b16368c268 Docs: Remove `@staticvar` tags from core.
The tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.

Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs.

Props alishanvr, jrf.
Fixes #50426.
Built from https://develop.svn.wordpress.org/trunk@48109


git-svn-id: http://core.svn.wordpress.org/trunk@47878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:40:12 +00:00
Sergey Biryukov e13c363b17 Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48104


git-svn-id: http://core.svn.wordpress.org/trunk@47873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:02:12 +00:00
desrosj 019bc2d244 Docs: Add missing return type for `_remove_theme_support()`.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48091


git-svn-id: http://core.svn.wordpress.org/trunk@47858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-19 14:46:10 +00:00
Sergey Biryukov de59ad23a4 Docs: Consistently include an empty line between `@since` tag and `@see`, `@link`, or `@global`, per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48067


git-svn-id: http://core.svn.wordpress.org/trunk@47834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-16 21:07:14 +00:00
Andrea Fercia f83c504b88 I18N: Remove the "Error:" prefix from error messages.
For a number of years, most of the WordPress error messages have been prefixed with "Error:". However, these messages appear in a context where it's already clear an error occurred. Whether it's an error, a warning, or any other classification, that's not so relevant for users. The content of the message is the relevant part. The "Error:" prefix doesn't add great value while it does add unnecessary complexity for the message readability.

Also, revises some of these messages to improve clarity and removes HTML from translatable strings.

Props garrett-eclipse, ramiy, SergeyBiryukov, afercia, sabernhardt, quadthemes, audrasjb. 
See #47003, #43037, #42945, #15887.
Fixes #47656.

Built from https://develop.svn.wordpress.org/trunk@48059


git-svn-id: http://core.svn.wordpress.org/trunk@47826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-16 15:35:13 +00:00
Sergey Biryukov 7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Dominik Schilling 7ded6c2d2a Administration: Remove any CSS related to Internet Explorer versions 6 – 10.
In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

* Removes ie.css and `ie` style handle.
* Removes IE specific class names and any related CSS.
* Drops support for IE8 and older in `wp_customize_support_script()`.
* Updates compatibility mode for CSS minification to `ie11`.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.
Built from https://develop.svn.wordpress.org/trunk@47771


git-svn-id: http://core.svn.wordpress.org/trunk@47547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 20:15:07 +00:00
Sergey Biryukov d341f20fb1 Themes: Block theme activation if it requires a higher version of PHP or WordPress.
Introduce `validate_theme_requirements()` for validating a theme's WordPress and PHP version requirements.

Follow-up to [44978] and [45546] for plugins.

Props afragen, audrasjb, SergeyBiryukov.
See #43992.
Built from https://develop.svn.wordpress.org/trunk@47573


git-svn-id: http://core.svn.wordpress.org/trunk@47348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-13 15:28:11 +00:00