View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare( strict_types=1 ); | |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Controller; | |
/** | |
* Launching on-demand scans for Shield Security can be done using the function outlined below. | |
* It requires a single array parameter that contains the so-called "slugs" of the respective scans. | |
* | |
* Shield currently has 3 distinct scan types, namely: | |
* - AFS: file scanner, (WordPress, plugin, themes, malware scan) |
View gist:e15774a5307d8f65416234b4ac61203c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare( strict_types=1 ); | |
/** | |
* Easy Digital Downloads will send license expiration notices for any licenses, even if they | |
* have been refunded. This is not ideal. | |
* | |
* This filter will prevent such notices being sent if any payments associated with this | |
* license have been refunded. | |
* | |
* This may not be applicable in cases where you EDD store supports multiple products in |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare( strict_types=1 ); | |
/** | |
* Use this filter to tell Shield to block a request. | |
* | |
* By default, Shield will block requests solely based on the IP reputation for that site. | |
* | |
* With this filter, you can change these criteria. | |
* | |
* In this example we want to block all access to the WP admin and WP login areas and |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare( strict_types=1 ); | |
/** | |
* Use this filter to tell Shield to NOT run the NotBot JS system. | |
* | |
* If you disable the NotBot JS system then you will likely lock-out visitors. | |
* | |
* Use of this filter is at your own risk. | |
*/ | |
add_filter( 'shield/can_run_antibot', function ( $canRun ) { |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Note: Only available from Shield v11.2+ | |
* | |
* Use this filter to tell Shield whether or not the Plugin Security Badge should be displayed or not. | |
* | |
* More Info on badge here: https://getshieldsecurity.com/blog/feature-plugin-badge/ | |
* | |
* For example, you may only want to show the badge if the visitor is not on a mobile (see below). |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use this filter to tell Shield to NOT automatically whitelist certain providers. | |
* | |
* By default Shield will never block official service providers and web crawlers. You can turn off this behaviour on | |
* a per-service basis using this filter. | |
* | |
* Understand that Shield doesn't then "block" the provider, it simply no longer gives it a free pass. If it abuses your | |
* resources or performs requests that cause offenses, it may be then blocked by Shield. |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The Scanner cron job run by the Shield plugin is responsible for executing the scans. | |
* If you're running ShieldFREE, the scans runs automatically once per day. On ShieldPRO, it can repeat up to every hour. | |
* | |
* The Cron is configured to have a start time - i.e. the first time that the cron will execute. Then it repeats based on your settings. | |
* | |
* If the hour at which the cron is set to run is 3 a.m. (the default), it will first run the next day at 3am, and then | |
* every day thereafter at 3 a.m. If this default hour doesn't suit, you can change it using a WordPress filter. | |
* |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* You may automatically add any WordPress site to your iControlWP account by using the "code run" | |
* or "code snippets" feature in ManageWP. | |
* | |
* Please follow these steps: | |
* | |
* 1) Install and activate the iControlWP plugin on your WordPress site. | |
* 2) Grab your "AUTHENTICATION_KEY" from your iControlWP account: | |
* - https://app.icontrolwp.com/profile/preferences |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress (5.6+) allows the use of Application Passwords when authenticating logins. | |
* However, only certain requests are considered to be requests from an "Application". Officially, these are | |
* XML-RPC and REST API requests. | |
* | |
* However, you may customize this to ensure that authenticated requests from your service | |
* (if they don't use XML-PRC/RESTAPI) are put through the appropriate authentication process. | |
* | |
* To achieve this, you make use of the filter: application_password_is_api_request |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The plugin badge array has 5 attributes represented by the following keys: | |
* name, url, logo, protected_by, custom_css | |
* | |
* This filter is only available is the plugin is activated for ShieldPRO. | |
* | |
* You may also use your Whitelabel settings to overwrite many of the defaults: | |
* See: https://icontrolwp.freshdesk.com/support/solutions/articles/3000078466 |
NewerOlder