Ticket #15629: 15629.diff
File 15629.diff, 985 bytes (added by , 13 years ago) |
---|
-
wp-includes/post.php
535 535 $format = 'post-format-' . $format; 536 536 } 537 537 538 return wp_set_post_terms($post->ID, $format, 'post_format'); 538 if ( current_theme_supports( 'post-formats', $format ) ) 539 return wp_set_post_terms($post->ID, $format, 'post_format'); 539 540 } 540 541 541 542 /** -
wp-includes/theme.php
1773 1773 else 1774 1774 return false; 1775 1775 break; 1776 case 'post-formats': 1777 // post-formats can be registered by passing an array of post formats to add_theme_supprt(). 1778 $post_type = $args[0]; 1779 if ( in_array($post_type, $_wp_theme_features[$feature][0]) ) 1780 return true; 1781 else 1782 return false; 1783 break; 1776 1784 } 1777 1785 1778 1786 return true;