Correctly display edits after you crop an image and return to the attachments page.
Prefer the `full` over the `large` size image on the edit image screen.
Props andy786, antpb, sanketchodavadiya, antonvlasenko, ironprogrammer.
Fixes#55070.
Built from https://develop.svn.wordpress.org/trunk@55470
git-svn-id: http://core.svn.wordpress.org/trunk@55003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Changes:
* from `assertEquals()` to `assertSame()`. Why? To ensure both the return value and data type match the expected results.
* the expected height and width from `string` to `integer` data types. Why integer? `getimagesize()` (within `wp_getimagesize()`) will return an integer for both height and weight.
* adds the ticket annotation.
* adds assertion failure messages. Why? To denote which assertion failed, which aids in debugging efforts.
Follow-up to [55278].
Props costdev, peterwilsoncc, mukesh27, ankitmaru, hellofromTonya.
See #56800, #57370.
Built from https://develop.svn.wordpress.org/trunk@55467
git-svn-id: http://core.svn.wordpress.org/trunk@55000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
By hooking into `terms_pre_query` after the fixture posts and terms are created but before the actual taxonomy query runs, we ensure that the correct SQL query from `WP_Term_Query::get_terms()` is tested for requested term limits, rather than the one initiated from `wp_insert_post()` or `wp_insert_term()` via `term_exists()`.
Follow-up to [52921], [53037].
Props david.binda.
Fixes#57342.
Built from https://develop.svn.wordpress.org/trunk@55460
git-svn-id: http://core.svn.wordpress.org/trunk@54993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds a new GitHub Action workflow that measures a set of performance metrics on every commit, so we can track changes in the performance of WordPress over time and more easily identify changes that are responsible for significant performance improvements or regressions during development cycles.
The workflow measures the homepage of a classic theme (Twenty Twenty-One) and a block theme (Twenty Twenty-Three) set up with demo content from the Theme Test Data project. Using the e2e testing framework, it makes 20 requests and records the median value of the following Server Timing metrics, generated by an mu-plugin installed as part of this workflow:
- Total server response time
- Server time before templates are loaded
- Server time during template rendering
In addition to measuring the performance metrics of the current commit, it also records performance metrics of a consistent version of WordPress (6.1.1) to be used as a baseline measurement in order to remove variance caused by the GitHub workers themselves from our reporting.
The measurements are collected and displayed at https://www.codevitals.run/project/wordpress.
Props adamsilverstein, mukesh27, flixos90, youknowriad, oandregal, desrosj, costdev, swissspidy.
Fixes#57687.
Built from https://develop.svn.wordpress.org/trunk@55459
git-svn-id: http://core.svn.wordpress.org/trunk@54992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Per the[https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#6-file-headers documentation standards], whenever possible, all WordPress files should contain a header DocBlock, regardless of the file’s contents – this includes files containing classes.
However, this recommendation makes less sense for unit test classes if not applied consistently, and the duplicate tags cause some confusion.
This commit aims to reduce confusion and avoid repeating information by combining the DocBlocks.
Follow-up to [55337].
Props sakibmd, fuadragib, robinwpdeveloper, naeemhaque, seakashdiu, jakariaistauk, hasanmisbah, SergeyBiryukov.
Fixes#57723.
Built from https://develop.svn.wordpress.org/trunk@55457
git-svn-id: http://core.svn.wordpress.org/trunk@54990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to elaborate a bit more on the difference between these two settings, as well as explain the `http://` or `https://` prefix.
Follow-up to [15000], [19472].
Props marybaum, sabernhardt, tobifjellner, justinahinon, webcommsat, hellofromtonya, audrasjb, robinwpdeveloper, costdev, SergeyBiryukov.
Fixes#50886.
Built from https://develop.svn.wordpress.org/trunk@55452
git-svn-id: http://core.svn.wordpress.org/trunk@54985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
This changeset fixes a bug by which the reset function of the global styles sidebar would not work as expected in the site editor. It reverts [54517] and adds related unit tests.
Props oandregal, ntsekouras, youknowriad, hellofromTonya.
Fixes#57824
See #56467
Built from https://develop.svn.wordpress.org/trunk@55448
git-svn-id: http://core.svn.wordpress.org/trunk@54981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset ensures the file path is correctly passed in the output from `_doing_it_wrong()` notice in `register_block_script_handle()`.
Props desrosj, neychok, mahbubshovan, ironprogrammer, robinwpdeveloper, hellofromTonya, simongomes02, mukesh27, costdev.
Fixes#53566.
Built from https://develop.svn.wordpress.org/trunk@55446
git-svn-id: http://core.svn.wordpress.org/trunk@54979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.
This commit resolves a failure when running the test suite on Windows:
{{{
1) Tests_Formatting_wpAutop::test_skip_block_math_elements
Failed asserting that two strings are identical.
...
#Warning: Strings contain different line endings!
}}}
Follow-up to [55272].
Props davidbaumwald, ignatggeorgiev, sakibmd.
Fixes#57718.
Built from https://develop.svn.wordpress.org/trunk@55445
git-svn-id: http://core.svn.wordpress.org/trunk@54978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This avoids a collision if `wp_list_authors()` is called with the `optioncount` parameter enabled, and the resulting array for the post counts query contains a key that matches the ID of a user who does not have any posts.
Follow-up to [54262].
Props peterwilsoncc, johnbillion, lifeboat, brookedot, thedaysse, Toru.
Fixes#57011.
Built from https://develop.svn.wordpress.org/trunk@55444
git-svn-id: http://core.svn.wordpress.org/trunk@54977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[55230] introduced a regression to the content markup. This changeset is a partial revert to remove the added `wp-includes/block-supports/anchor.php` file.
The change of adding `'id'` to `$attributes_to_merge` in `get_block_wrapper_attributes()` is not reverted as this change did not impact the regression and helps to support continue development in Gutenberg for the anchor support in dynamic blocks feature.
Reference:
* [https://github.com/WordPress/gutenberg/pull/48592 Gutenberg PR 48592].
Follow-up [55230].
Props wildworks, mamaduka, hellofromTonya.
Fixes#57830.
See #56852.
Built from https://develop.svn.wordpress.org/trunk@55443
git-svn-id: http://core.svn.wordpress.org/trunk@54976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The tests ensure that the `next_posts_link_attributes` and `previous_posts_link_attributes` filters are applied correctly.
Follow-up to [1383], [5045], [8502], [9632], [55429].
Props geisthanen, mukesh27, costdev, audrasjb, SergeyBiryukov.
Fixes#55751.
Built from https://develop.svn.wordpress.org/trunk@55442
git-svn-id: http://core.svn.wordpress.org/trunk@54975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updated the packages to the latest versions with the latest fixes.
Gutenberg changes: 35f10c1836
Includes the following bug fixes:
- Only add layout classes to inner wrapper if block is a container.
- Revert dynamic block anchor support
- [Inserter - Media tab]: Upload Openverse images when inserted
- SpacingSizesControl: Fix white dot on thumb
- Site Editor: update the edit button
- Change "Browse all templates" to "Manage all templates" in template details popover
- Remove TemplateAreas from template details
- Add support for orientation-based block movers to core/social-links
- Site Editor: polish add template modal style
- Match color of the focus template view with site dark material
- Site Editor: Fix routing for Classic themes using block-based template parts
- Remove broken site editor redirect
- Make the template customized info accessible
- Sort templates and template parts by slug
- Prevent distracting focused back button on site editor load
- Fix: Content only CPT template locking.
- Pin floating-ui/react-dom version
- Widget Importer: Don't render controls when there's nothing to import
- Post Editor: Update postContentBlock check to see if the block is valid
- Site Tagline: Add example so that it will display in style book
- Remove copy for managing a block's style variations
- Fix the site editor home page loading when installed in a subdirectory
- Global Styles: Display preset names via the tooltip
- [Query Loop] Fix top border in pattern selection modal
- Site Editor: Fix the 'Browse all' link in the template details modal
- Site Editor: Fix the tooltip and shortcut for the global save button
- Make the Site Logo block placeholder state smaller
- Site Editor Sidebar: Add line-height for template/parts name and update width for edit button
- Style Book: Focus the Style Book when opened, and enable ESCAPE key to close
- [Site Editor]: Set html block as freeform fallback block
- Make the performance tests more stable
- Adds all allowed innerblocks to the inspector animation experiment
- Revert Link control UX changes for WP 6.2
- Fix Site Editor perf tests
- Playwright: fix request utils for non Docker envs
See #57471.
Props Mamaduka, ntsekouras.
Built from https://develop.svn.wordpress.org/trunk@55440
git-svn-id: http://core.svn.wordpress.org/trunk@54973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The internal Core-only `_resolve_home_block_template()` function was introduced in [53093] for a specific purpose of resolving the template for a site's home page. It was used as part of the Site Editor's redirect when the `postType` and `postId` query args were missing. The server-side handling was removed in [55338]. The function is no longer used in Core.
This changeset deprecates the function and removes its tests.
Follow-up to [55338], [53093].
Props johnbillion, hellofromTonya.
Fixes#57716.
Built from https://develop.svn.wordpress.org/trunk@55436
git-svn-id: http://core.svn.wordpress.org/trunk@54969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This avoids an endless loop if `get_current_user_id()` is used in a callback attached to the `gettext` filter.
With the translated phrase moved into a separate assignment, the function succeeds in setting the static `$duplicated_keys` array once and no longer goes into this code section on subsequent calls.
Follow-up to [54249].
Props adityaarora010196, SergeyBiryukov.
Fixes#57121.
Built from https://develop.svn.wordpress.org/trunk@55433
git-svn-id: http://core.svn.wordpress.org/trunk@54966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a test case to verify that `get_the_posts_navigation()` only includes the "Older posts" and "Newer" posts links when appropriate.
Props jongycastillo, michelmany, joyously, geisthanen, SergeyBiryukov, mukesh27, audrasjb, costdev, sun, chrisbaltazar.
Fixes#55751.
Built from https://develop.svn.wordpress.org/trunk@55429
git-svn-id: http://core.svn.wordpress.org/trunk@54962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that if a theme with a numeric directory name is active, it is correctly identified as such, and that theme support features work as expected.
Follow-up to [20029], [49925].
Props lopo, alvastar, winterpsv, hugodevos, ankit-k-gupta, jakariaistauk, mukesh27, spacedmonkey, SergeyBiryukov.
Fixes#54645.
Built from https://develop.svn.wordpress.org/trunk@55426
git-svn-id: http://core.svn.wordpress.org/trunk@54959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
The original filter location is `wp_notify_moderator()` in `wp-includes/pluggable.php`.
This commit updates the instance in `wp_new_comment_notify_moderator()` to point to the correct file.
Follow-up to [35339], [35725].
Props zevilz.
Fixes#57808.
Built from https://develop.svn.wordpress.org/trunk@55424
git-svn-id: http://core.svn.wordpress.org/trunk@54957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Values for the input array in `WP_List_Util::pluck()` or `wp_list_pluck()` must be either objects or arrays.
This commit adds a check to ensure that the value retrieved in the loop is an array before treating it as such, and throws a `_doing_it_wrong()` notice if it is neither an object nor an array.
Follow-up to [14108], [15686], [18602], [28900], [38928].
Props afragen, costdev, audrasjb.
Fixes#56650.
Built from https://develop.svn.wordpress.org/trunk@55423
git-svn-id: http://core.svn.wordpress.org/trunk@54956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The table is no longer created by core as of WordPress 3.0, and support for global terms was removed in WordPress 6.1, so `$wpdb->sitecategories` is unset by default.
This commit resolves a "passing null to non-nullable" deprecation notice on PHP 8.1:
{{{
Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/class-wpdb.php on line 1804
}}}
The `tables_to_repair` filter is available for plugins to readd the table or include any additional tables to repair.
Follow-up to [14854], [14880], [54240].
Props ipajen, chiragrathod103, SergeyBiryukov.
Fixes#57762.
Built from https://develop.svn.wordpress.org/trunk@55421
git-svn-id: http://core.svn.wordpress.org/trunk@54954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses all the remaining WPCS warnings in bundled themes.
Includes using the correct type when checking the number of comments, as `get_comments_number()` returns a numeric string, not an integer.
Follow-up to [41285], [44562], [47941].
Props aristath, poena, afercia, SergeyBiryukov.
See #56791.
Built from https://develop.svn.wordpress.org/trunk@55420
git-svn-id: http://core.svn.wordpress.org/trunk@54953 1a063a9b-81f0-0310-95a4-ce76da25c4cd