Skip to content

Instantly share code, notes, and snippets.

Created November 3, 2020 14:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Customise the contents and styles of Shield Security Plugin Badge
* 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:
add_filter( 'icwp_shield_plugin_badge_attributes', function ( $badgeAttributes, $isFloating ) {
* Set the text to replace "This site is protected by Shield."
$badgeAttributes[ 'protected_by' ] = 'Shield is keeping you safe';
* Add custom CSS - e.g. set the background colour to yellow
$badgeAttributes[ 'custom_css' ] = '#icwpWpsfSiteBadge{ background-color: yellow; }';
// ALWAYS return $badgeAttributes.
return $badgeAttributes;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment