wordpress-develop/tests/phpunit/tests/post
John Blackbourn 402820ebba Posts, Post Types: Switch to restoring posts to draft status by default when they are untrashed.
This allows for edits to be made to a restored post before it goes live again. This also prevents scheduled posts being published unexpectedly if they are untrashed after their originally scheduled date.

The old behaviour of restoring untrashed posts to their original status can be reinstated using the `wp_untrash_post_set_previous_status()` helper function.

Also fixes an issue where the incorrect post ID gets passed to hooks if no post ID is passed to the function.

Props harrym, bananastalktome, jaredcobb, chriscct7, melchoyce, johnbillion, pankajmohale

Fixes #23022


git-svn-id: https://develop.svn.wordpress.org/trunk@49125 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-11 13:37:04 +00:00
..
attachments.php Tests: Convert the checks for imagejpeg() function availability to use the @requires annotation. 2020-09-21 11:34:06 +00:00
bodyClass.php Themes: Add additional later escaping to post_class() and body_class() functions. 2020-06-16 16:55:45 +00:00
filtering.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
formats.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getBodyClass.php PHPCS: Fix WPCS violation in [45088]. 2019-04-01 16:48:32 +00:00
getLastPostDate.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getLastPostModified.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getPageByPath.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getPageChildren.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
getPages.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
getPageUri.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getPostClass.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getPosts.php Code is Poetry. 2017-11-30 23:09:33 +00:00
getPostsByAuthorSql.php Code is Poetry. 2017-11-30 23:09:33 +00:00
getPostTypeLabels.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
getTheContent.php Posts, Post Types: Avoid a PHP warning when get_the_content() is called outside of the loop. 2020-06-21 10:34:35 +00:00
getTheExcerpt.php Posts: Avoid the use of globals in get_the_content() and related functions. 2019-03-20 15:48:46 +00:00
isPostTypeViewable.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
listPages.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
meta.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
nav-menu.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
objects.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
output.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
pings.php Code is Poetry. 2017-11-30 23:09:33 +00:00
postClass.php Themes: Add additional later escaping to post_class() and body_class() functions. 2020-06-16 16:55:45 +00:00
query.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
revisions.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
slashes.php Tests: Speed up slashed data tests by reusing some more shared fixtures. 2020-09-19 11:11:00 +00:00
template.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
thumbnails.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
types.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
walkerPage.php Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:04:18 +00:00
wpGetPostParentId.php Tests: Improve tests for wp_get_post_parent_id() added in [42397]. 2018-02-01 16:02:26 +00:00
wpInsertPost.php Posts, Post Types: Switch to restoring posts to draft status by default when they are untrashed. 2020-10-11 13:37:04 +00:00
wpPost.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
wpPostType.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
wpPublishPosts.php Posts, Post Types: Ensure default terms are added by wp_publish_post(). 2020-09-19 01:20:48 +00:00
wpUniquePostSlug.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00