Allow get_post_format() to assume current post if none passed in. see #14746

git-svn-id: https://develop.svn.wordpress.org/trunk@16202 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2010-11-05 09:40:36 +00:00
parent 7f219637fc
commit 85957ff289
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ function get_post_mime_type($ID = '') {
*
* @return mixed The format if successful. False if no format is set. WP_Error if errors.
*/
function get_post_format( $post ) {
function get_post_format( $post = null ) {
$post = get_post($post);
$format = wp_get_object_terms( $post->ID, 'post_format', array('orderby' => 'none', 'fields' => 'names') );