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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-11-05 09:40:36 +00:00
parent f1a30e2dd5
commit 92159ea0c2
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') );