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
#! /usr/bin/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" |
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
// Remove the default comments from Astra. | |
add_action( | |
'init', | |
function() { | |
if ( class_exists( 'Astra_Loop' ) ) { | |
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_comments' ), 15 ); | |
} | |
}, | |
11 | |
); |
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
/** | |
* BLOCK: wpmastery-code-block | |
* | |
* Registering a basic block with Gutenberg. | |
* Simple block, renders and saves the same content without any interactivity. | |
*/ | |
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; |
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 | |
/** | |
* Email Order Items | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 | |
function jk_add_custom_sku() { | |
$args = array( | |
'label' => __( 'Custom SKU', 'woocommerce' ), | |
'placeholder' => __( 'Enter custom SKU here', 'woocommerce' ), | |
'id' => 'jk_sku', | |
'desc_tip' => true, | |
'description' => __( 'This SKU is for internal use only.', 'woocommerce' ), | |
); |
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 | |
function prefix_add_checkbox() { | |
$args = array( | |
'label' => '', // Text in the editor label | |
'class' => '', | |
'style' => '', | |
'wrapper_class' => '', // custom CSS class for styling | |
'value' => '', // meta_value where the id serves as meta_key | |
'id' => '', // required, it's the meta_key for storing the value (is checked or not) | |
'name' => '', |
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 | |
function prefix_add_selectbox() { | |
$args = array( | |
'id' => 'my_new_select', // required. The meta_key ID for the stored value | |
'wrapper_class' => '', // a custom wrapper class if needed | |
'desc_tip' => true, // makes your description show up with a "?" symbol and as a tooltip | |
'description' => __('My awesome select box', 'your_text_domain'), | |
'label' => __( 'My New Select', 'your_text_domain' ), | |
'options' => array( | |
'value1' => __( 'Text 1', 'your_text_domain' ), |