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 | |
/** | |
* Better Pre-submission Confirmation | |
* http://gravitywiz.com/2012/08/04/better-pre-submission-confirmation/ | |
*/ | |
class GWPreviewConfirmation { | |
private static $lead; |
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 | |
new HiddenShopp; | |
class HiddenShopp | |
{ | |
/** | |
* Construct everything | |
* | |
* @author Hiranthi Molhoek-Herlaar |
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 | |
/** | |
* Filter $load_options | |
*/ | |
function onx_custom_filter($load_options) | |
{ | |
if ( is_admin() ) return $load_options; | |
if ( isset($_REQUEST['viewall']) || isset($_REQUEST['view-all']) ) |
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( 'init', 'onx_register_image_sizes' ); | |
function onx_register_image_sizes() | |
{ | |
add_image_size( 'header_screen_large', 2000, 1200, array( 'center', 'center' ), true ); | |
add_image_size( 'header_screen', 991, 700, array( 'center', 'center' ), true ); | |
add_image_size( 'header_tablet', 767, 550, array( 'center', 'center' ) ); | |
add_image_size( 'header_mobile', 479, 400, array( 'center', 'center' ) ); | |
} // end onx_register_image_sizes |
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 | |
if ( ! function_exists( 'get_current_sidebar' ) ) | |
{ | |
function get_current_sidebar ( $widget_id ) | |
{ | |
$sidebars_widgets = get_option('sidebars_widgets', array()); | |
if ( is_array( $sidebars_widgets ) && isset( $sidebars_widgets['array_version'] ) ) | |
unset( $sidebars_widgets['array_version'] ); | |
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 | |
# Like on: https://docs.gravityforms.com/gform_get_input_value/ | |
add_filter( 'gform_get_input_value', 'gf_custom_decode_field', 10, 4 ); | |
function gf_custom_decrypt_field( $value, $entry, $field, $input_id ) | |
{ | |
return GFCommon::decrypt( $value ); | |
} | |
// end gf_custom_decrypt_field |
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 the checkout steps so the customer knows where they are. | |
* | |
* The output uses classes of Bootstrap 4 and the icons of FontAwesome (Free) | |
**/ | |
function onx_woocommerce_checkout_steps() | |
{ | |
echo '<nav id="woo-checkout-steps" class="nav nav-pills nav-justified mb-4" role="navigation">'; |
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 | |
# Check: https://onexa.nl/wordpress/toolbar-link-redis-object-cache/ | |
/** | |
* Add a link to the Admin Toolbar to easily flush the Redis cache (Redis Object Cache plugin) | |
* | |
* @author Hiranthi Herlaar, onexa.nl | |
* @version 2.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 | |
function my_custom_gravityforms_encrypt( $to_encrypt ) | |
{ | |
if ( '' === $to_encrypt ) return null; | |
if ( function_exists('openssl_encrypt') && function_exists('openssl_random_pseudo_bytes') ) | |
{ | |
$iv = openssl_random_pseudo_bytes( openssl_cipher_iv_length( 'aes-256-cbc' ) ); | |
$encrypted = openssl_encrypt( $to_encrypt, 'aes-256-cbc', MY_CUSTOM_GF_ENCRYPTION_KEY, 0, $iv ); |
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 | |
# just add the needed form IDs to the array | |
$forms = array( '6', '7' ); | |
# looping through the array to add an 'add_filter' for each | |
foreach ( $forms as $i => $form ) | |
add_filter( "gform_field_validation_{$form}", 'custom_zip_validation', 10, 4 ); | |
# the function |