Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corypratt/9fa53d2571e19c6c2ae3c51caaf47fa6 to your computer and use it in GitHub Desktop.
Save corypratt/9fa53d2571e19c6c2ae3c51caaf47fa6 to your computer and use it in GitHub Desktop.
if ( $response ) {
$csv = csv_with_headers_to_array( $response['body'] );
if ( array_key_exists('time_period', $csv[0]) ) {
set_transient('_libsyn_transient', 'found', 60 * 60);
set_transient('_libsyn_month', $csv[0]['time_period'], 0);
set_transient('_libsyn_count', $csv[0]['downloads'], 0);
} else {
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment