PHP Compatibility Checker. Please run make build to build assets.', 'wpe-php-compat' ) ); ?>
' + failedCount + ' ' + window.wpephpcompat.out_of + ' ' + plugins.length + ' ' + window.wpephpcompat.are_not + '.
' ); + jQuery( '.wpe-pcc-information-errors' ).show(); + jQuery( '.wpe-pcc-results' ).show(); + } +} diff --git a/src/js/scan.js b/src/js/scan.js deleted file mode 100644 index 04918d9d..00000000 --- a/src/js/scan.js +++ /dev/null @@ -1,89 +0,0 @@ -import "../scss/scan.scss"; -import jQuery from "jquery"; -import { initQueue, runNextJob } from "./include/queue-manager"; -import { initResults } from "./include/render"; -import { downloadReport } from "./include/download"; - -(function ($) { - if ("undefined" === typeof checkerList) { - return; - } - - window.phpcompat = {}; - window.phpcompat.queue = []; - window.phpcompat.total = 0; - window.phpcompat.completed = 0; - window.phpcompat.xhr = false; - window.phpcompat.ticker = false; - window.phpcompat.results = []; - - const activeOnlySwitch = $("input[type=radio][name=active_plugins]"); - const runButton = $("#runButton"); - - init(checkerList); - - activeOnlySwitch.on("change", function () { - init(checkerList); - runButton.prop("disabled", false); - disableDeveloperMode(); - }); - - $("#cleanupButton").on("click", function (event) { - event.preventDefault(); - runButton.prop("disabled", false); - disableDeveloperMode(); - init(checkerList); - }); - - runButton.on("click", function (event) { - event.preventDefault(); - runNextJob(); - $(".wpe-pcc-spinner").show(); - $(this).prop("disabled", true); - }); - - $(document).on("click", ".wpe-pcc-php-version-errors", function (event) { - event.preventDefault(); - const phpVersion = $(this).data("php-version"); - const reports = $(this).closest(".wpe-pcc-alert").find("#wpe_pcc_reports"); - const report = reports.find(`[data-php-version="${phpVersion}"]`); - $(".wpe-pcc-php-version-report").not(report).hide(); - $(report).toggle(); - }); - - $(document).on( - "click", - ".wpe-pcc-php-version-report-close", - function (event) { - event.preventDefault(); - $(this).closest(".wpe-pcc-php-version-report").hide(); - } - ); - - $("#developermode").on("change", function (event) { - if ($(this).is(":checked")) { - $("#developerMode").show(); - $("#wpe_pcc_results").hide(); - } else { - $("#developerMode").hide(); - $("#wpe_pcc_results").show(); - } - }); - - $("#downloadReport").on("click", function (event) { - event.preventDefault(); - downloadReport(); - }); - - function init(itemsToScan) { - var activeOnly = $("input[type=radio][name=active_plugins]:checked").val(); - initQueue(itemsToScan, activeOnly); - initResults(itemsToScan, activeOnly); - } - - function disableDeveloperMode() { - $("#developermode").prop("checked", false); - $("#developerMode").hide(); - $("#wpe_pcc_results").show(); - } -})(jQuery); diff --git a/src/ruleset-wordpress.xml b/src/ruleset-wordpress.xml new file mode 100644 index 00000000..dfdcf8c5 --- /dev/null +++ b/src/ruleset-wordpress.xml @@ -0,0 +1,23 @@ + ++ PHP Compatibility Checker. Start scanning your plugins and themes for compatibility with the latest PHP versions now!', 'php-compatibility-checker' ), + esc_url( $url ) + ); + ?> +
+