Replaces `trigger_error()` with `wp_trigger_error()`.
The usage of `wp_trigger_error()` avoids generating `E_USER` family errors unless `WP_DEBUG` is on. In doing so, users should not see these messages in normal production.
Notes:
* Removes `E_USER_NOTICE` when passed as an argumnent, as it's the default error level.
* An empty string is passed for the function name when its name is already in the error message or does not add value to the error message.
* Externally maintained libraries are not included.
Follow-up to [55204], [25956], [29630], [38883], [52062], [52049], [54272], [38883], [55245], [51599], [14452], [38883], [24976].
Props prasadkarmalkar, rajinsharwar, thelovekesh, hellofromTonya, swissspidy.
Fixes#59652.
git-svn-id: https://develop.svn.wordpress.org/trunk@58409 602fd350-edb4-49c9-b593-d223f7449a82
Fix issue where the attachment thumbnail would be rendered as the site logo on attachment single templates if no site logo is set. Avoid calling `wp_attachment_is_image()` with no value, since that function will fallback to the global `$post` variable. Follow up to [58213]. See #60922.
Props greenshady, krupajnanda, hmbashar, rajinsharwar, joedolson.
Fixes#61408.
git-svn-id: https://develop.svn.wordpress.org/trunk@58407 602fd350-edb4-49c9-b593-d223f7449a82
This prevents the display of an inaccurate message when the `wp_insert_post_data` filter is used to change the status of a post while saving. This bug was only present when using the Classic Editor.
The previous code incorrectly assumed that a filter would never change a post’s status to `draft`, resulting in a “Post published.” message instead of “Post draft updated.”.
Props freibergergarcia, sirzooro, hakre, blepoxp, scribu, kawauso.
Fixes#11207.
git-svn-id: https://develop.svn.wordpress.org/trunk@58406 602fd350-edb4-49c9-b593-d223f7449a82
Finish task to replace placeholders used for labels with visible label elements. Add label elements in theme browser and theme installation screen. Change position of search input to match other user interfaces in WordPress.
Also crediting all contributors to ticket #61389, which this also closes.
Props joedolson, rcreators, sabernhardt, balub, rejaulalomkhan, syamraj24, nazmul111, krupajnanda, huzaifaalmesbah, hmbashar, mdnesarmridha, colorful-tones, printsachen1.
Fixes#40331, #61389.
git-svn-id: https://develop.svn.wordpress.org/trunk@58405 602fd350-edb4-49c9-b593-d223f7449a82
Removes an unassigned `sprintf` that was accidentally included as part of [57545] in the `wp_get_plugin_action_button()`. A copy/paste whoopsie.
The actual used code is assigned a wee bit lower in the function within the `install` case.
Follow-up to [57545].
Props hellofromTonya, costdev, rajinsharwar.
Fixes#61420.
git-svn-id: https://develop.svn.wordpress.org/trunk@58402 602fd350-edb4-49c9-b593-d223f7449a82
This filter was originally added in [19622] which predates the addition of the constant added in [21996] by 24085717 seconds.
Props peterwilsoncc, khokansardar, krupalpanchal.
Fixes#61412.
git-svn-id: https://develop.svn.wordpress.org/trunk@58401 602fd350-edb4-49c9-b593-d223f7449a82
Ensure new multisite installs are up to date with the current mime types supported in core.
Note that this will only affect newly created networks, since this is only used to populate the schema for new networks, not change the allowed mime types for existing networks
Props spacedmonkey, costdev, pavanpatil1, joemcgill, rajinsharwar, tb1909.
Fixes#53167.
git-svn-id: https://develop.svn.wordpress.org/trunk@58400 602fd350-edb4-49c9-b593-d223f7449a82
The table block did not have the same design in the editor for front and back. This resolves the issue for the front end editor.
Props pranitdugad, nidjidhandhukiya, poena, shailu25, hmbashar, ugyensupport.
Fixes#60293.
git-svn-id: https://develop.svn.wordpress.org/trunk@58399 602fd350-edb4-49c9-b593-d223f7449a82
This changeset reverts part of the changes made in [58298] to avoid using regex that can cause potential bugs. It is indeed safer to revert these changes for now and do the refactoring once the HTML API supports CSS selectors and provides a way to set inner content.
It also adds a unit test to cover the regression experienced in https://github.com/WordPress/gutenberg/issues/62347.
Follow-up to [58298].
Props santosguillamot, gziolo.
Fixes#61385.
See #61351.
git-svn-id: https://develop.svn.wordpress.org/trunk@58398 602fd350-edb4-49c9-b593-d223f7449a82
Fixes documentation and comment references to capitalize JavaScript in accordance with the wordmark.
Props peterwilsoncc, mukesh27, dmsnell.
See #60699.
git-svn-id: https://develop.svn.wordpress.org/trunk@58397 602fd350-edb4-49c9-b593-d223f7449a82
[57545] introduced `wp_get_plugin_action_button()`. This function is documented to return a `string`. However, if the user does not have the appropriate capabilities, it returned `void`, which is unexpected.
Resolves the issue by moving the `return $button` to the bottom of the function to ensure it always returns a `string` type. On success, the button's HTML string is returned; else, an empty string is returned.
Unit tests are included.
Follow-up to [57545].
Props costdev, rajinsharwar, hellofromTonya.
Fixes#61400.
git-svn-id: https://develop.svn.wordpress.org/trunk@58396 602fd350-edb4-49c9-b593-d223f7449a82
Adds styles for default block style variations to core `theme.json` so they can override core element styles where needed.
Props aaronrobertshaw, isabel_brison.
Follows r58241.
See #61165.
git-svn-id: https://develop.svn.wordpress.org/trunk@58393 602fd350-edb4-49c9-b593-d223f7449a82
Scalar values passed to `esc_attr()` are already converted internally to a string via both `wp_check_invalid_utf8()` and `_wp_specialchars()`.
Includes adding `@covers` tags for unit tests.
Follow-up to [58379].
See #58379.
git-svn-id: https://develop.svn.wordpress.org/trunk@58389 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes the extra `padding-bottom` to the login form located in `wp-login.php`.
Props deeppatel8950, meetmehta1205, audrasjb, webcommsat, dhrumilk.
Fixes#61013.
git-svn-id: https://develop.svn.wordpress.org/trunk@58383 602fd350-edb4-49c9-b593-d223f7449a82
These attributes are needed to indicate that both fields are required. This changeset doesn't add the attribute by default but allows extenders to enable it by passing `true` to the `$required_username` and `$required_password` to `wp_login_form()` arguments array.
Props alesflex, sabernhardt, joedolson, rcreators, rajinsharwar.
Fixes#60062.
git-svn-id: https://develop.svn.wordpress.org/trunk@58382 602fd350-edb4-49c9-b593-d223f7449a82
Lowers the priority at which `wp_filter_default_autoload_value_via_option_size()` is registered to run on the `wp_default_autoload_value()` filter. The default filter now runs at priority 5.
This is to allow third party developers to modify whether an option is autoloaded using the default priority, 10, rather than require they register their code to run at a higher priority.
Follow up to [57920].
Props peterwilsoncc, joemcgill.
Fixes#42441.
git-svn-id: https://develop.svn.wordpress.org/trunk@58381 602fd350-edb4-49c9-b593-d223f7449a82
Escapes the return value of `wp_autoload_values_to_autoload()` for use in the database query loading 'all options'. This is a hardening fix to protect against future changes to the options API which may allow developers to further customize the return value of the `wp_autoload_values_to_autoload` filter.
Follow up to [57920].
Props peterwilsoncc, joemcgill.
Fixes#42441.
git-svn-id: https://develop.svn.wordpress.org/trunk@58380 602fd350-edb4-49c9-b593-d223f7449a82
Prevent `WP_List_Table::search_box()` from throwing an array to string conversion notice when post list tables are loaded with an array of orderby parameters in the URL, eg: `/wp-admin/edit.php?post_type=page&orderby[menu_order]=ASC&orderby[title]=ASC`.
Follow up to [29027].
Props leonidasmilossis, rajinsharwar, swissspidy, NomNom99, pls78, SergeyBiryukov.
Fixes#59494.
See #17065.
git-svn-id: https://develop.svn.wordpress.org/trunk@58379 602fd350-edb4-49c9-b593-d223f7449a82
Updates tests calling `get_stylesheet` to not output layout styles if they’re not relevant to the test or to call `get_styles_for_block` instead where more appropriate.
Props isabel_brison, andrewserong, ramonopoly.
Fixes#61371.
git-svn-id: https://develop.svn.wordpress.org/trunk@58378 602fd350-edb4-49c9-b593-d223f7449a82
Add the label `template_name` to post types and taxonomies for use by the site editor to display on the templates/add new template screens to allow extenders to customize the display.
For post types the template name applies to templates for a singular pages with the default value "Single item: [singular name]".
For taxonomies the template name applies to templates for term archives with the default value "[singular name] Archives".
Props aljullu, audrasjb, ntsekouras, ellatrix, oglekler, rajinsharwar.
Fixes#60881.
git-svn-id: https://develop.svn.wordpress.org/trunk@58377 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds a check to ensure the current theme is not a block theme before adding the `widgets` component to the Customizer manager. This avoids a PHP warning when previewing/customizing notification emails with a block theme in BuddyPress and potentially on other plugins.
See https://github.com/buddypress/buddypress/pull/215.
Props imath, mukesh27, faisal03, sumitbagthariya16, webcommsat.
Fixes#60236.
git-svn-id: https://develop.svn.wordpress.org/trunk@58376 602fd350-edb4-49c9-b593-d223f7449a82
This changeset fixes an issue where the "Bulk select" option was getting selected when only a single user, comment, media, or plugin was selected.
Follow-up to [57745].
Props haritpanchal, swissspidy, sabernhardt, faisal03, sumitbagthariya16, mohitdadhich10.
Fixes#61168.
git-svn-id: https://develop.svn.wordpress.org/trunk@58375 602fd350-edb4-49c9-b593-d223f7449a82
Add a filter to enable TinyMCE in the media description textarea on the attachment details screen.
The media description field may be used to provide extended descriptions of images and videos, such as a transcript or detailed graphic explanations. In these uses, it will generally require structural elements like paragraphs. Having the ability to enable TinyMCE makes it easier for users to add this content without HTML knowledge.
Props juliemoynat, sebastienserre, mukesh27, joedolson.
Fixes#60158.
git-svn-id: https://develop.svn.wordpress.org/trunk@58372 602fd350-edb4-49c9-b593-d223f7449a82
The latest patch was missing so one inherit wasn't added. Removes unused line.
Props @shailu25.
See #59802.
git-svn-id: https://develop.svn.wordpress.org/trunk@58371 602fd350-edb4-49c9-b593-d223f7449a82
The latest patch was missing so one inherit wasn't added. Bringing that in with this commit.
Props @shailu25.
See #59802.
git-svn-id: https://develop.svn.wordpress.org/trunk@58370 602fd350-edb4-49c9-b593-d223f7449a82
The search block border was missing inside the wrapper on the front. This was done by adding styles to the theme block styles file along with padding.
Props nidhidhandhukiya, sabernhardt, yurajsinh2211, kamran8176, imranhasanraaz, krupajnanda, harshgajipara, rejaulalomkhan, shailu25, hmbashar, rajinsharwar.
Fixes#60164.
git-svn-id: https://develop.svn.wordpress.org/trunk@58369 602fd350-edb4-49c9-b593-d223f7449a82
The quote block citation text color wasn't changing through block settings. This resolves by using inherit.
Props viralsampat, poena, sabernhardt, shailu25, krupajnanda, hmbashar, rajinsharwar.
Fixes#59802.
git-svn-id: https://develop.svn.wordpress.org/trunk@58368 602fd350-edb4-49c9-b593-d223f7449a82
The latest comments block space between comments not increases based on typography size. This only impacts the margin if added within a post, widgets on the front-end still only have a 1em margin which is smaller yet variable.
Props pitamdey, sabernhardt, shailu25, harshgajipara, rajinsharwar.
Fixes#59130.
git-svn-id: https://develop.svn.wordpress.org/trunk@58367 602fd350-edb4-49c9-b593-d223f7449a82
The HTML Processor had been calling the parent class `is_tag_closer()`
method, but since visiting virtual nodes was introduced, it's important
that all of the methods are called on the subclass.
This patch fixes one issue identified where the parent method was called
instead, and it fixes another case where the change from calling the
parent method to the `$this` method was done improperly.
Developed in https://github.com/WordPress/wordpress-develop/pull/6726
Discussed in https://core.trac.wordpress.org/ticket/61348
Props jonsurrell.
See #61348.
Follow-up to [58304].
git-svn-id: https://develop.svn.wordpress.org/trunk@58365 602fd350-edb4-49c9-b593-d223f7449a82
When the `WP_HTML_Processor` was introduced with its `::create_fragment()`
static creator method, that method has been returning a `new self(...)`.
Unfortunately, this means that subclasses cannot use that method since it
will return the `WP_HTML_Processor` instead of the subclass.
With this patch, the static creator method returns `new static(...)` to preserve
the intended behavior. A new test asserts this behavior for future changes.
Developed in https://github.com/WordPress/wordpress-develop/pull/6729
Discussed in https://core.trac.wordpress.org/ticket/61374
Props dmsnell, jonsurrell.
Follow-up to [56274].
Fixes#61374.
git-svn-id: https://develop.svn.wordpress.org/trunk@58363 602fd350-edb4-49c9-b593-d223f7449a82
The oEmbed endpoint for SlideShare is effectively deprecated and throws an error for the majority of slide-decks using the service.
Capitalize the name of the service in the deprecation notice in accordance with the wordmark.
Props peterwilsoncc, mukesh27, swissspidy, talldanwp, dd32.
Fixes#61349.
git-svn-id: https://develop.svn.wordpress.org/trunk@58362 602fd350-edb4-49c9-b593-d223f7449a82