View functions.php
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
<?php | |
//* Enable the block-based widget editor | |
add_filter( 'use_widgets_block_editor', '__return_true' ); |
View shortcode.php
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
<?php | |
/** | |
* Displays the latest release number from a provided GitHub repository. | |
* | |
* Example usage: [show_repo_version_number repo="alexmustin/woo-custom-emails-per-product"] | |
* | |
* @param array $atts An array of shortcode attributes. | |
* @return string $output A string of text including the release number. | |
*/ | |
function show_repo_version_number_function( $atts ) { |
View _grid.scss
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
.products-wrap { | |
display: grid; | |
justify-content: space-between; | |
grid-template-columns: repeat(auto-fill, 100%); | |
@include media( $screen--m ) { | |
grid-template-columns: repeat(auto-fill, 48%); | |
grid-gap: 2%; | |
} |
View style.css
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
/* | |
* This will keep the element's font size between 24px and 42px. | |
* The middle value automatically calculates the font size between | |
* the Min and Max, using the browser window viewport width. | |
*/ | |
.archive-title { | |
font-size: clamp(24px, calc(3vw + 1rem), 42px); | |
} |
View functions.php
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
<?php | |
add_filter( 'woocommerce_email_recipient_customer_completed_order', 'themename_disable_customer_order_email_for_product', 10, 2 ); | |
function themename_disable_customer_order_email_for_product( $recipient, $order ) { | |
// Get the current page. | |
$page = $_GET['page'] = isset( $_GET['page'] ) ? $_GET['page'] : ''; | |
// If we're on a WooCommerce settings page, return the regular recipient. | |
if ( 'wc-settings' === $page ) { | |
return $recipient; | |
} |
View functions.php
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
<?php | |
// Add page slug to Body class. | |
function add_slug_body_class( $classes ) { | |
global $post; | |
if ( isset( $post ) ) { | |
$classes[] = $post->post_type . '-' . $post->post_name; | |
} | |
return $classes; | |
} |
View load-scripts.php
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
<?php | |
/** | |
* Loads scripts and stylesheets for the Course Maker Pro theme. | |
* | |
* @since 1.0 | |
* | |
* @package Course Maker Pro | |
*/ | |
add_action( 'wp_enqueue_scripts', 'course_maker_enqueue_scripts_styles' ); |
View appearance.php
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
<?php | |
/** | |
* Course Maker Pro appearance settings | |
* | |
* @package Course Maker Pro | |
* @author brandiD | |
* @license GPL-2.0-or-later | |
*/ | |
$course_maker_default_colors = array( |
NewerOlder