Pārlūkot izejas kodu

Improve WP detection

Gaël Métais 4 gadi atpakaļ
vecāks
revīzija
74b04ff922
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      lib/tools/redownload/redownload.js

+ 3 - 1
lib/tools/redownload/redownload.js

@@ -760,7 +760,9 @@ var Redownload = function() {
 
         debug('Checking if it is WordPress on file %s', htmlRequest.url);
 
-        if (htmlRequest && htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-content/') >= 0) {
+        if (htmlRequest && 
+            (htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-content/') >= 0 ||
+            htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-include/') >= 0)) {
             debug('Response: yes.');
             return true;
         } else {