Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // ...
- //delete all options
- function my_plugin_uninstall_options() {
- global $wpdb;
- $users = $wpdb->get_col( 'SELECT `'. $wpdb->users.ID .'` FROM `'. $wpdb->users .'`' );
- foreach ( $users as $user_id )
- delete_user_option( $user_id, 'option_two' );
- delete_option( 'option_one' );
- delete_option( 'option_two' ); // it is used as a fallback
- }
- my_plugin_uninstall_options();
- // ...
- ?>
Add Comment
Please, Sign In to add comment