PluginProbe ʕ •ᴥ•ʔ
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.1.5
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.1.5
4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 3.8.0 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 3.2.2 trunk 0.7.0 1.8.9.10 1.8.9.7 1.8.9.8 1.8.9.9 1.9 1.9.1 2.0.1 2.1.0 2.1.1 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.2 2.2.3 2.2.4 2.2.6 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.18 3.0.19 3.0.2 3.0.3 3.0.4 3.0.5 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.2 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19
wp-optimize / includes / class-updraftcentral-wp-optimize-commands.php
wp-optimize / includes Last commit date
backward-compatibility-functions.php 5 years ago class-commands.php 5 years ago class-updraft-abstract-logger.php 6 years ago class-updraft-email-logger.php 8 years ago class-updraft-file-logger.php 6 years ago class-updraft-log-levels.php 8 years ago class-updraft-logger-interface.php 8 years ago class-updraft-logger.php 8 years ago class-updraft-php-logger.php 6 years ago class-updraft-resmushit-task.php 5 years ago class-updraft-ring-logger.php 8 years ago class-updraft-smush-manager-commands.php 5 years ago class-updraft-smush-manager.php 5 years ago class-updraft-smush-task.php 5 years ago class-updraftcentral-wp-optimize-commands.php 7 years ago class-wp-optimization.php 5 years ago class-wp-optimize-browser-cache.php 5 years ago class-wp-optimize-gzip-compression.php 5 years ago class-wp-optimize-htaccess.php 6 years ago class-wp-optimize-install-or-update-notice.php 5 years ago class-wp-optimize-options.php 5 years ago class-wp-optimize-transients-cache.php 6 years ago class-wp-optimize-updates.php 5 years ago class-wp-optimizer.php 5 years ago updraft-notices.php 5 years ago updraftcentral.php 5 years ago wp-optimize-database-information.php 5 years ago wp-optimize-notices.php 5 years ago
class-updraftcentral-wp-optimize-commands.php
43 lines
1 <?php
2 if (!defined('WPO_PLUGIN_MAIN_PATH')) die('No direct access allowed');
3
4 /**
5 * This is a small glue class, which makes available all the commands in WP_Optimize_Commands, and translates the response from WP_Optimize_Commands (which is either data to return, or a WP_Error) into the format used by UpdraftCentral.
6 */
7 class UpdraftCentral_WP_Optimize_Commands extends UpdraftCentral_Commands {
8
9 private $commands;
10
11 /**
12 * Class constructor
13 */
14 public function __construct() {
15 if (!class_exists('WP_Optimize_Commands')) include_once(WPO_PLUGIN_MAIN_PATH.'includes/class-commands.php');
16 $this->commands = new WP_Optimize_Commands();
17
18 }
19
20 /**
21 * Magic method to pass on the command to WP_Optimize_Commands
22 *
23 * @param String $name - command name
24 * @param Array $arguments - command parameters
25 *
26 * @return Array - response
27 */
28 public function __call($name, $arguments) {
29
30 if (!is_callable(array($this->commands, $name))) {
31 return $this->_generic_error_response('wp_optimize_no_such_command', $name);
32 }
33
34 $result = call_user_func_array(array($this->commands, $name), $arguments);
35
36 if (is_wp_error($result)) {
37 return $this->_generic_error_response($result->get_error_code(), $result->get_error_data());
38 } else {
39 return $this->_response($result);
40 }
41 }
42 }
43