Fixes #873 - mu-plugins detection
This commit is contained in:
@@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
class WpTarget < WebSite
|
class WpTarget < WebSite
|
||||||
module WpMustUsePlugins
|
module WpMustUsePlugins
|
||||||
|
|
||||||
# Checks to see if the must use plugin folder exists
|
# Checks to see if the must use plugin folder exists
|
||||||
#
|
#
|
||||||
# @return [ Boolean ]
|
# @return [ Boolean ]
|
||||||
def has_must_use_plugins?
|
def has_must_use_plugins?
|
||||||
response = Browser.get(must_use_url)
|
response = Browser.get(must_use_url)
|
||||||
|
|
||||||
if response && WpTarget.valid_response_codes.include?(response.code)
|
if response && [200, 401, 403].include?(response.code)
|
||||||
hash = WebSite.page_hash(response)
|
hash = WebSite.page_hash(response)
|
||||||
return true if hash != error_404_hash && hash != homepage_hash
|
return true if hash != error_404_hash && hash != homepage_hash
|
||||||
end
|
end
|
||||||
@@ -21,6 +20,5 @@ class WpTarget < WebSite
|
|||||||
def must_use_url
|
def must_use_url
|
||||||
@uri.merge("#{wp_content_dir}/mu-plugins/").to_s
|
@uri.merge("#{wp_content_dir}/mu-plugins/").to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user