Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
with:
php-version: '7.2'
extensions: simplexml, mysql
tools: phpunit-polyfills
tools: phpunit:7.5.20, phpunit-polyfills
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Subversion
Expand All @@ -73,7 +73,6 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpunit
run: composer run-script phpunit

1 change: 1 addition & 0 deletions assets/css/style-wizard.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ h2.wpmm-title span img {
.step.import-step {
margin: min(10%, 65px) min(12%, 195px);
width: 1090px;
outline: 0;
}

.import-step .header {
Expand Down
19 changes: 18 additions & 1 deletion assets/js/scripts-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ jQuery( function( $ ) {
*/
function handlePlugins() {
const optimoleCheckbox = $( '#wizard-optimole-checkbox' );
const wpscCheckbox = $( '#wizard-wpsc-checkbox' );
const otterBlockCheckbox = $( '#wizard-otter-block-checkbox' );
let promiseChain = Promise.resolve();

Expand All @@ -617,6 +618,19 @@ jQuery( function( $ ) {
});
}

if ( wpscCheckbox.length && wpscCheckbox.is( ':checked' ) ) {
promiseChain = promiseChain
.then( () => {
if ( ! wpmmVars.isWPSCInstalled ) {
return installPlugin( 'wp-cloudflare-page-cache' ).then( () => activatePlugin( 'wp-cloudflare-page-cache' ) );
}

if ( ! wpmmVars.isWPSCActive ) {
return activatePlugin( wpmmVars.isWPSCProInstalled ? 'wp-super-page-cache-pro' : 'wp-cloudflare-page-cache' );
}
} );
}

if ( otterBlockCheckbox.length && otterBlockCheckbox.is( ':checked' ) ) {
promiseChain = promiseChain
.then(() => handleOtter());
Expand All @@ -637,7 +651,7 @@ jQuery( function( $ ) {
updateSDKOptions();
return activatePlugin( 'otter-blocks' );
} );
} else if ( ! wpmmVars.isOtterActivated ) {
} else if ( ! wpmmVars.isOtterActive ) {
return activatePlugin( 'otter-blocks' );
}

Expand Down Expand Up @@ -689,6 +703,9 @@ jQuery( function( $ ) {
return $.get( wpmmVars.otterActivationLink );
case 'optimole-wp':
return $.get( wpmmVars.optimoleActivationLink );
case 'wp-super-page-cache-pro':
case 'wp-cloudflare-page-cache':
return $.get( wpmmVars.wpscActivationLink );
default:
break;
}
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"wp-coding-standards/wpcs": "*"
"wp-coding-standards/wpcs": "*",
"yoast/phpunit-polyfills": "^4.0"
},
"autoload": {
"files": [
Expand All @@ -37,7 +38,7 @@
"config": {
"optimize-autoloader": true,
"platform": {
"php": "5.6"
"php": "7.2"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand Down
Loading
Loading