PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.37
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.37
3.37 3.36 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 All 142 releases
← All changes | uninstall.php +45 -1 2.21 → 3.37 View file →
@@ -1,6 +1,50 @@
1 1 <?php
2 -if (!defined('WP_UNINSTALL_PLUGIN')) exit;
2 +if (!defined('WP_UNINSTALL_PLUGIN')) {
3 + exit;
4 +}
3 5
4 6 delete_option('photonic_options');
5 7 delete_option('photonic_authentication');
8 +delete_option('photonic_css');
6 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 +*/