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
function example_update_nocache_headers($headers) { | |
$headers['Cache-Control'] = 'no-cache, must-revalidate, max-age=0, no-store'; | |
$headers['Pragma'] = 'no-cache'; | |
return $headers; | |
} | |
add_filter('nocache_headers','example_update_nocache_headers'); |
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 | |
/** | |
* When using the WordPress Importer, update existing | |
* posts instead of skipping them. Updates content according | |
* to the import file even if the existing post was updated | |
* more recently. | |
* | |
* To use, drop this file into your /mu-plugins/ folder or | |
* copy this code into your functions.php file. |
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 | |
/** | |
* SecurePay Standard Gateway | |
* | |
* @package Give | |
* @subpackage Gateways | |
* @copyright Copyright (c) 2016, WordImpress | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* @since 1.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
function block_monsterinsights_cookies($attr) { | |
$attr['type'] = "text/plain"; | |
$attr['class'] = '_iub_cs_activate'; | |
return $attr; | |
} | |
add_filter('monsterinsights_tracking_analytics_script_attributes', 'block_monsterinsights_cookies', 10); |
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 | |
global $ld_recalc; | |
$ld_recalc = array( | |
'posts_per_run' => 16, | |
'post_types' => array( 'distributor' ), | |
'scan_key' => 'acf-recalc-scan', | |
'scan_identifier' => '2015-09-23', // Change this if you want to scan again in the future. |
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
/*** MAIN WRAPPER ***/ | |
.gform_wrapper { | |
background: #6000AA; | |
padding: 5%; | |
} | |
/*** REMOVE LABEL FOR PLACEHOLDER ONLY ***/ | |
.gform_wrapper .top_label .gfield_label, | |
.gform_wrapper .field_sublabel_below .ginput_complex.ginput_container label { | |
display: none; |
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 | |
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) | |
add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); | |
function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
ob_start(); | |
?> | |
<a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> | |
<?php |