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 | |
//Registers the pre_update_option filter for elements to encrypt. Format pre_update_option_(option name) | |
//Only do this for ones you want encrypted... in this case, first and third options. | |
function yourplugin_init() { | |
add_filter( 'pre_update_option_your_first_option', 'yourplugin_update_option', 10, 2 ); | |
add_filter( 'pre_update_option_your_third_option', 'yourplugin_update_option', 10, 2 ); | |
} | |
add_action( 'init', 'yourplugin_init' ); |
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 | |
//Form ID | |
$form_id = 1; | |
//Field ID | |
$field_id = 1; | |
//Pulls only the most recent entry | |
$paging = array( 'offset' => 0, 'page_size' => 1 ); |
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 | |
//Runs on User Registration | |
add_action( 'user_register', 'wc_map_guest_initial_match_past_orders', 10, 1 ); | |
function wc_map_guestinitial_match_past_orders( $user_id ) { | |
//Get current users's e-mail from ID | |
$current_user = get_user_by( 'ID', $user_id ); | |
$email = $current_user->user_email; |
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 | |
// you'll have to put a plugin header here | |
// Stop auto updated in WordPress 3.7+ | |
add_filter( 'auto_update_core', '__return_false' ); | |
add_filter( 'auto_update_plugin', '__return_false' ); | |
add_filter( 'auto_update_theme', '__return_false' ); | |
add_filter( 'auto_update_translation', '__return_false' ); | |
// stop translation updates when updating plugins or themes |
NewerOlder