'', 'sort' => 'asc', 'grouped' => 0, 'month' => null, 'year' => null, 'widget' => 0, 'paging_interval' => null, 'max_events' => null, 'start_offset' => null, 'paging_type' => null, 'paging' => null ); $args = array_merge( $defaults, $args ); extract( $args ); $ids = explode( '-', str_replace( ' ', '', $feed_ids ) ); //Create new display object, passing array of feed id(s) $d = new GCE_Display( $ids, $title_text, $sort ); $markup = ''; $start = current_time( 'timestamp' ); if( $widget ) { foreach( $ids as $f ) { $paging = get_post_meta( $f, 'gce_paging_widget', true ); $old_paging[] = get_post_meta( $f, 'gce_paging', true ); if( $paging ) { update_post_meta( $f, 'gce_paging', true ); } $paging_interval = get_post_meta( $f, 'gce_widget_paging_interval', true ); } } // If paging is not set then we need to set it now foreach( $ids as $id ) { if( $paging === null ) { $paging = get_post_meta( $id, 'gce_paging', true ); } } if( 'grid' == $display ) { global $localize; $target = ( $widget == 1 ? 'gce-widget-' : 'gce-page-grid-' ) . $feed_ids; $localize[$target] = array( 'target_element' => $target, 'feed_ids' => $feed_ids, 'title_text' => $title_text, 'type' => ( $widget == 1 ? 'widget' : 'page' ) ); wp_localize_script( GCE_PLUGIN_SLUG . '-public', 'gce_grid', $localize ); if( $widget == 1 ) { $markup .= '