Ticket #18691: making-use-of-18691.diff
File making-use-of-18691.diff, 1.9 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/post.php
191 191 } 192 192 193 193 // Post Formats 194 if ( current_theme_supports( 'post-formats' ) && isset( $post_data['post_format'] ) ) { 195 $formats = get_theme_support( 'post-formats' ); 196 if ( is_array( $formats ) ) { 197 $formats = $formats[0]; 198 if ( in_array( $post_data['post_format'], $formats ) ) { 199 set_post_format( $post_ID, $post_data['post_format'] ); 200 } elseif ( '0' == $post_data['post_format'] ) { 201 set_post_format( $post_ID, false ); 202 } 203 } 194 if ( isset( $post_data['post_format'] ) ) { 195 if ( current_theme_supports( 'post-formats', $post_data['post_format'] ) ) 196 set_post_format( $post_ID, $post_data['post_format'] ); 197 elseif ( '0' == $post_data['post_format'] ) 198 set_post_format( $post_ID, false ); 204 199 } 205 200 206 201 // Meta Stuff -
wp-admin/press-this.php
63 63 wp_die($upload); 64 64 } else { 65 65 // Post formats 66 if ( current_theme_supports( 'post-formats' ) && isset( $_POST['post_format'] ) ) { 67 $post_formats = get_theme_support( 'post-formats' ); 68 if ( is_array( $post_formats ) ) { 69 $post_formats = $post_formats[0]; 70 if ( in_array( $_POST['post_format'], $post_formats ) ) 71 set_post_format( $post_ID, $_POST['post_format'] ); 72 elseif ( '0' == $_POST['post_format'] ) 73 set_post_format( $post_ID, false ); 74 } 66 if ( isset( $_POST['post_format'] ) ) { 67 if ( current_theme_supports( 'post-formats', $_POST['post_format'] ) ) 68 set_post_format( $post_ID, $_POST['post_format'] ); 69 elseif ( '0' == $post_data['post_format'] ) 70 set_post_format( $post_ID, false ); 75 71 } 76 72 77 73 wp_update_post($post);