Ticket #55176: 55176.4.diff
File 55176.4.diff, 576 bytes (added by , 3 years ago) |
---|
-
src/wp-includes/post.php
2908 2908 */ 2909 2909 function stick_post( $post_id ) { 2910 2910 $post_id = (int) $post_id; 2911 $stickies = get_option( 'sticky_posts' );2911 $stickies = get_option( 'sticky_posts', array() ); 2912 2912 $updated = false; 2913 2913 2914 if ( ! is_array( $stickies ) ) { 2915 $stickies = array( $post_id ); 2916 } else { 2914 if ( $stickies ) { 2917 2915 $stickies = array_unique( array_map( 'intval', $stickies ) ); 2918 2916 } 2919 2917