WordPress plugin intelligence profile

Global Bootstrap Banner

Add a global website banner using a Bootstrap alert box.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 5.4
Current version1.0
WordPress coverageTested up to WordPress 5.4
Minimum stackWP 5.0 · PHP 5.2.4
Directory statusactive
Last directory update21 Apr 20206y ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Global Bootstrap Banner version 1.0 as active, updated 6y ago and tested up to WordPress 5.4.

Overview

About this plugin

A WordPress Customise Widget to add a global website banner, styled using a Bootstrap alert box.

The plugin assumes that you’re already using Bootstrap, so you need to load the Bootstrap javascript and CSS separately.

  • Download Twitter Bootstrap
  • Bootstrap CDN (directly link CSS and javascript files)
  • Bootstrap Alerts in action

php with the global_bootstrap_banner() function.

For example:

if (function_exists('global_bootstrap_banner')){ echo global_bootstrap_banner(); }

If you prefer, you can use a shortcode instead:

[global-bootstrap-banner]

Shortcode Options

The plugin works best when using the Customizer interface. However, if you wish you can use a shortcode and override most fields.

  • enabled (default true )
  • Whether to show the banner or not.
  • colour (default alert-primary )
  • Bootstrap class to use for styling the alert.
  • header_text
  • Header – leave blank to skip the alert header.
  • body_text
  • Main text for the alert. You can use HTML.
  • link_text
  • Display text for a button at the bottom of the alert. Leave blank to skip.
  • link_url
  • URL for button to link to.
  • link_class (default btn-primary )
  • Bootstrap class to use for styling the button.
  • link_new_window (default false )
  • Whether to open the link in a new window or not.
  • link_btn_lg (default false )
  • Use the btn-lg class for the button (big button).
  • link_btn_sm (default false )
  • Use the btn-sm class for the button (small button).
  • link_btn_block (default false )
  • Use the btn-block class for the button (full width button).
  • dismiss_btn (default true )
  • Whether to show a dismiss button in the corner of the alert.
  • dismiss_expiry (default 14 )
  • How many days the dismissal cookie should last for before it is shown again.
  • dismiss_id
  • Random string to use for the dismissal cookie. Use a new one to force it to show for everyone.
  • alert_before (default <div class="global-bootstrap-banner container"> )
  • HTML to use before the alert.
  • alert_after (default </div> )
  • HTML to use after the alert.
  • header_before (default <h4 class="global-bootstrap-banner-heading alert-heading"> )
  • HTML to use before the heading.
  • header_after (default </h4> )
  • HTML to use after the heading.
  • link_before (default <p class="global-bootstrap-banner-btn-p mb-0"> )
  • HTML to use before the button.
  • link_after (default </p> )
  • HTML to use after the button.

For example, a simple shortcode usage would be:

[global-bootstrap-banner body_text="This alert says something different"]

Note that the shortcode first takes the settings from the Customizer and then overwrites these.

So the above shortcode would show a header if it is set in the Customizer settings.

Credits

This plugin was written by @ewels.

Contributing

If you would like to contribute to this plugin, please go to the GitHub repository and make a personal fork of the development version. You can then make your changes and submit a pull request. I will happily review the code and then merge when we’re both happy.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • alert
  • banner
  • bootstrap
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 5.4

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 5.4.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to5.4
Minimum requirementsWordPress 5.0 · PHP 5.2.4
Update activity21 Apr 20206y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.