Ajax Google Libraries CDN: Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.'; /** * PHP 4 Compatible Constructor */ function Class_AjaxGoogleLibrariesCDN() {$this->__construct();} /** * PHP 5 Constructor */ function __construct() { $this->google_scripts = array( // any extra scripts listed here not provided by WordPress // or another plugin will not be registered. This liste // is just used to chancge where things load from. // 'script-handle' => ( 'google-lib-path', 'google-file-name', 'google-combined-into') /* jQuery */ 'jquery' => array( 'jquery', 'jquery.min', '' ), /* jQuery UI */ 'jquery-ui-core' => array( 'jqueryui', 'jquery-ui.min', '' ), 'jquery-ui-accordion' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-autocomplete' => array( '', '', 'jquery-ui-core' ), /* jQueri UI 1.8 */ 'jquery-ui-button' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */ 'jquery-ui-datepicker' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-dialog' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-draggable' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-droppable' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-menu' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-mouse' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */ 'jquery-ui-position' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */ 'jquery-ui-progressbar' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-resizable' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-selectable' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-slider' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-sortable' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-tabs' => array( '', '', 'jquery-ui-core' ), 'jquery-ui-widget' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */ /* jQuery Effects */ 'jquery-effects-core' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-blind' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-bounce' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-clip' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-drop' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-explode' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-fade' => array( '', '', 'jquery-ui-core' ), /* jQuery UI 1.8 */ 'jquery-effects-fold' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-highlight' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-pulsate' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-scale' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-shake' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-slide' => array( '', '', 'jquery-ui-core' ), 'jquery-effects-transfer' => array( '', '', 'jquery-ui-core' ), /* prototype */ 'prototype' => array( 'prototype', 'prototype', '' ), /* scriptaculous */ 'scriptaculous-root' => array( 'scriptaculous', 'scriptaculous', '' ), 'scriptaculous-builder' => array( '', '', 'scriptaculous-root' ), 'scriptaculous-effects' => array( '', '', 'scriptaculous-root' ), 'scriptaculous-dragdrop' => array( '', '', 'scriptaculous-root' ), 'scriptaculous-controls' => array( '', '', 'scriptaculous-root' ), 'scriptaculous-slider' => array( '', '', 'scriptaculous-root' ), 'scriptaculous-sound' => array( '', '', 'scriptaculous-root' ), /* moo tools */ 'mootools' => array( 'mootools', 'mootools-yui-compressed', '' ), /* Dojo */ 'dojo' => array( 'dojo', 'dojo.xd', '' ), /* swfobject */ 'swfobject' => array( 'swfobject', 'swfobject', '' ), /* YUI */ 'yui' => array( 'yui', 'build/yuiloader/yuiloader-min', '' ), /* Ext Core */ 'ext-core' => array( 'ext-core', 'ext-core', '' ) ); $this->noconflict_url = WP_PLUGIN_URL . '/use-google-libraries/js/jQnc.js'; $this->noconflict_next = FALSE; // test for SSL // thanks to suggestions from Peter Wilson (http://peterwilson.cc/) // and Richard Hearne $is_ssl = false; if ( ( function_exists( 'getenv' ) and ( ( getenv( 'HTTPS' ) != '' and getenv( 'HTTPS' ) != 'off' ) or ( getenv( 'SERVER_PORT' ) == '433' ) ) ) or ( isset( $_SERVER ) and ( ( isset( $_SERVER['HTTPS'] ) and $_SERVER['HTTPS'] !='' and $_SERVER['HTTPS'] != 'off' ) or ( isset( $_SERVER['SERVER_PORT'] ) and $_SERVER['SERVER_PORT'] == '443' ) ) ) ) { $is_ssl = true; } $this->is_ssl = $is_ssl; } static function configure_plugin() { add_action( 'wp_default_scripts', array( 'Class_AjaxGoogleLibrariesCDN', 'replace_default_scripts_action' ), 1000 ); add_filter( 'script_loader_src', array( "Class_AjaxGoogleLibrariesCDN", "remove_ver_query_filter" ), 1000 ); add_filter( 'init', array( "Class_AjaxGoogleLibrariesCDN", "setup_filter" ) ); // There's a chance some plugin has called wp_enqueue_script outside // of any hooks, which means that this plugin's 'wp_default_scripts' // hook will never get a chance to fire. This tries to work around // that. global $wp_scripts; if ( is_a( $wp_scripts, 'WP_Scripts' ) ) { if ( WP_DEBUG !== false ) { error_log( self::$script_before_init_notice ); } $ugl = self::get_instance(); $ugl->replace_default_scripts( $wp_scripts ); } } static function script_before_init_admin_notice() { echo '
' . self::$script_before_init_notice . '