이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Global Bootstrap Banner

설명

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.

Once installed, you can add the alert to the correct location in your theme (for example, in header.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.

스크린샷

  • Customizer interface showing an alert with most of the default settings.
  • Alert with minimal input and no dismiss button.
  • Example using custom classes and tweaks to the output style.

설치

The easy way

  1. Go to the Plugins Menu in WordPress
  2. Search for “Boostrap Banner”
  3. Click ‘Install’
  4. Activate the plugin

Manual Installation

  1. Download the plugin file from this page and unzip the contents
  2. Upload the global-bootstrap-banner folder to the /wp-content/plugins/ directory
  3. Activate the global-bootstrap-banner plugin through the ‘Plugins’ menu in WordPress

Once Activated

  1. Make sure that your theme is loading Bootstrap CSS and Carousel javascript
  2. Add echo global_bootstrap_banner(); to your theme or use the [global-bootstrap-banner] shortcode
  3. Open the Customizer (Appearance > Customize, or Customize in the admin bar)
  4. Click “Banner Message” and add some content

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“Global Bootstrap Banner”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Global Bootstrap Banner”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0

  • Initial release.