Commit Graph

8548 Commits

Author SHA1 Message Date
audrasjb
c41d5e69d3 Media: Revert wp_ajax_save_attachment_updated hook.
This changeset removes the `wp_ajax_save_attachment_updated` hook by reverting [55106], [55111], and [55450], to give it more time for further discussions as there are still concerns about whether this hook is necessary.

Follow-up to [55106], [55111], [55450].

Props costdev, SergeyBiryukov, peterwilsoncc, azaozz.
See #23148.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-07 13:13:22 +00:00
ryelle
774a23c3c0 Administration: Update the Dashboard welcome banner for 6.2.
Props richtabor, markoserb, laurlittle.
See #57759.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:42:18 +00:00
audrasjb
3fdc61552e Media: Rename the wp_ajax_save_attachment action hook to wp_ajax_save_attachment_updated.
This changeset renames the `wp_ajax_save_attachment` action to `wp_ajax_save_attachment_updated` to avoid confusion with the similarly named `wp_ajax_save-attachment` action. This also add a dockblock note to indicate that when checking if an action is being done, `doing_action( 'wp_ajax_save-attachment' )` may be used if that is more convenient.

Follow-up to [55106].

Props azaozz, sc0ttkclark, costdev.
Fixes #23148

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


git-svn-id: http://core.svn.wordpress.org/trunk@54983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:32:20 +00:00
Sergey Biryukov
04967a68b6 Upgrade/Install: Introduce WP_Automatic_Updater::is_allowed_dir() method.
As part of determining whether to perform automatic updates, WordPress checks if it is running within a version-controlled environment, recursively looking up the filesystem to the top of the drive, looking for a Subversion, Git, Mercurial, or Bazaar directory, erring on the side of detecting a VCS checkout somewhere.

This commit avoids a PHP warning if the `open_basedir` directive is in use and any of the directories checked in the process are not allowed:
{{{
is_dir(): open_basedir restriction in effect. File(/.git) is not within the allowed path(s)
}}}

Follow-up to [25421], [25700], [25764], [25835], [25859].

Props costdev, markjaquith, meyegui, dd32, arnolp, robin-labadie, hellofromTonya, afragen, pbiron, SergeyBiryukov.
Fixes #42619.
Built from https://develop.svn.wordpress.org/trunk@55425


git-svn-id: http://core.svn.wordpress.org/trunk@54958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-26 15:19:21 +00:00
audrasjb
54dd6eda90 Help/About: Use a consistent capitalization for "Support forums" links across WP Admin.
Follow-up to [55412], [55413].

See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 11:13:22 +00:00
audrasjb
34229a4286 Help/About: Avoid extra redirections on HelpHub Links.
This changeset replaces various HelpHub links that have changed to avoid extra 301 redirections.

