Changeset 58174
- Timestamp:
- 05/20/2024 09:47:41 AM (7 weeks ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r58129 r58174 1464 1464 1465 1465 // Hack: get_permalink() would return plain permalink for drafts, so we will fake that our post is published. 1466 if ( in_array( $post->post_status, array( ' draft', 'pending', 'future' ), true ) ) {1466 if ( in_array( $post->post_status, array( 'draft', 'pending', 'future' ), true ) ) { 1467 1467 $post->post_status = 'publish'; 1468 1468 $post->post_name = sanitize_title( $post->post_name ? $post->post_name : $post->post_title, $post->ID ); -
trunk/src/wp-includes/post.php
r58055 r58174 1220 1220 */ 1221 1221 function get_post_status( $post = null ) { 1222 $post = get_post( $post ); 1222 if ( $post instanceof WP_Post && isset( $post->filter ) && 'sample' === $post->filter ) { 1223 // Skip normalization 1224 } else { 1225 $post = get_post( $post ); 1226 } 1223 1227 1224 1228 if ( ! is_object( $post ) ) { -
trunk/tests/phpunit/tests/admin/includesPost.php
r57580 r58174 931 931 get_sample_permalink( $post ); 932 932 $this->assertEquals( $post_original, $post, 'get_sample_permalink() modifies the post object.' ); 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 933 955 } 934 956
Note: See TracChangeset
for help on using the changeset viewer.