Changes between Initial Version and Version 1 of Ticket #51427
- Timestamp:
- 10/15/2020 01:12:39 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51427
- Property Keywords dev-feedback removed
-
Property
Status
changed from
newtoclosed -
Property
Resolution
changed from
toduplicate -
Property
Milestone
changed from
Awaiting Reviewto
-
Ticket #51427 – Description
initial v1 3 3 Solution is to use code as below in wp-includes/post.php: 4 4 (function name: wp_publish_post) 5 5 {{{ 6 6 $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, 'publish', $post->post_type, $post->post_parent); 7 7 8 8 $wpdb->update( $wpdb->posts, array( 'post_status' => 'publish', 'post_name' => $post->post_name), array( 'ID' => $post->ID ) ); 9 }}}