Skip to content

Instantly share code, notes, and snippets.

View thomas-mcgee's full-sized avatar

Thomas McGee thomas-mcgee

View GitHub Profile
@thomas-mcgee
thomas-mcgee / convertkit-cache-tags
Created April 20, 2021 00:08
Cache ConvertKit Tag List
function build_convertkit_tag_list( $force_refresh = 0 ) {
$convertkit_api_key = ( isset( $_POST['nt_convertkit_api'] ) ? $_POST['nt_convertkit_api'] : null );
if ( !empty( $convertkit_api_key ) || $force_refresh ) :
$api_key = get_option( 'nt_convertkit_api' );
if ( !empty( $api_key ) ) {