Changeset 33630
- Timestamp:
- 08/18/2015 02:50:23 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r33555 r33630 3456 3456 $data['post_name'] = wp_unique_post_slug( sanitize_title( $data['post_title'], $post_ID ), $post_ID, $data['post_status'], $post_type, $post_parent ); 3457 3457 $wpdb->update( $wpdb->posts, array( 'post_name' => $data['post_name'] ), $where ); 3458 clean_post_cache( $post_ID ); 3458 3459 } 3459 3460 -
trunk/tests/phpunit/tests/post.php
r33261 r33630 436 436 437 437 /** 438 * @ticket 5305 439 * @ticket 33392 440 */ 441 public function test_wp_insert_post_should_invalidate_post_cache_before_generating_guid_when_post_name_is_empty_and_is_generated_from_the_post_ID(){ 442 register_post_type( 'wptests_pt' ); 443 444 $p = wp_insert_post( array( 445 'post_title' => '', 446 'post_type' => 'wptests_pt', 447 'post_status' => 'publish', 448 ) ); 449 450 $post = get_post( $p ); 451 452 $this->assertContains( 'wptests_pt=' . $p, $post->guid ); 453 } 454 455 /** 438 456 * @ticket 5364 439 457 */
Note: See TracChangeset
for help on using the changeset viewer.