wordpress/wp-content/themes/basic/themify/themify-utils.php
/**
     * Get images from gallery shortcode
     * @return object
     */
Get images from gallery shortcode
@return object
Get images from gallery shortcode @return object
function themify_get_gallery_shortcode($shortcode) {
	if($shortcode){
	    preg_match('/\[gallery.*ids=.(.*).\]/', $shortcode, $ids);
	    if (isset($ids[1])) {
		$ids = trim($ids[1], '\\');
		$ids = trim($ids, '"');
		$image_ids = explode(',', $ids);
		return get_posts(array(
		    'post__in' => $image_ids,
		    'post_type' => 'attachment',
		    'post_mime_type' => 'image',
		    'numberposts' => -1,
		    'no_found_rows' => true,
		    'cache_results' => false,
		    'update_post_term_cache' => false,
		    'update_post_meta_cache' => false,
		    'orderby' => themify_get_gallery_shortcode_params($shortcode, 'orderby','post__in'),
		    'order' => themify_get_gallery_shortcode_params($shortcode, 'order','ASC')
		));
	    }
	}
	return array();
    }
function themify_get_gallery_shortcode ( $ shortcode ) { if ( $ shortcode ) { preg_match ( '/\[gallery.*ids=.(.*).\]/' , $ shortcode , $ ids ) ; if ( isset ( $ ids [ 1 ] ) ) { $ ids = trim ( $ ids [ 1 ] , '\\' ) ; $ ids = trim ( $ ids , '"' ) ; $ image_ids = explode ( ',' , $ ids ) ; return get_posts ( array ( 'post__in' => $ image_ids , 'post_type' => 'attachment' , 'post_mime_type' => 'image' , 'numberposts' => - 1 , 'no_found_rows' => true , 'cache_results' => false , 'update_post_term_cache' => false , 'update_post_meta_cache' => false , 'orderby' => themify_get_gallery_shortcode_params ( $ shortcode , 'orderby' , 'post__in' ) , 'order' => themify_get_gallery_shortcode_params ( $ shortcode , 'order' , 'ASC' ) ) ) ; } } return array ( ) ; }
Get images from gallery shortcode
 @return object
Get images from gallery shortcode @return object
// Check if post has more than one image in gallery