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 | |
/** | |
* An is_blog() conditional function for Wordpress. | |
* | |
* Determines if the current page is blog(y), including: | |
* | |
* - Posts page | |
* - Archive (category, tag, author) | |
* - Single post |
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 | |
/** | |
* A replacement for the default wp_trim_excerpt(). | |
* | |
* Generates an excerpt from the_content, if needed. | |
* | |
* It is similar (identical) to the default to allow filters other than our own to work, | |
* with the exception that it uses our default my_trim_words() function. | |
* |
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 | |
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'my_variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'my_variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'my_save_variable_fields', 10, 1 ); | |
/** |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer