WordPress/wp-includes/rest-api/endpoints
Adam Silverstein ea399e28a9 Revisions: return existing autosave after saving with unchanged data.
Correctly return the existing autosave when an unchanged autosave is saved, instead of returning an error.

Fix regressions after r55154 where an error and not the original autosave was returned when saving with unchanged data (for example, clicking the preview button repeatedly). Returning the autosave (ID) is the expected behavior for the endpoint.

Follow up to [55154]

Props Mamaduka, jeroenrotty, mrfoxtalbot.
Fixes #58739.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-07 17:53:23 +00:00
..
class-wp-rest-application-passwords-controller.php
class-wp-rest-attachments-controller.php Code Modernization: Use str_contains() in a few more places. 2023-06-26 10:17:25 +00:00
class-wp-rest-autosaves-controller.php Revisions: return existing autosave after saving with unchanged data. 2023-07-07 17:53:23 +00:00
class-wp-rest-block-directory-controller.php
class-wp-rest-block-pattern-categories-controller.php REST API: Cache schema in block pattern and menu item endpoints. 2023-06-28 15:53:26 +00:00
class-wp-rest-block-patterns-controller.php REST API: Cache schema in block pattern and menu item endpoints. 2023-06-28 15:53:26 +00:00
class-wp-rest-block-renderer-controller.php
class-wp-rest-block-types-controller.php
class-wp-rest-blocks-controller.php Editor: rename sync_status and move it to top level. 2023-07-07 07:29:23 +00:00
class-wp-rest-comments-controller.php
class-wp-rest-controller.php
class-wp-rest-edit-site-export-controller.php
class-wp-rest-global-styles-controller.php REST API: updates test annotations for global styles revisions 2023-06-29 06:50:20 +00:00
class-wp-rest-global-styles-revisions-controller.php REST API: add revisions endpoint for global styles. 2023-06-28 03:35:25 +00:00
class-wp-rest-menu-items-controller.php REST API: Cache schema in block pattern and menu item endpoints. 2023-06-28 15:53:26 +00:00
class-wp-rest-menu-locations-controller.php
class-wp-rest-menus-controller.php REST API: Cache schema in block pattern and menu item endpoints. 2023-06-28 15:53:26 +00:00
class-wp-rest-navigation-fallback-controller.php Editor: add navigation fallback. 2023-06-27 05:54:19 +00:00
class-wp-rest-pattern-directory-controller.php
class-wp-rest-plugins-controller.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-wp-rest-post-statuses-controller.php
class-wp-rest-post-types-controller.php
class-wp-rest-posts-controller.php
class-wp-rest-revisions-controller.php Coding Standards: Bring some consistency to REST API revisions initialization. 2023-04-28 15:06:21 +00:00
class-wp-rest-search-controller.php
class-wp-rest-settings-controller.php
class-wp-rest-sidebars-controller.php
class-wp-rest-site-health-controller.php I18N: Always pass $locale to load_textdomain(). 2022-11-10 19:40:11 +00:00
class-wp-rest-taxonomies-controller.php
class-wp-rest-templates-controller.php REST API: ignore empty templates. 2023-06-27 05:36:22 +00:00
class-wp-rest-terms-controller.php
class-wp-rest-themes-controller.php REST API: Indicate when a theme supports the Site editor in the Themes REST API response. 2023-06-20 22:17:27 +00:00
class-wp-rest-url-details-controller.php
class-wp-rest-users-controller.php Code Modernization: Replace usage of strpos() with str_contains(). 2023-06-22 14:36:26 +00:00
class-wp-rest-widget-types-controller.php
class-wp-rest-widgets-controller.php