=== Sticky CTA Button ===
Contributors: desk9
Tags: button, sticky, back-to-top, floating, cta
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Configurable sticky CTA buttons with an optional second button, a responsive mobile/tablet action bar and back-to-top functionality.

== Description ==

Sticky CTA Button adds customizable floating Call-to-Action buttons and a back-to-top button to your website. Version 2.0 introduces a **second CTA button** and a **responsive mobile/tablet action bar** that pins your buttons to the edge of the screen on smaller devices.

Everything is configured from a clean, tabbed settings screen with a native WordPress color picker and a live preview.

= Features =

* **Two CTA buttons** – Configure a primary and an optional second call-to-action, each with its own text, icon, link, target and colors.
* **Back-to-Top button** – Smooth scrolling back to the top with selectable icons.
* **Responsive mobile action bar** – On phones and tablets the CTAs turn into a full-width bar pinned to the bottom (or top) edge of the screen, while the back-to-top button floats above it. The activation breakpoint (phones, tablets or small laptops) is selectable.
* **Flexible desktop layout** – Stack the buttons vertically or place them side by side, anchored to any of 8 screen positions with custom offsets.
* **Display behavior** – Show the buttons immediately or reveal them after the visitor scrolls down.
* **Styling** – Optional custom corner radius; lightweight emoji-based icons with no external font dependency.
* **Tabbed, professional settings** – Organized into Buttons, Position & Layout, Mobile Bar and Styling, with a live preview and the native WordPress color picker.
* **Accessibility** – Real button element for back-to-top, keyboard focus styles, reduced-motion and high-contrast support.
* **Performance** – Dependency-free vanilla JavaScript with throttled scroll handling; assets load only when a button is enabled.
* **Translation ready** – All strings are translatable via the `sticky-cta-button` text domain.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/sticky-cta-button` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to Settings → Sticky CTA Button to configure the buttons.

== Frequently Asked Questions ==

= Can I show two call-to-action buttons? =

Yes. Enable the primary button, then enable the secondary button under the Buttons tab. Each button has its own text, icon, link and colors.

= How does the mobile action bar work? =

Enable it under the Mobile Bar tab. Below the chosen screen width, your CTA buttons become a full-width bar pinned to the bottom (or top) edge of the screen. The back-to-top button floats just above the bar. On desktop the buttons keep their normal floating position.

= Do I need Font Awesome? =

No. The plugin ships with lightweight emoji/Unicode icons, so there is no external font to load.

= Is the plugin mobile-friendly? =

Yes. Without the action bar, CTAs collapse to compact icon buttons on small screens. With the action bar enabled, they become an easy-to-tap full-width bar.

= Does it affect site performance? =

No. The plugin uses dependency-free JavaScript and only loads its assets when a button is enabled.

== Screenshots ==

1. Tabbed settings page with live preview and color picker
2. Primary and secondary CTA buttons on desktop
3. Responsive mobile action bar pinned to the bottom edge
4. Back-to-top button

== Changelog ==

= 2.0.0 =
* New: Optional second CTA button with independent text, icon, link, target and colors.
* New: Responsive mobile/tablet action bar with selectable edge (bottom/top) and breakpoint.
* New: Tabbed settings screen with live preview and the native WordPress color picker.
* New: "Settings" shortcut link on the plugins list; uninstall cleanup of options.
* Improvement: Full internationalization (i18n) of all admin strings.
* Improvement: Dependency-free vanilla JavaScript frontend with throttled scroll handling.
* Improvement: Stricter sanitization (whitelisted positions, targets, layouts, icons).
* Fix: Admin layout/order fields were permanently hidden due to a stale toggle referencing a removed option.
* Fix: Removed dead code and an invalid nested keyframes rule in the reduced-motion stylesheet.
* Compatibility: Tested up to WordPress 7.0.

= 1.0.0 =
* Initial release
* Action button functionality
* Back-to-top button functionality
* Automatic button combination
* Full customization options
* Responsive design
* Accessibility features

== Upgrade Notice ==

= 2.0.0 =
Adds a second CTA button, a responsive mobile action bar and a redesigned tabbed settings screen. Tested up to WordPress 7.0.
