PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / trunk
Photonic Gallery & Lightbox for Flickr, SmugMug & Others vtrunk
3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 2.45 All 140 releases
photonic / uninstall.php

uninstall.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others trunk, at uninstall.php

51 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('WP_UNINSTALL_PLUGIN')) {
3 exit;
4 }
5
6 delete_option('photonic_options');
7 delete_option('photonic_authentication');
8 delete_option('photonic_css');
9
10 $photonic_token_monitor_timestamp = wp_next_scheduled('photonic_token_monitor');
11 wp_unschedule_event($photonic_token_monitor_timestamp, 'photonic_token_monitor');
12
13 /*
14 $url = wp_nonce_url('plugins.php?page=photonic-options-manager');
15 if (false === ($creds = request_filesystem_credentials($url, '', false, false))) {
16 return true;
17 }
18
19 if (!WP_Filesystem($creds)) {
20 request_filesystem_credentials($url, '', true, false);
21 return true;
22 }
23
24 global $wp_filesystem;
25 if (!is_dir(PHOTONIC_UPLOAD_DIR)) {
26 if (!$wp_filesystem->mkdir(PHOTONIC_UPLOAD_DIR)) {
27 echo "<div class='error'><p>Failed to create directory ".PHOTONIC_UPLOAD_DIR.". Please check your folder permissions.</p></div>";
28 return false;
29 }
30 }
31
32 $filename = trailingslashit(PHOTONIC_UPLOAD_DIR).'custom-styles.css';
33
34 if (empty($custom_css)) {
35 return false;
36 }
37
38 if (!$wp_filesystem->put_contents($filename, $custom_css, FS_CHMOD_FILE)) {
39 echo "<div class='error'><p>Failed to save file $filename. Please check your folder permissions.</p></div>";
40 return false;
41 }
42
43
44
45 $upload_dir = wp_upload_dir();
46 $photonic_dir = trailingslashit($upload_dir['basedir']).'photonic';
47 if (@file_exists($photonic_dir)) {
48 WP_Filesystem_Direct::delete($upload_dir, true);
49 }
50 */
51