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
| <?php | |
| /** | |
| * Enable excerpts for LearnDash Lessons | |
| */ | |
| function add_excerpts_to_ld_lessons() { | |
| add_post_type_support( 'sfwd-lessons', 'excerpt' ); | |
| } | |
| add_action( 'init', 'add_excerpts_to_ld_lessons' ); |
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
| <?php | |
| /* | |
| * Disable Discourse account activation email for sites with WP Discourse SSO | |
| */ | |
| add_filter( 'discourse_email_verification', 'wpdc_sso_disable_email_verification' ); | |
| function wpdc_sso_disable_email_verification() { | |
| return false; | |
| } |
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
| <?php | |
| /** | |
| * Add user to `Members` group if active WooCommerce Memberships plan is found. | |
| * | |
| * @params array $params wpdc sso data | |
| * @return array $params wpdc sso data including `Members` group status | |
| */ | |
| function wpdc_wc_memberships_add_to_dc_group( $params ) { | |
| // Bail if Memberships isn't active |
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
| <!-- | |
| To add this JavaScript code to your site theme: | |
| 1. Go to Admin > Customize > Themes | |
| 2. Select the theme you wish to customize | |
| 5. Click `Edit CSS/HTML` | |
| 4. Go to `</head>` tab | |
| 5. Copy & paste code from below | |
| 6. Click to Preview/Save | |
| </head> | |
| --> |
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
| //* Make Font Awesome available | |
| add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
| function enqueue_font_awesome() { | |
| wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' ); | |
| } | |
| /** | |
| * Place a cart icon with number of items and total cost in the menu bar. |
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
| <?php | |
| /* Add List of WooCommcerce Product Tags to Genesis Sidebar */ | |
| function wc_product_tag_list() { | |
| $terms = get_terms(array('taxonomy' => 'product_tag', 'hide_empty' => false)); | |
| ?> | |
| <section id="woocommerce_product_tag_list" class="widget woocommerce widget_product_tag_list"> | |
| <div class="widget-wrap"> | |
| <h3 class="widgettitle widget-title">Product tags</h3> | |
| <ul class="product-tags"> |
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
| <?php | |
| /* Add LearnDash Enrolled Courses Grid to My Account Tab in WooCommerce */ | |
| /* Add Courses Link to My Account menu */ | |
| add_filter ( 'woocommerce_account_menu_items', 'wc_ld_link', 40 ); | |
| function wc_ld_link( $menu_links ){ | |
| $menu_links = array_slice( $menu_links, 0, 5, true ) | |
| + array( 'courses' => 'My Courses' ) | |
| + array_slice( $menu_links, 5, NULL, true ); |
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
| <?php | |
| /* Disable WooCommerce Product Image Zoom */ | |
| add_action( 'after_setup_theme', function() { | |
| remove_theme_support( 'wc-product-gallery-zoom' ); | |
| }, 20 ); |
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
| # BEGIN Block Referrer Spam | |
| SetEnvIfNoCase Referer exampledomain.com spammer=yes | |
| Order allow,deny | |
| Allow from all | |
| Deny from env=spammer | |
| #END Block Referrer Spam |