generate( $requested ); $period = $report['period']['period']; // Twelve complete months back, newest first. $choices = array(); for ( $i = 1; $i <= 12; $i++ ) { $stamp = (int) gmmktime( 0, 0, 0, (int) gmdate( 'n' ) - $i, 1, (int) gmdate( 'Y' ) ); $choices[] = array( 'value' => gmdate( 'Y-m', $stamp ), 'label' => gmdate( 'F Y', $stamp ), ); } $csv_url = wp_nonce_url( add_query_arg( array( 'action' => 'abds_seo_export_monthly_csv', 'period' => $period, ), admin_url( 'admin-post.php' ) ), 'abds_seo_export_monthly_csv' ); ?>