Twenty Eleven: call get_post_galleries() correctly now that it has new arguments, and use a more accurate function_exists call. Props kovshenin, closes #22907.

git-svn-id: https://develop.svn.wordpress.org/trunk@24194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2013-05-07 21:56:29 +00:00
parent 6355021c7d
commit e9dc8d8f33

View File

@ -640,8 +640,8 @@ add_filter( 'body_class', 'twentyeleven_body_classes' );
function twentyeleven_get_gallery_images() {
$images = array();
if ( function_exists( 'get_post_gallery_images' ) ) {
$galleries = get_post_galleries();
if ( function_exists( 'get_post_galleries' ) ) {
$galleries = get_post_galleries( get_the_ID(), false );
if ( isset( $galleries[0]['ids'] ) )
$images = explode( ',', $galleries[0]['ids'] );
} else {