Created
January 17, 2018 10:39
-
-
Save plugin-republic/a4c066dd6c969782d2c3ae370505f09f to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Demo function to show wisdom_deactivate_existing_item hook | |
* | |
* @param $item_id Integer The ID of the newly created tracked-plugin post type | |
* @param $post_params Array All data received from new site | |
*/ | |
function showcase_wisdom_deactivate_item( $item_id, $post_params ) { | |
update_option( 'my_test_deactivated_item', 'Item ID is ' . sanitize_text_field( $item_id ) ); | |
if( isset( $post_params['email'] ) ) { | |
update_option( 'my_test_deactivated_item', 'Email address is ' . sanitize_email( $post_params['email'] ) ); | |
} | |
} | |
add_action( 'wisdom_deactivate_existing_item', 'showcase_wisdom_deactivate_item', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment