Changeset 41372
- Timestamp:
- 09/11/2017 05:49:58 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r41364 r41372 2271 2271 return new WP_Error( 'not_future_date' ); 2272 2272 } 2273 } 2274 2275 if ( ! empty( $is_future_dated ) && 'publish' === $args['status'] ) { 2276 $args['status'] = 'future'; 2273 2277 } 2274 2278 -
trunk/tests/phpunit/tests/customize/manager.php
r41321 r41372 1414 1414 1415 1415 /** 1416 * Ensure that saving a changeset with a publish status but future date will change the status to future, to align with behavior in wp_insert_post(). 1417 * 1418 * @ticket 41336 1419 * @covers WP_Customize_Manager::save_changeset_post 1420 */ 1421 function test_publish_changeset_with_future_status_when_future_date() { 1422 $wp_customize = $this->create_test_manager( wp_generate_uuid4() ); 1423 1424 $wp_customize->save_changeset_post( array( 1425 'date_gmt' => gmdate( 'Y-m-d H:i:s', strtotime( '+1 day' ) ), 1426 'status' => 'publish', 1427 'title' => 'Foo', 1428 ) ); 1429 1430 $this->assertSame( 'future', get_post_status( $wp_customize->changeset_post_id() ) ); 1431 } 1432 1433 /** 1416 1434 * Ensure that save_changeset_post method bails updating an underlying changeset which is invalid. 1417 1435 *
Note: See TracChangeset
for help on using the changeset viewer.