Props sabernhardt, audrasjb.
See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 11:06:19 +00:00
audrasjb
418a21fdbc Help/About: Use the new /documentation/ URLs for HelpHub links in WordPress Admin.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/article/*` links with `/documentation/article/*` to avoid an extra redirect.

This also updates links to Support Forums by replacing `https://wordpress.org/support/` URLs with `https://wordpress.org/support/forums/`.

Props SergeyBiryukov, audrasjb, dhrupo, hasanmisbah, sakibmd, sabernhardt.
See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 10:38:21 +00:00
audrasjb
8771b175cd Mail: Fix character encoding issues in Plugin/Theme background update emails.
This changeset fixes encoding issues in background update emails by applying `html_entity_decode()` on Plugin/Theme names in `send_plugin_theme_email()`.

Props paulschreiber, audrasjb, benjgrolleau, sanketchodavadiya, robinwpdeveloper, paulamit.
Fixes #56964.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 10:07:26 +00:00
Sergey Biryukov
3533ec3159 Media: Add WP_Image_Editor_Imagick::set_imagick_time_limit() method.
This aims to avoid timeout in Imagick operations.

Previously, Imagick operations could silently error by timeout and produce unexpected results. The new `::set_imagick_time_limit()` method, now used in `::resize()` and `::crop()`, will better handle garbage collection in these cases as well as better align Imagick's timeout with PHP timeout, assuming it is set.

Props drzraf, audrasjb, costdev, antpb, SergeyBiryukov.
Fixes #52569.
Built from https://develop.svn.wordpress.org/trunk@55404


git-svn-id: http://core.svn.wordpress.org/trunk@54937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 14:25:25 +00:00
Sergey Biryukov
1553e3fa00 Coding Standards: Rename $post_ID variable to $post_id in various files.
The `$post_ID` variable is [546f59c678/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php (L54) technically allowed in WPCS], as there is a global of the same name that needs to remain for backward compatibility. However, this name is mostly a remnant of legacy code, and switching to `$post_id` where appropriate brings more consistency with the rest of core.

Additionally, this commit resolves a few WPCS warnings in core:
{{{
Variable "$post_IDs" is not in valid snake_case format
}}}

This affects:
* Function parameters in:
 * `add_meta()`
 * `post_preview()`
 * `WP_Embed::delete_oembed_caches()`
 * `WP_Embed::cache_oembed()`
 * `wp_get_post_cats()`
 * `wp_set_post_cats()`
 * `wp_unique_post_slug()`
 * `wp_set_post_categories()`
 * `wp_check_post_hierarchy_for_loops()`
 * `wp_add_trashed_suffix_to_post_name_for_trashed_posts()`
 * `wp_filter_wp_template_unique_post_slug()`
 * `wp_xmlrpc_server::add_enclosure_if_new()`
 * `wp_xmlrpc_server::attach_uploads()`
 * `wp_xmlrpc_server::mt_getTrackbackPings()`
* Internal variables in:
 * `wp_ajax_inline_save()`
 * `wp_ajax_set_post_thumbnail()`
 * `wp_ajax_get_post_thumbnail_html()`
 * `edit_post()`
 * `bulk_edit_posts()`
 * `wp_write_post()`
 * `WP_Embed::shortcode()`
 * `wp_insert_post()`
 * `wp_xmlrpc_server::_insert_post()`
 * `wp_xmlrpc_server::blogger_getPost()`
 * `wp_xmlrpc_server::blogger_newPost()`
 * `wp_xmlrpc_server::blogger_editPost()`
 * `wp_xmlrpc_server::blogger_deletePost()`
 * `wp_xmlrpc_server::mw_getPost()`
 * `wp_xmlrpc_server::mw_newPost()`
 * `wp_xmlrpc_server::mw_editPost()`
 * `wp_xmlrpc_server::mt_getPostCategories()`
 * `wp_xmlrpc_server::mt_setPostCategories()`
 * `wp_xmlrpc_server::mt_publishPost()`
 * `wp_xmlrpc_server::pingback_ping()`
* Hook parameters in:
 * `oembed_ttl`
 * `embed_oembed_html`
 * `wp_insert_post_parent`
 * `add_trashed_suffix_to_trashed_posts`
 * `pre_post_update`
 * `edit_attachment`
 * `attachment_updated`
 * `add_attachment`
 * `edit_post_{$post->post_type}`
 * `edit_post`
 * `post_updated`
 * `save_post_{$post->post_type}`
 * `save_post`
 * `wp_insert_post`
 * `pre_wp_unique_post_slug`
 * `wp_unique_post_slug`
 * `xmlrpc_call_success_blogger_newPost`
 * `xmlrpc_call_success_blogger_editPost`
 * `xmlrpc_call_success_blogger_deletePost`
 * `xmlrpc_call_success_mw_newPost`
 * `xmlrpc_call_success_mw_editPost`

Note: The name change only affects variable names and DocBlocks.

The change does not affect the `$post_ID` global still used in a few places.

Follow-up to [51399], [52958], [53723], [53729], [55190], [55308], [55334].

Props mahekkalola, tanjimtc71, SergeyBiryukov.
Fixes #57692.
Built from https://develop.svn.wordpress.org/trunk@55365


git-svn-id: http://core.svn.wordpress.org/trunk@54898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-19 15:05:22 +00:00
Sergey Biryukov
89bb47e4e1 Docs: Add www. prefix to some PHP manual links in code comments.
This avoids an extra redirect and brings more consistency with other links to the PHP website in core.

Follow-up to [42980], [50914], [55355].

See #56792.
Built from https://develop.svn.wordpress.org/trunk@55363


git-svn-id: http://core.svn.wordpress.org/trunk@54896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-18 14:23:21 +00:00
audrasjb
f0789b6423 Docs: Replace HTTP with HTTPS in PHP Manual links located in WP_Privacy_Policy_Content class.
Follow-up to [55355].

See #56792, #57017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 23:11:28 +00:00
Andrew Ozz
e3d1a1291f Filesystem API: Use trailingslashit( $path ) instead of $path . '/'. Fixes a warning when $path already ends with a slash.
Props: costdev, afragen, mukesh27.
Fixes: #57516.
Built from https://develop.svn.wordpress.org/trunk@55354


git-svn-id: http://core.svn.wordpress.org/trunk@54887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 22:13:28 +00:00
Sergey Biryukov
5826e74499 Coding Standards: Pass correct value to get_delete_post_link() in attachment_submit_meta_box().
The `$deprecated` parameter of `get_delete_post_link()` is documented to accept a string, not `null`.

Follow-up to [14099], [21948].

Props krunal265, jrf.
Fixes #57690.
Built from https://develop.svn.wordpress.org/trunk@55306


git-svn-id: http://core.svn.wordpress.org/trunk@54839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-11 13:12:19 +00:00
hellofromTonya
ecb9325014 Upgrade/Install: Skip preloading Requests for WordPress versions before 4.6.
Skip preloading Requests files in `_preload_old_requests_classes_and_interfaces()` when updating from a WordPress version older than 4.6.

Why?

Requests library was first introduced into WordPress 4.6 via #33055 / [37428]. If a user is upgrading from a version older than 4.6, this changeset prevents the Requests preloading to prevent a fatal error of attempting to load files that do not exist in their current WordPress version.

Follow-up to [54997], [37428].

Props afragen, costdev, ironprogrammer, antonvlasenko.
Fixes #57662.
Built from https://develop.svn.wordpress.org/trunk@55296


git-svn-id: http://core.svn.wordpress.org/trunk@54829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 15:03:19 +00:00
John Blackbourn
270a3d009d Docs: Miscellaneous improvements and corrections to docblocks.
See #56792

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


git-svn-id: http://core.svn.wordpress.org/trunk@54826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 21:21:18 +00:00
John Blackbourn
e374552961 Application Passwords: Allow plain HTTP success and reject URLs when using a local environment type.
It's not uncommon for local environments to run over HTTP due to the relative complexity of configuring HTTPS for a local environment. This change allows HTTP URLs for application password responses when that is the case.

Props peterwilsoncc, wppunk, cadic, viralsampat

Fixes #52617

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


git-svn-id: http://core.svn.wordpress.org/trunk@54816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:46:20 +00:00
Sergey Biryukov
9c5d4ca8d1 I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.
Built from https://develop.svn.wordpress.org/trunk@55276


git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:10:21 +00:00
Sergey Biryukov
6a22b9c21c Quick/Bulk Edit: Remove the bulk_edit_posts action for now.
This reverts [55108] pending confirmation that this hook is still needed, that the right variable is passed, and that the docs are correct.

The necessity and implementation of this hook will be reconsidered in a future release.

See #28112.
Built from https://develop.svn.wordpress.org/trunk@55265


git-svn-id: http://core.svn.wordpress.org/trunk@54798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:25:24 +00:00
Sergey Biryukov
b29536b060 General: Check that set_time_limit() function is available before using it in core.
This avoids a fatal error if the function is disabled on certain environments.

Props theode, jokerrs, johnbillion, hellofromTonya, costdev, jrf, azaozz, SergeyBiryukov.
Fixes #55711.
Built from https://develop.svn.wordpress.org/trunk@55258


git-svn-id: http://core.svn.wordpress.org/trunk@54791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 13:28:18 +00:00
audrasjb
e00a90c571 Media: Maintain the functionnality of the deprecated WP_Media_List_Table::column_desc() method.
Follow-up to [55159].

Props peterwilsoncc, costdev, mukesh27.
Fixes #39710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 09:08:20 +00:00
audrasjb
a816a24b9c Coding Standards: Add missing escaping function in Custom_Image_Header::show_header_selector().
Props chintan1896, SergeyBiryukov.
Fixes #57638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 21:36:17 +00:00
Sergey Biryukov
ba4ed5f86c Upgrade/Install: Send language pack updates to copy_dir().
If the `clear_working` flag in `WP_Upgrader::install_package()` is false, the source should not be removed, so `copy_dir()` should be used instead.

Partial updates, like language packs, may want to retain the destination. If the destination exists or has contents, this may be a partial update, and the destination should not be removed, so `copy_dir()` should be used instead.

Follow-up to [55204], [55219], [55220], [55223], [55226].

Props afragen, costdev, swissspidy.
See #57557.
Built from https://develop.svn.wordpress.org/trunk@55229


git-svn-id: http://core.svn.wordpress.org/trunk@54762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 14:48:16 +00:00
Peter Wilson
be3d8fdcc3 Filesystem API: Prevent fatal error in move_dir().
Correctly instantiate `WP_Error()` within `move_dir()` to prevent a fatal error when unable to delete an existing directory that is intended to be replaced.

Follow-up to [55204], [55219], [55220], [55223].

Props swissspidy, costdev, afragen.
Fixes #57375.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 04:21:20 +00:00
Sergey Biryukov
cd0d67c8b2 Upgrade/Install: Silence Requests deprecations before preloading.
Intentional preloading of Requests 2.x classes and interfaces using their old (Requests 1.x) names should not produce deprecation notices.

This commit defines `REQUESTS_SILENCE_PSR0_DEPRECATIONS` as `true` in `_preload_old_requests_classes_and_interfaces()`.

Follow-up to [54997], [55007], [55046].

Props costdev, afragen, jrf.
Fixes #54504.
Built from https://develop.svn.wordpress.org/trunk@55225


git-svn-id: http://core.svn.wordpress.org/trunk@54758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-05 00:20:15 +00:00
Sergey Biryukov
4b790e3483 Filesystem API: Simplify two conditionals in move_dir().
This updates the check whether the destination directory already exists to only call `$wp_filesystem->exists()` once.

Follow-up to [55204], [55219], [55220].

Props azaozz, afragen, SergeyBiryukov.
Fixes #57375.
Built from https://develop.svn.wordpress.org/trunk@55223


git-svn-id: http://core.svn.wordpress.org/trunk@54756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 15:37:16 +00:00
audrasjb
ba5324e2bd Media: Properly escape Download row action link in Media List Table.
Props joedolson, pbiron, audrasjb.
Fixes #57574.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 07:10:18 +00:00
Andrew Ozz
552a0c71a8 Upgrade/Install: Use move_dir() instead of copy_dir() in WP_Upgrader::install_package() when possible. This would make the filesystem operations a lot faster in most cases, and potentially reduce failures.
Props: afragen, costdev, peterwilsoncc, pbiron, mukesh27, SergeyBiryukov, azaozz.
Fixes: #57557.
Built from https://develop.svn.wordpress.org/trunk@55220


git-svn-id: http://core.svn.wordpress.org/trunk@54753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 03:31:16 +00:00
Andrew Ozz
8cf4b7557f Filesystem API: Update move_dir() to better handle the differences in the WP_Filesystem::move() methods.
Changes `move_dir()` to attempt to delete the destination when overwriting, before calling `WP_Filesystem::move()`.

Props: afragen, costdev, azaozz.
Fixes: #57375.
Built from https://develop.svn.wordpress.org/trunk@55219


git-svn-id: http://core.svn.wordpress.org/trunk@54752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 01:08:17 +00:00
joedolson
e7a506c636 Media: Hide 'view' link if empty string passed to attachment_link.
Fix empty href attribute on 'View' link when the `attachment_link` filter is used to hide attachment pages.

Props oh_hello, iqbalrony.
Fixes #54824.
Built from https://develop.svn.wordpress.org/trunk@55218


git-svn-id: http://core.svn.wordpress.org/trunk@54751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 22:25:16 +00:00
Sergey Biryukov
e235883c4d HTTP API: Restore one instance of the X-Pingback header capitalization.
The revert in the previous commit appears to be accidental.

Follow-up to [55210], [55211].

See #54225.
Built from https://develop.svn.wordpress.org/trunk@55212


git-svn-id: http://core.svn.wordpress.org/trunk@54745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 14:41:26 +00:00
audrasjb
897eefe2e3 HTTP API: Fix a unit test failure found after [55210].
Follow-up to [55210].

See #54225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 13:53:18 +00:00
audrasjb
28358ab213 HTTP API: Fix request header inconsistencies.
This changeset improves the consistency in capitalization of fetching and outputting of request headers. It also updates occurrences found in some docblocks.

Props johnjamesjacoby, costdev, audrasjb, petitphp, mhkuu, SergeyBiryukov.
Fixes #54225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 13:35:20 +00:00
Andrew Ozz
d5f8d02445 Docs: Document directory support in FTP/SSH2 filesystem ::move() methods.
Props: costdev, flixos90, audrasjb.
Fixes: #57604.
Built from https://develop.svn.wordpress.org/trunk@55205


git-svn-id: http://core.svn.wordpress.org/trunk@54738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 01:59:15 +00:00
Andrew Ozz
47172a2c65 Filesystem API: Add directory support to WP_Filesystem_Direct::move().
Introduces:
- New function: `wp_opcache_invalidate_directory()`, to recursively call `wp_opcache_invalidate()` after overwriting .php files.
- New function: `move_dir()`, similar to `copy_dir()` that uses `WP_Filesystem::move()` followed by `wp_opcache_invalidate_directory()`, and has a fallback to `copy_dir()`.

Props: costdev, afragen, peterwilsoncc, sergeybiryukov, ironprogrammer, flixos90, bronsonquick, mukesh27, azaozz.
Fixes #57375.
Built from https://develop.svn.wordpress.org/trunk@55204


git-svn-id: http://core.svn.wordpress.org/trunk@54737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 01:50:16 +00:00
audrasjb
93234049f2 Media: Add a Download row action to the Media List Table.
This changeset makes it easier for users to download their uploaded media by providing a Download row action to the Media List Table. It also rephrases the Copy URL row action for better consistency and to give room for the new Download action.

Follow-up to [55156].

Props pbiron, joedolson, kebbet, Mista-Flo, costdev, amin7, mukesh27.
Fixes #57574.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 22:48:16 +00:00
audrasjb
0874553f76 Plugins: Rephrase Add Plugins screen description for better clarity.
This changeset rephrases the Add Plugins screen description to clarify the purpose of the two available options for installing plugins.

Props tahmidulkarim, audrasjb, costdev, ryokuhi, krupalpanchal, SergeyBiryukov.
Fixes #57155.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 21:50:16 +00:00
Sergey Biryukov
12aba159d9 Coding Standards: Rename the $cat_ID variable to $cat_id in wp_update_category().
This resolves a few WPCS warnings:
{{{
Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d"
}}}

Follow-up to [2695], [4490], [52958].

Props hilayt24, viralsampat, desrosj, robinwpdeveloper, tanazmasaba, costdev, SergeyBiryukov.
See #56754.
Built from https://develop.svn.wordpress.org/trunk@55190


git-svn-id: http://core.svn.wordpress.org/trunk@54723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 13:59:18 +00:00
audrasjb
7e3b08c8af Themes: Increase HTTP timeout for Theme API requests.
This changeset modifies the HTTP request in `themes_api()` to use the same HTTP request timeout as in `plugins_api()`, which is 15 seconds, instead of a default value of 5 seconds.

Props ahortin, peterwilsoncc, dd32, costdev.
Fixes #57315.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 09:14:17 +00:00
joedolson
01236f5948 Media: Fix inconsistent font weight in media detail views.
Make font weight consistent between different screens and different parts of media views.
 
Props szaqal21, sabernhardt.
Fixes #54509.
Built from https://develop.svn.wordpress.org/trunk@55187


git-svn-id: http://core.svn.wordpress.org/trunk@54720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 02:16:12 +00:00
joedolson
237cb1da8f Media: Remove meta data after restoring w/IMAGE_EDIT_OVERWRITE.
When IMAGE_EDIT_OVERWRITE is defined as true the meta field `_wp_attachment_backup_sizes` is deleted after an image is restored.
 
Props mitogh, jeawhanlee, robinwpdeveloper, iapial.
Fixes #55150.
Built from https://develop.svn.wordpress.org/trunk@55180


git-svn-id: http://core.svn.wordpress.org/trunk@54713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 20:31:14 +00:00
Pascal Birchler
5edb22187d I18N: Introduce switch_to_user_locale().
This new function makes it easier to switch to a specific user’s locale by reducing duplicate code and storing the user’s ID as additional context for plugins to consume. Existing usage of `switch_to_locale()` in core has been replaced with `switch_to_user_locale()` where appropriate.

Also, this change ensures `WP_Locale_Switcher` properly filters `determine_locale` so that anyyone using the `determine_locale()` function will get the correct locale information when switching is in effect.

Props costdev.
Fixes #57123.
See #26511.
Built from https://develop.svn.wordpress.org/trunk@55161


git-svn-id: http://core.svn.wordpress.org/trunk@54694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-30 10:27:16 +00:00
audrasjb
9c04271f60 Media: Deprecate unused method WP_Media_List_Table::column_desc().
This changeset formally deprecates the `column_desc()` method from `WP_Media_List_Table`, as it was never used anywhere in core.

Props iandunn, JeffMatson, antpb, costdev, audrasjb.
Fixes #39710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-28 22:17:16 +00:00
joedolson
ac0cb7a37b Media: Add download link to media modal and attachment details.
Make it easier for users to download their uploaded media by providing a download link on the attachment details screen and in the media modal.

Props countrymusicchicago, joedolson, amin7
Fixes #41474.
Built from https://develop.svn.wordpress.org/trunk@55156


git-svn-id: http://core.svn.wordpress.org/trunk@54689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-27 23:07:13 +00:00
Sergey Biryukov
a61dc175a8 Themes: Add "Style Variations" to the list of WordPress theme features.
Follow-up to [meta12372].

Props poena, mukesh27, costdev.
Fixes #56869. See #meta6545.
Built from https://develop.svn.wordpress.org/trunk@55149


git-svn-id: http://core.svn.wordpress.org/trunk@54682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-27 15:54:19 +00:00
audrasjb
a0b0f4560b Menus: Add missing escaping function in Admin Menu walker.
Props aniketpatel, mukesh27, costdev.
Fixes #57541.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-24 21:32:14 +00:00
audrasjb
524bd7ba46 Posts, Post Types: Increase the input field's width in the Slug metabox.
This changeset adds a `large-text` attribute and removes the `size` attribute of the text input field located in the Slug metabox. It improves its usability, at least for as long as the Slug metabox is available in the Classic Editor.

Props ABTOP, nacin, helen, sabernhardt, abitofmind, tyxla, audrasjb.
Fixes #16346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-22 11:11:12 +00:00
Sergey Biryukov
4568b1fb32 Docs: Further clarify the wp_ajax_save_attachment filter parameters description.
Follow-up to [55106].

See #23148.
Built from https://develop.svn.wordpress.org/trunk@55111


git-svn-id: http://core.svn.wordpress.org/trunk@54644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-21 15:58:10 +00:00
audrasjb
73f6748ea4 Quick/Bulk Edit: Add an action hook on bulk_edit_posts().
This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before it returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` call.

Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev.
Fixes #28112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-20 21:43:11 +00:00
audrasjb
fe3e932421 Media: Add an action hook on wp_ajax_save_attachment().
This changeset introduces the `wp_ajax_save_attachment` action hook, triggered after an attachment has been updated and before the JSON response is sent. For example, it allows developers to update any additional attachment fields that have been rendered by extending the `media.view.Attachment.Details` subview.

Props griffinjt, bradyvercher, pputzer, antpb, sc0ttkclark, audrasjb, costdev, hellofromTonya.
Fixes #23148.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-20 14:17:16 +00:00