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:
parent
f1a30e2dd5
commit
92159ea0c2
|
@ -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') );
|
||||
|
|
Loading…
Reference in New Issue