get_param( 'ticker' ); $limit = intval( $request->get_param( 'limit' ) ); $last_poll = intval( $request->get_param( 'last' ) ); if ( ! empty( $ticker_slug ) ) { $args['tax_query'][] = array( 'taxonomy' => 'scliveticker_ticker', 'field' => 'slug', 'terms' => $ticker_slug, ); } if ( ! empty( $limit ) ) { $args['posts_per_page'] = $limit; } if ( $last_poll > 0 ) { $last_poll = explode( ',', gmdate( 'Y,m,d,H,i,s', $last_poll ) ); $args['date_query'] = array( 'column' => 'post_date_gmt', 'after' => array( 'year' => intval( $last_poll[0] ), 'month' => intval( $last_poll[1] ), 'day' => intval( $last_poll[2] ), 'hour' => intval( $last_poll[3] ), 'minute' => intval( $last_poll[4] ), 'second' => intval( $last_poll[5] ), ), ); } return $args; } }