wp-content/themes/twentyeleven/functions.php:888Retrieve the IDs for images in a gallery.
arrayfunction twentyeleven_get_gallery_images() { $images = array(); 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 { $pattern = get_shortcode_regex(); preg_match( "/$pattern/s", get_the_content(), $match ); $atts = shortcode_parse_atts( $match[3] ); if ( isset( $atts['ids'] ) ) { $images = explode( ',', $atts['ids'] ); } } if ( ! $images ) { $images = get_posts( array( 'fields' => 'ids', 'numberposts' => 999, 'order' => 'ASC', 'orderby' => 'menu_order', 'post_mime_type' => 'image', 'post_parent' => get_the_ID(), 'post_type' => 'attachment', ) ); } return $images;}Introduced in Twenty Eleven 1.6. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentyeleven/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.