Make WordPress Core


Ignore:
Timestamp:
09/11/2017 05:49:58 PM (7 years ago)
Author:
westonruter
Message:

Customize: Align behavior of WP_Customize_Manager::save_changeset_post() with wp_insert_post() by setting status to future if supplied status is publish but date is future.

Props dlh.
Fixes #41336.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r41364 r41372  
    22712271                return new WP_Error( 'not_future_date' );
    22722272            }
     2273        }
     2274
     2275        if ( ! empty( $is_future_dated ) && 'publish' === $args['status'] ) {
     2276            $args['status'] = 'future';
    22732277        }
    22742278
Note: See TracChangeset for help on using the changeset viewer.