WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/23/2019 09:01:16 PM (8 weeks ago)
Author:
kadamwhite
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r46275 r46279  
    37283728
    37293729    if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) {
    3730         if ( ! in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
     3730        if ( ! in_array( $post_status, get_post_stati( array( 'date_floating' => true ) ), true ) ) {
    37313731            $post_date_gmt = get_gmt_from_date( $post_date );
    37323732        } else {
Note: See TracChangeset for help on using the changeset viewer.