This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| //* Temporary fix/workaround for Multisite Language Switcher Links that are | |
| //* not working with categories, author or WooCommerce pages. Uncomment as needed. | |
| add_filter( 'msls_options_get_permalink', 'wfd_msls_options_get_permalink', 10, 2 ); | |
| function wfd_msls_options_get_permalink( $url, $language ) { | |
| $url = str_replace( '/product-category/', '/categorie-produit/', $url ); | |
| $url = str_replace( '/products/', '/produits/', $url ); | |
| $url = str_replace( '/blog/author/', '/author/', $url ); | |
| $url = str_replace( '/blog/categorie/', '/categorie/', $url ); | |
| return $url; | |
| } |
This file contains hidden or 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
| /* Redirect Vendors to Vendor Dashboard on Login */ | |
| add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2); | |
| function login_redirect( $redirect_to, $user ) { | |
| // WCV dashboard -- Uncomment the 3 lines below if using WC Vendors Free instead of WC Vendors Pro | |
| // if (class_exists('WCV_Vendors') && WCV_Vendors::is_vendor( $user->id ) ) { | |
| // $redirect_to = get_permalink(WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' )); | |
| // } | |
| // WCV Pro Dashboard |
This file contains hidden or 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
| //* Featured Videos for Single Entries | |
| add_action( 'genesis_entry_header', 'featured_video_plus_single_page_override', 15 ); | |
| function featured_video_plus_single_page_override( $output ){ | |
| $image_args = array( | |
| 'size' => 'medium', | |
| 'attr' => array( | |
| 'class' => 'alignright featured-image', | |
| ), | |
| ); |