PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 3.6.0
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v3.6.0
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
← All changes | freemius/includes/class-fs-logger.php +14 -10 1.53.6.0 View file →
@@ -31,8 +31,11 @@
31 31 * @var int ABSPATH length.
32 32 */
33 33 private static $_abspathLength;
34 34
35 + /**
36 + * @var FS_Logger[] $LOGGERS
37 + */
35 38 private static $LOGGERS = array();
36 39 private static $LOG = array();
37 40 private static $CNT = 0;
38 41 private static $_HOOKED_FOOTER = false;
@@ -37,11 +40,12 @@
37 40 private static $CNT = 0;
38 41 private static $_HOOKED_FOOTER = false;
39 42
40 43 private function __construct( $id, $on = false, $echo = false ) {
44 + $bt = debug_backtrace();
45 +
41 46 $this->_id = $id;
42 47
43 - $bt = debug_backtrace();
44 48 $caller = $bt[2];
45 49
46 50 if ( false !== strpos( $caller['file'], 'plugins' ) ) {
47 51 $this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
@@ -122,9 +126,8 @@
122 126 }
123 127
124 128 self::hook_footer();
125 129 }
126 -
127 130 function echo_on() {
128 131 $this->on();
129 132
130 133 $this->_echo = true;
@@ -141,9 +144,9 @@
141 144 function get_file() {
142 145 return $this->_file_start;
143 146 }
144 147
145 - private function _log( &$message, $type = 'log', $wrapper ) {
148 + private function _log( &$message, $type, $wrapper = false ) {
146 149 if ( ! $this->is_on() ) {
147 150 return;
148 151 }
149 152
@@ -318,8 +321,13 @@
318 321 global $wpdb;
319 322
320 323 $table = "{$wpdb->prefix}fs_logger";
321 324
325 + /**
326 + * Drop logging table in any case.
327 + */
328 + $result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
329 +
322 330 if ( $is_on ) {
323 331 /**
324 332 * Create logging table.
325 333 *
@@ -327,9 +335,9 @@
327 335 * dbDelta must use KEY and not INDEX for indexes.
328 336 *
329 337 * @link https://core.trac.wordpress.org/ticket/2695
330 338 */
331 - $result = $wpdb->query( "CREATE TABLE {$table} (
339 + $result = $wpdb->query( "CREATE TABLE IF NOT EXISTS {$table} (
332 340 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
333 341 `process_id` INT UNSIGNED NOT NULL,
334 342 `user_name` VARCHAR(64) NOT NULL,
335 343 `logger` VARCHAR(128) NOT NULL,
@@ -346,17 +354,13 @@
346 354 KEY `process_id` (`process_id` ASC),
347 355 KEY `process_logger` (`process_id` ASC, `logger` ASC),
348 356 KEY `function` (`function` ASC),
349 357 KEY `type` (`type` ASC))" );
350 - } else {
351 - /**
352 - * Drop logging table.
353 - */
354 - $result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
355 358 }
356 359
357 360 if ( false !== $result ) {
358 361 update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
362 + self::$_isStorageLoggingOn = $is_on;
359 363 }
360 364
361 365 return ( false !== $result );
362 366 }
@@ -687,5 +691,5 @@
687 691 return rtrim( $upload_dir['url'], '/' ) . $filename;
688 692 }
689 693
690 694 #endregion
691 - }
695 + }