/** * Retrieve the IDs for images in a gallery. * * @uses get_post_galleries() First, if available. Falls back to shortcode parsing, * then as last option uses a get_posts() call. * * @since Twenty Ten 1.6. * * @return array List of image IDs from the post gallery. */ function twentyten_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; } hello. i am kyle ‹ Log In

hello. i am kyle

ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.

← Back to hello. i am kyle