__( 'days', 'sportspress' ), 'hrs' => __( 'hrs', 'sportspress' ), 'mins' => __( 'mins', 'sportspress' ), 'secs' => __( 'secs', 'sportspress' ) ) ); } /** * SP requires jQuery 1.8 since it uses functions like .on() for events and .parseHTML. * If, by the time wp_print_scrips is called, jQuery is outdated (i.e not * using the version in core) we need to deregister it and register the * core version of the file. * * @access public * @return void */ public function check_jquery() { global $wp_scripts; // Enforce minimum version of jQuery if ( ! empty( $wp_scripts->registered['jquery']->ver ) && ! empty( $wp_scripts->registered['jquery']->src ) && 0 >= version_compare( $wp_scripts->registered['jquery']->ver, '1.8' ) ) { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', '/wp-includes/js/jquery/jquery.js', array(), '1.8' ); wp_enqueue_script( 'jquery' ); } } public function custom_css() { $enabled = get_option( 'sportspress_enable_frontend_css', 'yes' ); if ( $enabled == 'yes' ) { $colors = get_option( 'sportspress_frontend_css_colors' ); if ( sizeof( $colors ) > 0 ) { echo ''; } } } } new SP_Frontend_Scripts();