=== NEO Bootstrap Carousel ===
Contributors: pixelspress, mohsinrafique
Donate link: https://pixelspress.com
Tags: carousel, bootstrap carousel, wordpress slider, responsive slider, slideshow
Requires at least: 4.8
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.6.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight, production-ready WordPress slider plugin built on the Bootstrap 3 carousel framework with Media Library and dynamic post-based slide sources.

== Description ==

NEO Bootstrap Carousel is a lightweight, production-ready WordPress slider plugin built on the Bootstrap 3 carousel framework. Create unlimited, fully responsive image slideshows or dynamic post-based carousels and embed them anywhere on your site with a simple shortcode or Gutenberg block.

Originally built by [PixelsPress](https://pixelspress.com), NEO Bootstrap Carousel is developed and maintained by [Mohsin Rafique](https://mohsinrafique.com), a seasoned WordPress and PHP engineer. The plugin is trusted by thousands of WordPress sites worldwide for its simplicity, reliability, and performance.

[Online Demo](https://pixelspress.com)

= Why NEO Bootstrap Carousel? =

Most slider plugins are bloated, slow, and overly complex. NEO Bootstrap Carousel takes a different approach: deliver a fast, accessible, and standards-compliant carousel using the battle-tested Bootstrap framework.

* **Lightweight** — No jQuery UI, no bloated libraries, just Bootstrap + Animate.css
* **Zero configuration** — Install, add slides, paste shortcode, live in under 2 minutes
* **Two slide sources** — Media Library images or dynamic WordPress posts
* **Gutenberg ready** — Native block editor support, no shortcode memorisation needed
* **Theme-agnostic** — Works with any WordPress theme, Bootstrap or otherwise
* **PHP 8.4 ready** — Fully tested on PHP 8.4 with strict type safety
* **WordPress 7.0 compatible** — jQuery 4.0 compatibility shims included
* **Touch-enabled** — Swipe navigation on mobile via bundled Hammer.js touch carousel
* **Accessible** — Keyboard navigation, ARIA roles, screen reader labels

= Slide Sources =

**Media Library** — Upload and manage slides directly from the WordPress Media Library with drag-and-drop ordering.

**WordPress Posts** — Automatically pull slides from your published posts with featured images:

* Most Recent — Latest 3 published posts
* Most Popular — Top 3 posts by comment count
* Sticky Posts — WordPress sticky posts
* Random — 3 randomly selected posts
* Specific Category — Posts from a chosen category
* AJAX-powered live reload when switching post sources (no page refresh needed)

= Slide Customisation =

* Title and Caption per slide (editable from the admin panel)
* Caption Animations powered by Animate.css (30+ animation styles)
* Dark or Light Overlay per slide with adjustable opacity (5% to 100%)
* Custom URL per slide — link slides to any internal or external page
* Drag-and-drop reordering of slides within the admin panel

= Navigation and Controls =

* Arrow Navigation (Previous / Next) — toggle on or off globally
* Indicator Dots (bullet navigation) — toggle on or off globally
* Keyboard Navigation — Left/Right arrow keys to navigate slides
* Touch/Swipe Support — Native swipe gestures on mobile and tablet devices
* Auto-play with configurable interval (default: 5 seconds)
* Pause on Hover — carousel pauses when the mouse hovers over it
* Wrap Mode — enable or disable infinite looping of slides

= Integration =

* Shortcode: `[neo_carousel_shortcode id="123"]`
* Gutenberg Block: NEO Bootstrap Carousel block with visual dropdown selector
* PHP Template Tag: `<?php echo do_shortcode('[neo_carousel_shortcode id="123"]'); ?>`
* Multiple carousels per page supported

= Settings =

* **General Settings** — Toggle captions, arrows, and indicator controls globally
* **Design Settings** — Choose from 30+ Animate.css animation styles for captions
* **Advanced Settings** — Show or hide carousel content on mobile devices

= Credits =

* [Twitter Bootstrap](https://getbootstrap.com/) — Carousel framework by @mdo and @fat
* [Animate.css](https://animate.style/) — CSS animations by Daniel Eden
* [Hammer.js](https://hammerjs.github.io/) — Touch gesture recognition
* [Select2](https://select2.org/) — Enhanced select dropdowns

= Translators =

Please contribute to translate our plugin. Contact at `mohsin.rafique@gmail.com`.

== Installation ==

= Automatic installation (Recommended) =

1. Log in to your WordPress admin panel.
2. Navigate to **Plugins > Add New**.
3. Search for **NEO Bootstrap Carousel**.
4. Click **Install Now**, then **Activate**.
5. Go to **NEO Bootstrap Carousel > Sliders** to create your first carousel.

= Manual installation =

1. Download the plugin ZIP from the [WordPress Plugin Directory](https://wordpress.org/plugins/neo-bootstrap-carousel/).
2. Extract and upload the `neo-bootstrap-carousel` folder to `/wp-content/plugins/`.
3. Activate the plugin from **Plugins** in your WordPress admin panel.
4. Navigate to **NEO Bootstrap Carousel > Sliders** to get started.

= Getting started =

After activating the plugin, navigate to **NEO Bootstrap Carousel** in the WordPress admin sidebar. You will see the Welcome page with three quick-start boxes:

1. **Add New Slider** — Takes you directly to the slider editor
2. **Configure General Settings** — Set up caption, arrow, and indicator visibility
3. **Configure Design Settings** — Choose a caption animation style

= Creating a Media Slider =

A Media slider uses images from the WordPress Media Library. You have full control over each slide's title, caption, overlay, and destination URL.

1. Go to **NEO Bootstrap Carousel > Sliders > Add Slider**.
2. Enter a title for your slider (e.g., "Homepage Banner").
3. Under "Choose Slide Source", select **Media**.
4. Click the **Add Slide to Slider** link to open the Media Library.
5. Select one or more images, then click **Add to Slider**.
6. For each slide, configure:
   * **Title** — The headline text displayed on the slide
   * **Description** — The caption text displayed below the title
   * **URL** — Link the slide to any internal page or external URL
   * **Alt Text** — Alternative text for accessibility and SEO
   * **Overlay** — Choose Dark or Light to add a colour overlay on the slide image
   * **Overlay Opacity** — Set the overlay transparency from 5% to 100% (in 5% increments)
7. Drag and drop slides to reorder them — the order in the admin panel matches the order on the frontend.
8. Click **Publish** (or **Update** for existing sliders).

After publishing, the Shortcode meta box on the right sidebar displays the shortcode for this slider.

= Creating a Posts Slider =

A Posts slider automatically pulls slides from your published WordPress posts using their featured images. The carousel updates automatically as your content changes.

1. Go to **NEO Bootstrap Carousel > Sliders > Add Slider**.
2. Enter a title for your slider (e.g., "Latest Blog Posts").
3. Under "Choose Slide Source", select **Posts**.
4. In the **Post to Show** dropdown, choose one of five options:
   * **Most Recent** — The 3 most recently published posts
   * **Most Popular** — The 3 posts with the highest comment count
   * **Sticky Posts** — All posts marked as "Sticky" in WordPress
   * **Random** — 3 randomly selected posts (changes on each page load)
   * **Specific Category** — Posts from a specific category you select
5. If you select "Specific Category", a second dropdown appears where you can choose the category.
6. The slide preview updates automatically via AJAX when you change the Post to Show option — no page refresh needed.
7. Click **Publish**.

Note: Posts must have a **Featured Image** set to appear as slides. Posts without a featured image are skipped.

= Embedding a Slider =

Once a slider is published, you can embed it anywhere on your site using one of three methods.

**Shortcode (Classic Editor or any page/post):**

Copy the shortcode from the Shortcode meta box on the slider edit screen, or find it in the Sliders list view.

`[neo_carousel_shortcode id="123"]`

Replace 123 with your slider's post ID. You can also customise behaviour:

`[neo_carousel_shortcode id="123" interval="3000" wrap="true"]`

Shortcode attributes:

* `id` (required) — The slider post ID
* `interval` — Auto-play interval in milliseconds (default: 5000)
* `pause` — Bootstrap pause option (default: null)
* `wrap` — Enable infinite slide looping (default: true)

**Gutenberg Block (Block Editor):**

1. In the page or post editor, click the + button to add a new block.
2. Search for **NEO Bootstrap Carousel**.
3. Add the block to your content area.
4. In the block inspector (right sidebar), select your slider from the dropdown list.

**PHP Template Tag:**

For theme developers who want to embed a carousel directly in a theme template file:

`<?php echo do_shortcode( '[neo_carousel_shortcode id="123"]' ); ?>`

This works in any PHP template file: header.php, front-page.php, page.php, sidebar templates, and widget areas.

= Configuring Settings =

Navigate to **NEO Bootstrap Carousel > Settings** to configure global carousel behaviour. Settings are organised into three tabs.

**General Settings** — Controls the visibility of carousel UI elements across all sliders:

* **Show Caption** — Display the title and caption text on slides (default: On)
* **Show Arrows** — Display the Previous / Next arrow controls (default: On)
* **Show Controls** — Display the indicator dots below the slides (default: Off)

**Design Settings** — Choose from 30+ Animate.css animation styles for slide captions:

* Attention Seekers: bounce, flash, pulse, rubberBand, shake, swing, tada, wobble, jello
* Bouncing: bounceIn, bounceInDown, bounceInLeft, bounceInRight, bounceInUp
* Fading: fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp
* Flipping: flipInX, flipInY
* Rotating: rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight
* Sliding: slideInUp, slideInDown, slideInLeft, slideInRight
* Zooming: zoomIn, zoomInDown, zoomInLeft, zoomInRight, zoomInUp
* Specials: lightSpeedIn, rollIn

**Advanced Settings:**

* **Show Content on Mobile** — Toggle visibility of slide title and caption on small screens (default: On). When disabled, only the slide image is shown on mobile devices.

== Frequently Asked Questions ==

= Is NEO Bootstrap Carousel responsive? =

Yes. The carousel is fully responsive and adapts to all screen sizes including mobile devices and tablets. Touch/swipe navigation is enabled automatically on touch devices.

= Does it work with non-Bootstrap themes? =

Yes. The plugin bundles its own carousel CSS, so it works with any WordPress theme. Bootstrap-based themes benefit from native styling integration.

= Can I have multiple carousels on the same page? =

Yes. Each carousel uses a unique ID, so you can embed as many carousels as needed on a single page using separate shortcodes or Gutenberg blocks.

= How do I create a Media slider? =

Go to **NEO Bootstrap Carousel > Sliders > Add Slider**, select "Media" as the slide source, then click "Add Slide to Slider" to pick images from your Media Library. Configure title, caption, overlay, and URL for each slide, then publish.

= How do I create a Posts slider? =

Go to **NEO Bootstrap Carousel > Sliders > Add Slider**, select "Posts" as the slide source, then choose a Post to Show option: Most Recent, Most Popular, Sticky Posts, Random, or Specific Category. Posts must have a Featured Image set to appear as slides.

= How do I embed a slider in a page or post? =

Three ways: (1) Paste the shortcode `[neo_carousel_shortcode id="123"]` in the Classic Editor. (2) Add the NEO Bootstrap Carousel Gutenberg block and select your slider. (3) Use `<?php echo do_shortcode('[neo_carousel_shortcode id="123"]'); ?>` in a PHP template file.

= How do I change the slide order? =

When editing a slider with Media source, simply drag and drop the slides to reorder them in the admin panel.

= Can I link slides to other pages? =

Yes. When using Media source, each slide has a URL field where you can enter any internal or external URL. When using Posts source, slides automatically link to their respective post permalinks.

= How do I change the animation style? =

Go to **NEO Bootstrap Carousel > Settings > Design** and choose from 30+ Animate.css animation styles for your caption animations.

= How do I hide captions on mobile? =

Go to **NEO Bootstrap Carousel > Settings > Advanced** and toggle the "Show Content on Mobile" option off.

= Can I add a carousel to a theme template? =

Yes. Use the PHP template tag `<?php echo do_shortcode('[neo_carousel_shortcode id="123"]'); ?>` in any theme template file such as header.php, front-page.php, or a custom page template.

= How do I report bugs or suggest features? =

Email [mohsin.rafique@gmail.com](mailto:mohsin.rafique@gmail.com) or open a thread on the [WordPress support forum](https://wordpress.org/support/plugin/neo-bootstrap-carousel/).

== Changelog ==

= 1.6.0 - 2026-05-24 =
* Feature: Lazy loading for slide images — only the first slide loads immediately, remaining slides load on-demand during transition
* Feature: Post to Show options — Most Popular, Sticky Posts, Random, Specific Category (with AJAX reload)
* Compat: WordPress 7.0 and jQuery 4.0 compatibility verified
* Fix: Overlay and Overlay Opacity settings not saving (PHP 8 strict type comparison with pipe-delimited data)
* Fix: Inline script block moved to wp_add_inline_script() (HTML5 best practice, removes CDATA wrapping)
* Fix: jQuery 4.0 compatibility shims added — $.proxy, $.support.transition, $.fn.emulateTransitionEnd polyfilled
* Fix: jQuery 4.0 compatibility shim added to Select2 for deprecated $.isFunction, $.isArray, $.trim
* Fix: jQuery version gate removed from bundled Bootstrap carousel JS (allows jQuery 4+)
* Fix: Implicit nullable type parameter fixed for PHP 8.4 (shortcode $content)
* Fix: Loose equality (==) replaced with strict (===) in admin JS
* Fix: filter_input(INPUT_GET) replaced with $_GET + sanitize_text_field() in 5 admin files
* Fix: Caption animation function moved from inline script to main JS file (nbcDoAnimations)
* Fix: Template uses require instead of require_once (supports multiple carousels per page)
* Fix: Neo_Bootstrap_Carousel_i18n class renamed to Neo_Bootstrap_Carousel_I18n (PSR naming)
* Fix: WordPress global $post_id override resolved in post-display meta box partial
* Fix: Undefined variable warnings resolved with @var annotations across all template partials
* Fix: WPCS compliance improvements across 15+ files (sanitization, escaping, alignment, formatting)
* Fix: PHPDoc parse error and post-increment corrected in settings tab menu filter
* Fix: Share The Love SVG icons not visible on Welcome page (CSS overflow/positioning fix)
* Refactor: Changelog admin page now reads from README.txt (single source of truth)
* Refactor: Help/FAQ admin page now reads from README.txt (single source of truth)
* Feature: System Requirements page — added PHP version, WordPress version, plugin version, max execution time, and GD/Imagick checks
* Tweak: README.txt Tested up to updated to 7.0

= 1.5.1 - 2026-04-08 =
* Fix: Next/Previous arrow navigation not working due to touch carousel removing Bootstrap data-API click handler
* Fix: Clicking arrow controls was appending carousel ID as URL hash
* Fix: License header corrected to GPL-2.0-or-later (consistent with LICENSE.txt)

= 1.5.0 - 2026-04-07 =
* Compatibility: WordPress 6.9 and PHP 8.4 verified
* Fix: $(window).load() replaced with $(window).on('load') for jQuery 3.x compatibility
* Fix: flush_rewrite_rules() removed from init hook (was running on every page load)
* Fix: filter_input_array() second argument added to resolve PHP 8.1 deprecation
* Fix: wp-editor Gutenberg block dependency replaced with wp-block-editor (deprecated WP 5.8+)
* Fix: Block editor script dependencies removed from public page enqueue
* Fix: wp_get_attachment_url() extra argument removed (function only accepts 1 param)
* Fix: Null-safety check added for wp_get_attachment_image_src() return value
* Fix: wp_safe_redirect() now followed by exit for correct redirect behaviour
* Fix: nbc_shortcode() now returns empty string instead of null when no slides found
* Fix: Slide overlay inline style value is now properly escaped
* Fix: Gutenberg render callback moved into class as static method (coding standards)
* Fix: Hardcoded plugin version in default_configurations() replaced with VERSION constant
* Tweak: README.txt headers updated (Tested up to: 6.9, Requires PHP: 8.0)

= 1.4.3 - 2020-04-30 =
* Note: Overall code improvements using WordPress Coding Standards

= 1.4.2 - 2019-11-04 =
* Feature: Added Gutenberg Block
* Note: Improved code.

= 1.4.1 - 2019-03-13 =
* Note: Used CDATA inside JavaScript Tag
* Fix: Resolve caption keep showing on slider even when it is disabled from settings panel

= 1.4.0 - 2019-03-13 =
* Tweak: Improved Admin UI/UX
* Note: PHP 7.2 compatible
* Fix - Hide empty elements of carousel If no slider is define

= 1.3.2 - 2018-06-19 =
* Fix - When hide display navigation, It hide direction arrows too which is fixed now
* Fix - Slide URL label was wrong, when adding a new slide. It is fixed now.

= 1.3.1 - 2017-11-08 =
* Fix - Resolved plugin carousel height conflict with Bootstrap based themes.

= 1.3 - 2017-11-08 =
* Feature - You can add 3 recent posts
* Feature - Added a link field in media slides to link slides to internal/external pages/posts.
* Note - Structure Improvement.
* Note - CSS Improvement for better loading speed.
* Note - At activation hook, defined the default settings of the plugin
* Note - Removed pause slide

= 1.2.1 - 2016-12-30 =
* Note - Security implemented.
* Fix - Resolved Delete Slide bug

= 1.2.0 - 2016-10-30 =
* Feature - Added Slide Overlay with Opacity Control Attribute
* Feature - Added Less Files
* Tweak - Complete structure revised.
* Fix - Resolved the unsaved title & description content bug.

= 1.1.2 =
* Fix - Undefined variable version and plugin name in class class-neo-bootstrap-carousel-shortcode.php

= 1.1.1 - 2016-08-27 =
* Feature - Added More Animations to Caption & Description

= 1.1.0 - 2016-08-08 =
* Feature - Added Animations to Caption & Description
* Tweak - Changed Slider Content Area Layout at Admin Panel

= 1.0.0 - 2016-07-30 =
* Initial version

== Screenshots ==

1. **Welcome Page** — Getting started guide with quick links to create and configure sliders
2. **Add Slider** — Add new slides from the WordPress Media Library
3. **Slide Editor** — Configure title, caption, overlay, and URL per slide
4. **Media Slides** — Drag-and-drop ordering with overlay controls
5. **Post Slides** — Automatic slides from recent, popular, or category posts
6. **Settings** — General, Design, and Advanced settings tabs
7. **Sliders List** — All sliders at a glance with shortcodes
8. **Frontend Demo** — Responsive carousel with title and caption

== Upgrade Notice ==

= 1.6.0 =
Lazy loading for slide images, single-source-of-truth admin pages (Changelog and Help read from README.txt), expanded System Requirements checks, WordPress 7.0 and jQuery 4.0 compatibility, new Post to Show options, and WPCS compliance improvements.

= 1.4.0 =
1.4.0 is an important update to ensure NEO Bootstrap Carousel works smoothly.
