Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 55 lines (49 sloc) 1.487 kb
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
1 <?php
2 /**
a18a2ee @niallkennedy update code documentation for PSR-5 and WordPress PHP documentation s…
niallkennedy authored
3 * Remove data written by the Facebook plugin for WordPress after an administrative user clicks "Delete" from the plugin management page in the WordPress administrative interface (wp-admin).
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
4 *
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
5 * @since 1.1
a18a2ee @niallkennedy update code documentation for PSR-5 and WordPress PHP documentation s…
niallkennedy authored
6 *
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
7 * @todo post meta data
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
8 */
9
a18a2ee @niallkennedy update code documentation for PSR-5 and WordPress PHP documentation s…
niallkennedy authored
10 // only execute as part of an uninstall script
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
11 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) )
12 exit();
13
a18a2ee @niallkennedy update code documentation for PSR-5 and WordPress PHP documentation s…
niallkennedy authored
14 // Facebook user helpers
09398de @niallkennedy authorize Facebook application from user profile page
niallkennedy authored
15 if ( ! class_exists( 'Facebook_User' ) )
16 require_once( dirname(__FILE__) . '/facebook-user.php' );
17
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
18 // user data
76a3140 @niallkennedy improve the performance of plugin arrays
niallkennedy authored
19 $__user_id = get_current_user_id();
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
20 foreach ( array('state', 'code', 'access_token', 'user_id', 'fb_data', 'facebook_timeline_disabled') as $meta_key ) {
09398de @niallkennedy authorize Facebook application from user profile page
niallkennedy authored
21 Facebook_User::delete_user_meta( $__user_id, $meta_key );
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
22 }
76a3140 @niallkennedy improve the performance of plugin arrays
niallkennedy authored
23 unset( $__user_id );
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
24
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
25 // site options
26 $__options = array(
ad6db26 @niallkennedy remove settings migration scripts and option checkers
niallkennedy authored
27 'fb_options',
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
28 'facebook_application',
29 'facebook_comments',
8c019a4 @niallkennedy remove the new comments_enabled option on uninstall
niallkennedy authored
30 'facebook_comments_enabled',
0a4a923 @niallkennedy support Facebook kid_directed_site flag for social plugins. remove cu…
niallkennedy authored
31 'facebook_kid_directed_site',
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
32 'facebook_like_button',
33 'facebook_recommendations_bar',
34 'facebook_send_button',
35 'facebook_mentions',
36 'facebook_publish_page',
95998b5 @niallkennedy change Subscribe button to Follow button
niallkennedy authored
37 'facebook_follow_button',
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
38 'facebook_home_features',
ad6db26 @niallkennedy remove settings migration scripts and option checkers
niallkennedy authored
39 'facebook_archive_features',
40 'facebook_migration_10',
41 'facebook_migration_115',
42 'facebook_migration_118'
2b1b385 @niallkennedy version 1.1. new settings pages. custom post types. async JS. validat…
niallkennedy authored
43 );
44
45 $__public_post_types = get_post_types( array( 'public' => true ) );
46 foreach ( $__public_post_types as $post_type ) {
47 $__options[] = 'facebook_' . $post_type . '_features';
48 }
49 unset( $__public_post_types );
50
51 foreach ( $__options as $option_name ) {
52 delete_option( $option_name );
53 }
76a3140 @niallkennedy improve the performance of plugin arrays
niallkennedy authored
54 unset( $__options );
5cf4d1e @niallkennedy move uninstall code into a separate uninstall file to be called by Wo…
niallkennedy authored
55 ?>
Something went wrong with that request. Please try again.