mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Posts, Post Types: Build list of "date floating" post stati dynamically when inserting post.
Completes work begun in #39953 to expose "date floating" status information to frontend clients via the REST API. Props TimothyBlynJacobs. Fixes #48113. Built from https://develop.svn.wordpress.org/trunk@46279 git-svn-id: http://core.svn.wordpress.org/trunk@46091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
098455b06f
commit
81ed396972
@ -3727,7 +3727,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) {
|
if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) {
|
||||||
if ( ! in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
|
if ( ! in_array( $post_status, get_post_stati( array( 'date_floating' => true ) ), true ) ) {
|
||||||
$post_date_gmt = get_gmt_from_date( $post_date );
|
$post_date_gmt = get_gmt_from_date( $post_date );
|
||||||
} else {
|
} else {
|
||||||
$post_date_gmt = '0000-00-00 00:00:00';
|
$post_date_gmt = '0000-00-00 00:00:00';
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-46278';
|
$wp_version = '5.3-alpha-46279';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user