Changeset 16662 for trunk/wp-includes/post.php
- Timestamp:
- 12/01/2010 08:03:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r16652 r16662 527 527 return new WP_Error('invalid_post', __('Invalid post')); 528 528 529 if ( !empty($format) ) 530 $format = 'post-format-' . sanitize_key($format); 529 if ( !empty($format) ) { 530 $format = sanitize_key($format); 531 $empty_formats = array( 'post', 'default' ); 532 if ( in_array( $format, $empty_formats ) ) 533 $format = ''; 534 else 535 $format = 'post-format-' . $format; 536 } 531 537 532 538 return wp_set_post_terms($post->ID, $format, 'post_format');
Note: See TracChangeset
for help on using the changeset viewer.