PluginProbe
Bubble Menu – Floating Button Menu with Sticky Navigation / 2.2
Bubble Menu – Floating Button Menu with Sticky Navigation v2.2
trunk 1.3 2.0 2.2 2.2.1 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.1 4.1.1
bubble-menu / includes / plugin-deactivation.php

plugin-deactivation.php in Bubble Menu – Floating Button Menu with Sticky Navigation 2.2, at includes/plugin-deactivation.php

44 lines 926 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Deactivation function
4 *
5 * @package Wow_Plugin
6 * @subpackage Includes/Dectivation
7 * @author Dmytro Lobov <i@wpbiker.com>
8 * @copyright 2019 Wow-Company
9 * @license GNU Public License
10 * @version 1.0
11
12 */
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Get the plugin folder in 'uploads'
19 */
20 $upload = wp_upload_dir();
21 $field = dirname( plugin_basename( __FILE__ ), 2 );
22 $basedir = $upload['basedir'] . '/' . $field . '/';
23
24 /**
25 * Delete the plugin folder and files from wp-upload
26 */
27 if ( is_dir( $basedir ) ) {
28
29 $is_empty = count( glob( $basedir . '*' ) ) ? true : false;
30 if ( $is_empty === true ) {
31 $handle = opendir( $basedir );
32
33 while ( false !== ( $file = readdir( $handle ) ) ) {
34
35 if ( $file != "." && $file != ".." ) {
36 wp_delete_file( $basedir . $file );
37 }
38
39 }
40 closedir( $basedir );
41 }
42 rmdir( $basedir );
43 }
44