Prechádzať zdrojové kódy

Improve WP detection

Gaël Métais 4 rokov pred
rodič
commit
74b04ff922
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  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);
         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.');
             debug('Response: yes.');
             return true;
             return true;
         } else {
         } else {