Created
September 10, 2013 17:49
-
-
Save wpsmith/6513002 to your computer and use it in GitHub Desktop.
PHP: Fix CalendarizeIt's enqueuing scripts everywhere
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 | |
add_action( 'wp_enqueue_scripts', 'gs_calendarizeit_remove_scripts', 999 ); | |
function gs_calendarizeit_remove_scripts() { | |
if ( gs_is_field_trip() || 'events' === get_post_type( get_the_ID() ) ) return; | |
$scripts = array( | |
'calendarize', | |
'jquery-easing', | |
'rrecur-parser', | |
'fullcalendar', | |
'fechahora', | |
'fc_dateformat_helper', | |
'calendarize-fcviews', | |
'calendarize', | |
'rhc-upcoming-widget', | |
'google-api3', | |
'rhc_gmap3', | |
'rhc-visibility-check', | |
); | |
foreach( $scripts as $s ) | |
wp_dequeue_script( $s ); | |
$styles = array( | |
'rhc-print-css', | |
'fullcalendar-theme', | |
'calendarize', | |
); | |
foreach( $styles as $s ) | |
wp_dequeue_style( $s ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@wpsmith -- Is this still required with the current version of Calendarize.it?