View on-demand-block-assets.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_action( 'enqueue_block_editor_assets', 'mai_enqueue_block_editor_assets' ); | |
/** | |
* Enqueues block assets for the editor, | |
* since front-end assets are loaded on-demand. | |
* | |
* @since TBD | |
* | |
* @return void |
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 | |
/** | |
* Dump the data. | |
*/ | |
add_action( 'wp_footer', function() { | |
// Get the data. | |
$parsed = jivedig_get_parsed_blocks_for_template(); | |
// Dump however you'd like. |
View mai-exclusive-freelance-homepage.html
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
<!-- wp:acf/mai-columns {"name":"acf/mai-columns","data":{"columns":"custom","_columns":"mai_columns_columns","arrangement_0_columns":"1/2","_arrangement_0_columns":"mai_columns_arrangement_columns","arrangement":1,"_arrangement":"mai_columns_arrangement","arrangement_md_0_columns":"full","_arrangement_md_0_columns":"mai_columns_md_arrangement_columns","arrangement_md":1,"_arrangement_md":"mai_columns_md_arrangement","arrangement_sm_0_columns":"full","_arrangement_sm_0_columns":"mai_columns_sm_arrangement_columns","arrangement_sm":1,"_arrangement_sm":"mai_columns_sm_arrangement","arrangement_xs_0_columns":"full","_arrangement_xs_0_columns":"mai_columns_xs_arrangement_columns","arrangement_xs":1,"_arrangement_xs":"mai_columns_xs_arrangement","align_columns":"start","_align_columns":"mai_columns_align_columns","align_columns_vertical":"","_align_columns_vertical":"mai_columns_align_columns_vertical","column_gap":"","_column_gap":"mai_columns_column_gap","row_gap":"","_row_gap":"mai_columns_row_gap","margin_top" |
View woocommerce-remove-scripts-styles.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 | |
/** | |
* 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 |
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 | |
/** | |
* 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. | |
* |
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 | |
/** | |
* 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. |
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 | |
/** | |
* 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 |
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 | |
/** | |
* 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 | |
* |
View wp_enqueue_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 | |
$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 ); |
NewerOlder