From 9c32fd46e09e42ce5c9fc12d72c1e07be56ce39c Mon Sep 17 00:00:00 2001 From: thanghv Date: Tue, 12 Jan 2021 22:58:28 +0700 Subject: [PATCH 1/7] Refactoring --- class/class-mainwp-child-staging.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/class/class-mainwp-child-staging.php b/class/class-mainwp-child-staging.php index aa9f6b47..614970bc 100644 --- a/class/class-mainwp-child-staging.php +++ b/class/class-mainwp-child-staging.php @@ -45,6 +45,11 @@ class MainWP_Child_Staging { */ public $is_plugin_installed = false; + /** + * Public variable to hold the information if the WP Staging plugin is installed on the child site. + * + * @var string version string. + */ public $plugin_version = false; /** @@ -173,12 +178,12 @@ public function action() { // phpcs:ignore -- ignore complex method notice. if ( class_exists( '\WPStaging\Core\WPStaging' ) ) { $this->plugin_version = '2.8'; - \WPStaging\Core\WPStaging::getInstance(); + \WPStaging\Core\WPStaging::getInstance(); // phpcs:ignore -- to compatible WP Staging plugin. } elseif ( class_exists( '\WPStaging\WPStaging' ) ) { $this->plugin_version = '2.7'; - \WPStaging\WPStaging::getInstance(); + \WPStaging\WPStaging::getInstance(); // phpcs:ignore -- to compatible WP Staging plugin. } - + $information = array(); if ( 'Y' !== get_option( 'mainwp_wp_staging_ext_enabled' ) ) { @@ -319,7 +324,8 @@ public function get_scan() { $return = array( 'options' => serialize( $options ), // phpcs:ignore -- to compatible http encoding. 'directoryListing' => $scan->directoryListing(), - 'prefix' => '2.8' == $this->plugin_version ? \WPStaging\Core\WPStaging::getTablePrefix() : \WPStaging\WPStaging::getTablePrefix(), + 'prefix' => '2.8' == $this->plugin_version ? \WPStaging\Core\WPStaging::getTablePrefix() : \WPStaging\WPStaging::getTablePrefix(), // phpcs:ignore -- to compatible WP Staging plugin. + 'directoryListing' => $scan->directoryListing(), ); return $return; } From f4206c3b091d4fa6f6076677bf9ef70de393c4de Mon Sep 17 00:00:00 2001 From: thanghv Date: Tue, 12 Jan 2021 23:13:34 +0700 Subject: [PATCH 2/7] Refactoring --- class/class-mainwp-child-staging.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class/class-mainwp-child-staging.php b/class/class-mainwp-child-staging.php index 614970bc..3a382703 100644 --- a/class/class-mainwp-child-staging.php +++ b/class/class-mainwp-child-staging.php @@ -178,10 +178,10 @@ public function action() { // phpcs:ignore -- ignore complex method notice. if ( class_exists( '\WPStaging\Core\WPStaging' ) ) { $this->plugin_version = '2.8'; - \WPStaging\Core\WPStaging::getInstance(); // phpcs:ignore -- to compatible WP Staging plugin. + \WPStaging\Core\WPStaging::getInstance(); } elseif ( class_exists( '\WPStaging\WPStaging' ) ) { $this->plugin_version = '2.7'; - \WPStaging\WPStaging::getInstance(); // phpcs:ignore -- to compatible WP Staging plugin. + \WPStaging\WPStaging::getInstance(); } $information = array(); @@ -324,7 +324,7 @@ public function get_scan() { $return = array( 'options' => serialize( $options ), // phpcs:ignore -- to compatible http encoding. 'directoryListing' => $scan->directoryListing(), - 'prefix' => '2.8' == $this->plugin_version ? \WPStaging\Core\WPStaging::getTablePrefix() : \WPStaging\WPStaging::getTablePrefix(), // phpcs:ignore -- to compatible WP Staging plugin. + 'prefix' => '2.8' == $this->plugin_version ? \WPStaging\Core\WPStaging::getTablePrefix() : \WPStaging\WPStaging::getTablePrefix(), 'directoryListing' => $scan->directoryListing(), ); return $return; From 7cafceb6f6c0b38f05055b3c6e03c1c97d3bdcd1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 15 Jan 2021 10:26:47 +0000 Subject: [PATCH 3/7] Bump composer/installers from 1.9.0 to 1.10.0 Bumps [composer/installers](https://github.com/composer/installers) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/composer/installers/releases) - [Changelog](https://github.com/composer/installers/blob/main/CHANGELOG.md) - [Commits](https://github.com/composer/installers/compare/v1.9.0...v1.10.0) Signed-off-by: dependabot-preview[bot] --- composer.lock | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 8d843c1d..9f6025c0 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "composer/installers", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca" + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca", - "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca", + "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", "shasum": "" }, "require": { @@ -28,17 +28,18 @@ "shama/baton": "*" }, "require-dev": { - "composer/composer": "1.6.* || 2.0.*@dev", - "composer/semver": "1.0.* || 2.0.*@dev", - "phpunit/phpunit": "^4.8.36", - "sebastian/comparator": "^1.2.4", + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^4.2 || ^5", "symfony/process": "^2.3" }, "type": "composer-plugin", "extra": { "class": "Composer\\Installers\\Plugin", "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -76,6 +77,7 @@ "Porto", "RadPHP", "SMF", + "Starbug", "Thelia", "Whmcs", "WolfCMS", @@ -116,6 +118,7 @@ "phpbb", "piwik", "ppi", + "processwire", "puppet", "pxcms", "reindex", @@ -136,12 +139,16 @@ "url": "https://packagist.com", "type": "custom" }, + { + "url": "https://github.com/composer", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/composer/composer", "type": "tidelift" } ], - "time": "2020-04-07T06:57:05+00:00" + "time": "2021-01-14T11:07:16+00:00" } ], "packages-dev": [ From c974e02e39961b29439e2e86bf5e64acb359cd58 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 18 Jan 2021 13:38:49 +0000 Subject: [PATCH 4/7] Bump phpunit/phpunit from 9.5.0 to 9.5.1 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.0 to 9.5.1. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.0...9.5.1) Signed-off-by: dependabot-preview[bot] --- composer.lock | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/composer.lock b/composer.lock index 9f6025c0..c1964009 100644 --- a/composer.lock +++ b/composer.lock @@ -385,16 +385,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.3", + "version": "v4.10.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984" + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", - "reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", "shasum": "" }, "require": { @@ -433,7 +433,7 @@ "parser", "php" ], - "time": "2020-12-03T17:45:45+00:00" + "time": "2020-12-20T10:01:03+00:00" }, { "name": "phar-io/manifest", @@ -493,16 +493,16 @@ }, { "name": "phar-io/version", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "726c026815142e4f8677b7cb7f2249c9ffb7ecae" + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/726c026815142e4f8677b7cb7f2249c9ffb7ecae", - "reference": "726c026815142e4f8677b7cb7f2249c9ffb7ecae", + "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", "shasum": "" }, "require": { @@ -536,7 +536,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2020-11-30T09:21:21+00:00" + "time": "2020-12-13T23:18:30+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -846,16 +846,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { @@ -867,7 +867,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -905,7 +905,7 @@ "spy", "stub" ], - "time": "2020-09-29T09:10:42+00:00" + "time": "2020-12-19T10:15:11+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1207,16 +1207,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.0", + "version": "9.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe" + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", - "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", "shasum": "" }, "require": { @@ -1302,7 +1302,7 @@ "type": "github" } ], - "time": "2020-12-04T05:05:53+00:00" + "time": "2021-01-17T07:42:25+00:00" }, { "name": "rmccue/requests", @@ -2369,16 +2369,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -2390,7 +2390,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2441,7 +2441,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "theseer/tokenizer", From 8a4b5d583697da319fc9be7d288f47027d4b0e37 Mon Sep 17 00:00:00 2001 From: thanghv Date: Thu, 21 Jan 2021 22:50:33 +0700 Subject: [PATCH 5/7] Update version number --- class/class-mainwp-child.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/class-mainwp-child.php b/class/class-mainwp-child.php index f6c55007..c2af60fd 100644 --- a/class/class-mainwp-child.php +++ b/class/class-mainwp-child.php @@ -33,7 +33,7 @@ class MainWP_Child { * * @var string MainWP Child plugin version. */ - public static $version = '4.1.3.1'; + public static $version = '4.1.4'; /** * Private variable containing the latest MainWP Child update version. From 4c57f57c5dd260128fbb60c011f70d385caf5042 Mon Sep 17 00:00:00 2001 From: thanghv Date: Thu, 21 Jan 2021 22:51:27 +0700 Subject: [PATCH 6/7] version number --- mainwp-child.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainwp-child.php b/mainwp-child.php index 56a136a0..56a50f59 100644 --- a/mainwp-child.php +++ b/mainwp-child.php @@ -12,7 +12,7 @@ * Author: MainWP * Author URI: https://mainwp.com * Text Domain: mainwp-child - * Version: 4.1.3.1 + * Version: 4.1.4 * Requires at least: 3.6 * Requires PHP: 7.0 */ From f7d22446d59ce9ceeb953c75a271915420cbee12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan=20Rapai=C4=87?= Date: Thu, 21 Jan 2021 16:54:19 +0100 Subject: [PATCH 7/7] Updated: changelog and version number --- readme.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 8cb3219b..0b77f2a1 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Plugin URI: https://mainwp.com Requires at least: 3.6 Tested up to: 5.6 Requires PHP: 7.0 -Stable tag: 4.1.3.1 +Stable tag: 4.1.4 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -107,6 +107,12 @@ Sure we have a quick FAQ with a lot more questions and answers [here](https://ma == Changelog == += 4.1.4 - 1-21-21 = +* Updated: Compatibility with the latest WP Staging plugin version +* Updated: Compatibility with the latest WP Time Capsule plugin version +* Updated: Multiple DocBlock comments +* Preventative: Multiple security improvements + = 4.1.3.1 - 12-30-20 = * Fixed: An issue with uploading images in posts and pages * Updated: New WP Rocket plugin version compatibility