{"id":120205,"date":"2020-04-21T05:19:44","date_gmt":"2020-04-21T05:19:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/bootstrap-banner\/"},"modified":"2020-04-21T05:19:44","modified_gmt":"2020-04-21T05:19:44","slug":"global-bootstrap-banner","status":"publish","type":"plugin","link":"https:\/\/hat.wordpress.org\/plugins\/global-bootstrap-banner\/","author":7113693,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"1.0","tested":"5.4.19","requires":"5.0","requires_php":"5.2.4","requires_plugins":"","header_name":"Global Bootstrap Banner","header_author":"Phil Ewels","header_description":"A Wordpress Customiser Widget to add a global website banner, styled using a Bootstrap Alert.","assets_banners_color":"d0e4fe","last_updated":"2020-04-21 05:19:44","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.phil.ewels.co.uk\/","header_plugin_uri":"http:\/\/www.github.com\/ewels\/global-bootstrap-banner\/","header_author_uri":"http:\/\/phil.ewels.co.uk","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1043,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"2288045","resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"2288045","resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":"2288045","resolution":"","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"2288032","resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"2288032","resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2288032","resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"2288032","resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"2288032","resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"Customizer interface showing an alert with most of the default settings.","2":"Alert with minimal input and no dismiss button.","3":"Example using custom classes and tweaks to the output style."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2566,784,728],"plugin_category":[],"plugin_contributors":[78885],"plugin_business_model":[],"class_list":["post-120205","plugin","type-plugin","status-publish","hentry","plugin_tags-alert","plugin_tags-banner","plugin_tags-bootstrap","plugin_contributors-tallphil","plugin_committers-tallphil"],"banners":{"banner":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/banner-772x250.png?rev=2288032","banner_2x":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/banner-1544x500.png?rev=2288032","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/icon.svg?rev=2288045","icon":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/icon.svg?rev=2288045","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/screenshot-1.png?rev=2288032","caption":"Customizer interface showing an alert with most of the default settings."},{"src":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/screenshot-2.png?rev=2288032","caption":"Alert with minimal input and no dismiss button."},{"src":"https:\/\/ps.w.org\/global-bootstrap-banner\/assets\/screenshot-3.png?rev=2288032","caption":"Example using custom classes and tweaks to the output style."}],"raw_content":"<!--section=description-->\n<p>A WordPress Customise Widget to add a global website banner, styled using a <a href=\"https:\/\/getbootstrap.com\/docs\/4.4\/components\/alerts\/\">Bootstrap alert box<\/a>.<\/p>\n\n<p>The plugin assumes that you're already using Bootstrap, so you need to load the Bootstrap javascript and CSS separately.<\/p>\n\n<ul>\n<li><a href=\"http:\/\/getbootstrap.com\/\">Download Twitter Bootstrap<\/a><\/li>\n<li><a href=\"http:\/\/www.bootstrapcdn.com\/\">Bootstrap CDN<\/a> <em>(directly link CSS and javascript files)<\/em><\/li>\n<li><a href=\"https:\/\/getbootstrap.com\/docs\/4.4\/components\/alerts\/\">Bootstrap Alerts in action<\/a><\/li>\n<\/ul>\n\n<p>Once installed, you can add the alert to the correct location in your theme (for example, in <code>header.php<\/code> with the <code>global_bootstrap_banner()<\/code> function.\nFor example:<\/p>\n\n<pre><code>if (function_exists('global_bootstrap_banner')){\n    echo global_bootstrap_banner();\n}\n<\/code><\/pre>\n\n<p>If you prefer, you can use a shortcode instead:<\/p>\n\n<pre><code>[global-bootstrap-banner]\n<\/code><\/pre>\n\n<h4>Shortcode Options<\/h4>\n\n<p>The plugin works best when using the Customizer interface. However, if you wish you can use a shortcode and override most fields.<\/p>\n\n<ul>\n<li><code>enabled<\/code> <em>(default <code>true<\/code>)<\/em>\n\n<ul>\n<li>Whether to show the banner or not.<\/li>\n<\/ul><\/li>\n<li><code>colour<\/code> <em>(default <code>alert-primary<\/code>)<\/em>\n\n<ul>\n<li>Bootstrap class to use for styling the alert.<\/li>\n<\/ul><\/li>\n<li><code>header_text<\/code>\n\n<ul>\n<li>Header - leave blank to skip the alert header.<\/li>\n<\/ul><\/li>\n<li><code>body_text<\/code>\n\n<ul>\n<li>Main text for the alert. You can use HTML.<\/li>\n<\/ul><\/li>\n<li><code>link_text<\/code>\n\n<ul>\n<li>Display text for a button at the bottom of the alert. Leave blank to skip.<\/li>\n<\/ul><\/li>\n<li><code>link_url<\/code>\n\n<ul>\n<li>URL for button to link to.<\/li>\n<\/ul><\/li>\n<li><code>link_class<\/code> <em>(default <code>btn-primary<\/code>)<\/em>\n\n<ul>\n<li>Bootstrap class to use for styling the button.<\/li>\n<\/ul><\/li>\n<li><code>link_new_window<\/code> <em>(default <code>false<\/code>)<\/em>\n\n<ul>\n<li>Whether to open the link in a new window or not.<\/li>\n<\/ul><\/li>\n<li><code>link_btn_lg<\/code> <em>(default <code>false<\/code>)<\/em>\n\n<ul>\n<li>Use the <code>btn-lg<\/code> class for the button (big button).<\/li>\n<\/ul><\/li>\n<li><code>link_btn_sm<\/code> <em>(default <code>false<\/code>)<\/em>\n\n<ul>\n<li>Use the <code>btn-sm<\/code> class for the button (small button).<\/li>\n<\/ul><\/li>\n<li><code>link_btn_block<\/code> <em>(default <code>false<\/code>)<\/em>\n\n<ul>\n<li>Use the <code>btn-block<\/code> class for the button (full width button).<\/li>\n<\/ul><\/li>\n<li><code>dismiss_btn<\/code> <em>(default <code>true<\/code>)<\/em>\n\n<ul>\n<li>Whether to show a dismiss button in the corner of the alert.<\/li>\n<\/ul><\/li>\n<li><code>dismiss_expiry<\/code> <em>(default <code>14<\/code>)<\/em>\n\n<ul>\n<li>How many days the dismissal cookie should last for before it is shown again.<\/li>\n<\/ul><\/li>\n<li><code>dismiss_id<\/code>\n\n<ul>\n<li>Random string to use for the dismissal cookie. Use a new one to force it to show for everyone.<\/li>\n<\/ul><\/li>\n<li><code>alert_before<\/code> <em>(default <code>&lt;div class=\"global-bootstrap-banner container\"&gt;<\/code>)<\/em>\n\n<ul>\n<li>HTML to use before the alert.<\/li>\n<\/ul><\/li>\n<li><code>alert_after<\/code> <em>(default <code>&lt;\/div&gt;<\/code>)<\/em>\n\n<ul>\n<li>HTML to use after the alert.<\/li>\n<\/ul><\/li>\n<li><code>header_before<\/code> <em>(default <code>&lt;h4 class=\"global-bootstrap-banner-heading alert-heading\"&gt;<\/code>)<\/em>\n\n<ul>\n<li>HTML to use before the heading.<\/li>\n<\/ul><\/li>\n<li><code>header_after<\/code> <em>(default <code>&lt;\/h4&gt;<\/code>)<\/em>\n\n<ul>\n<li>HTML to use after the heading.<\/li>\n<\/ul><\/li>\n<li><code>link_before<\/code> <em>(default <code>&lt;p class=\"global-bootstrap-banner-btn-p mb-0\"&gt;<\/code>)<\/em>\n\n<ul>\n<li>HTML to use before the button.<\/li>\n<\/ul><\/li>\n<li><code>link_after<\/code> <em>(default <code>&lt;\/p&gt;<\/code>)<\/em>\n\n<ul>\n<li>HTML to use after the button.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>For example, a simple shortcode usage would be:<\/p>\n\n<pre><code>[global-bootstrap-banner body_text=\"This alert says something different\"]\n<\/code><\/pre>\n\n<p>Note that the shortcode first takes the settings from the Customizer and then overwrites these.\nSo the above shortcode would show a header if it is set in the Customizer settings.<\/p>\n\n<h4>Credits<\/h4>\n\n<p>This plugin was written by <a href=\"https:\/\/github.com\/ewels\">@ewels<\/a>.<\/p>\n\n<h4>Contributing<\/h4>\n\n<p>If you would like to contribute to this plugin, please go to the <a href=\"https:\/\/github.com\/ewels\/global-bootstrap-banner\">GitHub repository<\/a> 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.<\/p>\n\n<!--section=installation-->\n<h4>The easy way<\/h4>\n\n<ol>\n<li>Go to the Plugins Menu in WordPress<\/li>\n<li>Search for \"Boostrap Banner\"<\/li>\n<li>Click 'Install'<\/li>\n<li>Activate the plugin<\/li>\n<\/ol>\n\n<h4>Manual Installation<\/h4>\n\n<ol>\n<li>Download the plugin file from this page and unzip the contents<\/li>\n<li>Upload the <code>global-bootstrap-banner<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the <code>global-bootstrap-banner<\/code> plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<h4>Once Activated<\/h4>\n\n<ol>\n<li>Make sure that your theme is loading <a href=\"http:\/\/www.getbootstrap.com\">Bootstrap<\/a> CSS and Carousel javascript<\/li>\n<li>Add <code>echo global_bootstrap_banner();<\/code> to your theme or use the [global-bootstrap-banner] shortcode<\/li>\n<li>Open the Customizer (Appearance &gt; Customize, or Customize in the admin bar)<\/li>\n<li>Click \"Banner Message\" and add some content<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Add a global website banner using a Bootstrap alert box.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/120205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=120205"}],"author":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/tallphil"}],"wp:attachment":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=120205"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=120205"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=120205"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=120205"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=120205"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=120205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}