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 | |
/** | |
* Remove WooCommerce scripts and styles. | |
* | |
* Cart fragments are used for things like ajax cart menu icons, | |
* but it's really slow, so let's only keep them where necessary. | |
* | |
* @version 1.3.0 | |
* @author Mike Hemberger @JiveDig |
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 | |
/** | |
* Adds facet label as a heading before any facets with available options. | |
* | |
* @author Mike Hemberger @JiveDig. | |
* | |
* @param string $output The facet HTML. | |
* @param array $params The shortcode/function parameters. | |
* |
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 | |
/** | |
* Remove taxonomies that you probably won't need, and take forever to load all the terms in ACF taxonomy field. | |
* | |
* @version 1.0.0 | |
* @author @JiveDig | |
* @uses Advanced Custom Fields | |
* | |
* @param array $taxonomies The existing taxonomies. |
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 | |
/** | |
* Create a direct to cart/checkout/page add to cart button. | |
* | |
* Example: [buy_now id="1234" redirect="checkout"] | |
* | |
* @version 1.0.0 | |
* @author @JiveDig | |
* @link https://gist.github.com/JiveDig/6adde04666c189b6089fcfeca4988c47 |
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 | |
/** | |
* Autocomplete orders that contain only virtual products. | |
* If the order contains a non-virtual product the order will not be completed by this function. | |
* | |
* @author Mike Hemberger @JiveDig | |
* | |
* @version 1.0.0 | |
* |
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 | |
$dir = get_stylesheet_directory_uri(); | |
// Different scripts: Both are loaded. | |
wp_enqueue_script( 'test-one', $dir . '/assets/js/test-one.js', array(), '1.0.0', true ); | |
wp_enqueue_script( 'test-two', $dir . '/assets/js/test-two.js', array(), '1.0.0', true ); | |
// Identical scripts: 1 is loaded. | |
wp_enqueue_script( 'test-one', $dir . '/assets/js/test.js', array(), '1.0.0', true ); |
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 | |
/** | |
* Gets the primary term of a post, by taxonomy. | |
* If Yoast Primary Term is used, return it, | |
* otherwise fallback to the first term. | |
* | |
* @version 1.3.0 | |
* | |
* @link https://gist.github.com/JiveDig/5d1518f370b1605ae9c753f564b20b7f |
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
{"home_url":"https:\/\/maitheme.com\/mai-lifestyle-pro","layout":"full-width-content","banner_id":false,"hide_banner":"0","hide_breadcrumbs":"0","hide_featured":"1","excerpt":"Mai Lifestyle Pro is among StudioPress' top-3 best selling themes for the last five months in a row, Mai Theme is currently powering some of the most high-traffic websites on the Internet.","images":{"618":"https:\/\/maitheme.com\/mai-lifestyle-pro\/wp-content\/uploads\/2017\/05\/brooke-cagle-199262.jpg","1573":"https:\/\/maitheme.com\/mai-lifestyle-pro\/wp-content\/uploads\/2018\/01\/brooke-cagle-157923.jpg"},"sections":[{"bg":"#f0f0f0","image_id":"","image":false,"overlay":"","inner":"","height":"xs","content_width":"sm","align_content":"","align":"center","text_size":"xl","id":"","class":"","context":"","title":"","content":"<em>\u201cThe Perfect Theme for Wellness, Food\/Recipe, Fitness, Lifestyle, or Small Business Websites and Blogs.\u201d<\/em>"},{"bg":"#ffffff","image_id":"","image":false,"overlay":"","inner":"","height":"lg","c |
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
{"home_url":"https:\/\/maitheme.com\/mlpexport","layout":"full-width-content","banner_id":false,"hide_banner":"0","hide_breadcrumbs":"0","hide_featured":"1","excerpt":"","images":{"618":"https:\/\/maitheme.com\/mlpexport\/wp-content\/uploads\/2017\/05\/brooke-cagle-199262.jpg","1573":"https:\/\/maitheme.com\/mlpexport\/wp-content\/uploads\/2018\/01\/brooke-cagle-157923.jpg"},"sections":[{"bg":"#f0f0f0","image_id":"","image":false,"overlay":"","inner":"","height":"xs","content_width":"sm","align_content":"","align":"center","text_size":"xl","id":"","class":"","context":"","title":"","content":"<em>\u201cThe Perfect Theme for Wellness, Food\/Recipe, Fitness, Lifestyle, or Small Business Websites and Blogs.\u201d<\/em>"},{"bg":"#ffffff","image_id":"","image":false,"overlay":"","inner":"","height":"lg","content_width":"","align_content":"","align":"center","text_size":"","id":"latest-posts","class":"","context":"","title":"Latest Posts","content":"Read our latest tips, tricks, and musings below.\r\n\r\n[grid cont |