Ticket #48014: 48014.2.diff
| File 48014.2.diff, 1.3 KB (added by , 7 years ago) |
|---|
-
src/wp-includes/post.php
6800 6800 } 6801 6801 6802 6802 if ( get_option( 'default_pingback_flag' ) ) { 6803 add_post_meta( $post_id, '_pingme', '1' );6803 add_post_meta( $post_id, '_pingme', '1', true ); 6804 6804 } 6805 add_post_meta( $post_id, '_encloseme', '1' );6805 add_post_meta( $post_id, '_encloseme', '1', true ); 6806 6806 6807 6807 $to_ping = get_to_ping( $post_id ); 6808 6808 if ( ! empty( $to_ping ) ) { -
tests/phpunit/tests/post.php
1430 1430 $post = get_post( $post_id ); 1431 1431 self::assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( $post->post_date_gmt ), 'The dates should be equal', 2 ); 1432 1432 } 1433 1434 /** 1435 * @ticket 48014 1436 */ 1437 public function test_publish_post_hook() { 1438 $post_id = self::factory()->post->create(); 1439 1440 $enclosed = get_post_meta( $post_id, '_encloseme' ); 1441 1442 $post = get_post( $post_id ); 1443 $post1 = wp_update_post( $post ); 1444 1445 $enclosed1 = get_post_meta( $post_id, '_encloseme' ); 1446 1447 $this->assertEquals( '1', count( $enclosed ) ); 1448 $this->assertEquals( '1', count( $enclosed1 ) ); 1449 1450 } 1433 1451 }