Created
January 29, 2014 14:23
-
-
Save Pushplaybang/d4a57a5f87695c403160 to your computer and use it in GitHub Desktop.
#WordPress #WooCommerce - remove shitty pretty photo lightbox
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
//Remove prettyPhoto lightbox | |
add_action( 'wp_enqueue_scripts', 'fc_remove_woo_lightbox', 99 ); | |
function fc_remove_woo_lightbox() { | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); | |
wp_dequeue_style( 'woocommerce_prettyPhoto_css' ); | |
wp_dequeue_script( 'prettyPhoto' ); | |
wp_dequeue_script( 'prettyPhoto-init' ); | |
} | |
//Add fancyBox lightbox - if thats what you want. | |
add_action( 'wp_enqueue_scripts', 'fc_add_fancybox' ); | |
function fc_add_fancybox() { | |
wp_enqueue_script( 'fancybox', get_stylesheet_directory_uri() . '/js/fancybox/jquery.fancybox.pack.js', false ); | |
wp_enqueue_style( 'fancybox-style', get_stylesheet_directory_uri() . '/js/fancybox/jquery.fancybox.css' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment