PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / 3.0
Floating Button – Easily Create Sticky, Fixed & Floating Buttons v3.0
trunk 2.0.2 3.0 4.0 4.1.2 4.3 5.0 5.0.1 5.1 5.1.1 5.2 5.3 5.3.1 6.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 All 31 releases
← All changes | floating-button.php +38 -8 4.33.0 View file →
@@ -2,9 +2,9 @@
2 2 /**
3 3 * Plugin Name: Floating Button Lite
4 4 * Plugin URI: https://wordpress.org/plugins/floating-button/
5 5 * Description: Easily create a floating button
6 - * Version: 4.3
6 + * Version: 3.0
7 7 * Author: Wow-Company
8 8 * Author URI: https://wow-estore.com/
9 9 * License: GPL-2.0+
10 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -14,9 +14,9 @@
14 14 * PHP version 5.3.0
15 15 *
16 16 * @category Wordpress_Plugin
17 17 * @package Wow_Plugin
18 - * @author Dmytro Lobov <d@dayes.dev>
18 + * @author Dmytro Lobov <i@wpbiker.com>
19 19 * @copyright 2019 Wow-Company
20 20 * @license GNU Public License
21 21 * @version 1.1
22 22 */
@@ -53,9 +53,9 @@
53 53 'menu' => esc_attr__( 'Floating Button Lite', 'floating-button' ), // Plugin name in menu
54 54 'author' => 'Wow-Company', // Author
55 55 'prefix' => self::PREF, // Prefix for database
56 56 'text' => 'floating-button', // Text domain for translate files
57 - 'version' => '4.3', // Current version of the plugin
57 + 'version' => '3.0', // Current version of the plugin
58 58 'file' => __FILE__, // Main file of the plugin
59 59 'slug' => dirname( plugin_basename( __FILE__ ) ), // Name of the plugin folder
60 60 'url' => plugin_dir_url( __FILE__ ), // filesystem directory path for the plugin
61 61 'dir' => plugin_dir_path( __FILE__ ), // URL directory path for the plugin
@@ -69,13 +69,10 @@
69 69 'pro' => 'https://wow-estore.com/item/floating-button-pro/',
70 70 'facebook' => 'https://www.facebook.com/wowaffect/',
71 71 ),
72 72 'rating' => array(
73 - 'website' => esc_attr__( 'WordPress.org', 'bubble-menu' ), // Name site for rating plugin
74 - 'url' => 'https://wordpress.org/support/plugin/floating-button/reviews/#new-post',
75 - 'wp_url' => 'https://wordpress.org/support/plugin/floating-button/reviews/#new-post',
76 - 'wp_home' => 'https://wordpress.org/plugins/floating-button/',
77 - 'wp_title' => 'Floating Button',
73 + 'website' => esc_attr__( 'WordPress.org', 'bubble-menu' ), // Name site for rating plugin
74 + 'url' => 'https://wordpress.org/support/plugin/floating-button/reviews/#new-post',
78 75 ),
79 76 );
80 77
81 78 self::$_instance = new Wow_Plugin;
@@ -80,9 +77,12 @@
80 77
81 78 self::$_instance = new Wow_Plugin;
82 79
83 80 register_activation_hook( __FILE__, array( self::$_instance, 'plugin_activate' ) );
81 + register_deactivation_hook( __FILE__, array( self::$_instance, 'plugin_deactivate' ) );
82 +
84 83 add_action( 'plugins_loaded', array( self::$_instance, 'text_domain' ) );
84 + add_action( 'admin_init', array( self::$_instance, 'create_field' ) );
85 85
86 86 self::$_instance->_includes();
87 87 self::$_instance->admin = new Wow_Plugin_Admin( $info );
88 88 self::$_instance->public = new Wow_Plugin_Public( $info );
@@ -145,9 +145,39 @@
145 145 * @since 1.0
146 146 */
147 147 public function plugin_activate() {
148 148 update_option( 'wow_' . self::PREF . '_notice_action', 'read' );
149 + self::create_field();
149 150 include_once 'includes/plugin-activation.php';
151 + }
152 +
153 + /**
154 + * Deactivate the plugin.
155 + * delete the plugin folder and files from wp-upload
156 + *
157 + * @access public
158 + * @since 1.0
159 + */
160 + public function plugin_deactivate() {
161 + include_once 'includes/plugin-deactivation.php';
162 + }
163 +
164 +
165 + /**
166 + * Create the plugin field in wp-upload.
167 + * Create the folder when the plugin update
168 + *
169 + * @access public
170 + * @return void
171 + * @since 1.0
172 + */
173 + public function create_field() {
174 + $upload = wp_upload_dir();
175 + $field = dirname( plugin_basename( __FILE__ ) );
176 + $basedir = $upload['basedir'] . '/' . $field . '/';
177 + if ( ! file_exists( $basedir ) ) {
178 + wp_mkdir_p( $basedir );
179 + }
150 180 }
151 181
152 182 /**
153 183 * Download the folder with languages.