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 // don't add this tag | |
// Print javascript code in the footer of the site to trigger the popup upon form submission | |
add_action('wp_footer', 'add_popups_trigger_code',150 ); | |
function add_popups_trigger_code(){ | |
// show code on certain page, comment out to print code on every page | |
if( ! is_page('520') ) | |
return; | |
?> | |
<script> |
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 | |
// Print javascript code in the footer of the site to trigger the popup upon form submission | |
add_action('wp_footer', 'add_popups_trigger_code',150 ); | |
function add_popups_trigger_code(){ | |
// show code on certain page, comment out to print code on every page | |
if( ! is_page('520') ) | |
return; | |
?> | |
<script> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { |
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 | |
/** | |
* If you want to cancel API calls for any reason or to pass custom that you can use the following | |
* filter. Note that we use json_decode(json_encode to pass an object instead of an array | |
**/ | |
// Cancel query only for admins | |
add_filter('geot/cancel_query', function() { | |
if( ! current_user_can('administrator') ) | |
return false; |
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 | |
/** | |
* By default WpRocket plugin will create different cache pages at a country level | |
* To add more levels (states or cities) you need to add the following filter | |
*/ | |
add_filter('rocket_geotargetingwp_enabled_cookies', function($enable){ | |
$enable[] = 'state'; | |
//$enable[] = 'city'; | |
return $enable; |
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 // don't include opening tag if already exist | |
// Popups premium disable images loaded plugin | |
add_filter('spu/spuvar/imagesloaded', '__return_false'); |
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 // don't include this line | |
/** | |
* Enable support for WooCommerce Price Based on Country and GeotargetingWP | |
* First enable cache mode or you will consume lot of credits. | |
*/ | |
if( function_exists('geot_country_code')) { | |
add_action( 'init', 'geotwp_wcpb_set_country', 10 ); | |
function geotwp_wcpb_set_country(){ | |
if( ! function_exists('wcpbc_set_woocommerce_country') ) |
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 | |
/** | |
* Collect custom scopes with Facebook Login WordPress plugin | |
* https://timersys.com/plugins/facebook-login-pro/ | |
**/ | |
// Change default scopes | |
add_filter('fbl/app_scopes', function( $scopes ) { | |
return 'email,public_profile,user_posts'; // pass custom scopes | |
}); |
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
/** | |
* Snippet for WordPress popup plugin | |
* https://wordpress.org/plugins/popups/ | |
* Add this in your theme javascript files | |
*/ | |
/** | |
* How to pause videos when popup is closed | |
* Replace 123 with your popup id | |
*/ |
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 // don't include this line if php already started | |
function remove_spu_boxes() { | |
remove_meta_box( 'spu-support', 'spucpt', 'side' ); | |
remove_meta_box( 'spu-donate', 'spucpt', 'side' ); | |
remove_meta_box( 'spu-links', 'spucpt', 'side' ); | |
} | |
add_action( 'add_meta_boxes', 'remove_spu_boxes',15 ); |
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
.spu-fields::-webkit-input-placeholder { /* WebKit, Blink, Edge */ | |
color: #909 !important; | |
} | |
.spu-fields:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ | |
color: #909 !important; | |
opacity: 1; | |
} | |
.spu-fields::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
color: #909 !important; | |
opacity: 1; |