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:
parent
7f219637fc
commit
85957ff289
@ -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
Block a user