This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable the Recent Comments Widget from the WordPress Admin dashboard. | |
*/ | |
function remove_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); | |
} | |
add_action( 'wp_dashboard_setup', 'remove_dashboard_widgets' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This goes in your functions file and will create a shortcode that returns a CTA created with Advanced Custom Fields | |
* | |
*/ | |
function lm_global_cta($atts, $content) { | |
$params = shortcode_atts( array( | |
'id' => '' | |
), $atts ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* This code should go in your functions.php | |
* | |
*/ | |
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This function can be used to pull total episode stats from Simplecast | |
* | |
*/ | |
function cp_get_episode_stats( $podcast_id ) { | |
if ( ! $podcast_id) { | |
return "-"; | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = 'https://login.libsyn.com'; | |
$args = array( | |
'headers' => array( | |
array( 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8' ), | |
), | |
'body' => array( | |
'req' => 'https://four.libsyn.com/stats/ajax-export/show_id/' . $showID . '/type/downloads/target/show/id/' . $showID . '/', | |
'email' => $email, | |
'password' => $password | |
), |