'[aesop_gallery id="'.$post_ID.'"', 'post_type' => array ( 'page', 'post' ) ) ); $count = 0; if ( $pages ) : foreach ( $pages as $page ) { $count ++; if ( has_shortcode( $page->post_content , 'aesop_gallery' ) ) { echo ''.$page->post_title.''; if ( $count != count( $pages ) ) { echo ', '; } } } endif; }//end if } /** * Load the assets that we need for the gallery meta * * @since 1.4 */ public function gallery_box_assets() { if ( 'ai_galleries' == get_current_screen()->id ) { wp_enqueue_script( 'jquery-ui-sortable' ); } } /** * New metabox to better manage images within galleries * * @since 1.4 */ public function new_gallery_box() { // images add_meta_box( 'ase_gallery_component', __( 'Add Images', 'aesop-core' ), array( $this, 'render_gallery_box' ), 'ai_galleries', 'normal', 'core' ); // layout add_meta_box( 'ase_gallery_layout', __( 'Select Layout', 'aesop-core' ), array( $this, 'render_layout_box' ), 'ai_galleries', 'normal', 'core' ); // global options add_meta_box( 'ase_gallery_options', __( 'Set Options', 'aesop-core' ), array( $this, 'render_options_box' ), 'ai_galleries', 'normal', 'core' ); } /** * Render meta box used for the gallery * * @param WP_Post $post The post object. * @since 1.4 * */ public function render_gallery_box( $post ) { echo ''; // get the existing images for this post prior to 1.4, else get the IDs set into post meta for 1.4 if ( AI_CORE_VERSION < 1.4 ) { $get_image_ids = get_post_gallery( $post->ID, false ); $image_ids = explode( ',', $get_image_ids['ids'] ); } else { $get_image_ids = get_post_meta( $post->ID, '_ase_gallery_images', true ); $image_ids = explode( ',', $get_image_ids ); } echo 'Add Images'; echo '