GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gasatrya/buttonflow: WordPress plugin to add a permanent floating CTA button to your site on mobile. One tap to call, book, or message. Zero code required.

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.wordpress-org
.wordpress-org
 
 
assets
assets
 
 
includes
includes
 
 
languages
languages
 
 
.distignore
.distignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
buttonflow.php
buttonflow.php
 
 
composer.json
composer.json
 
 
phpcs.xml.dist
phpcs.xml.dist
 
 
readme.txt
readme.txt
 
 
uninstall.php
uninstall.php
 
 

Repository files navigation

ButtonFlow — Sticky Floating Mobile Button for Call, Messaging & Booking

ButtonFlow is a lightweight, performance-optimized WordPress plugin designed to add a sticky floating "Call to Action" (CTA) button to websites, specifically for mobile devices. It aims to solve "lead leaks" for local businesses by ensuring a primary contact action (Call, WhatsApp, Booking URL, or Smooth Scroll) is always within thumb-reach as a user scrolls.

🚀 Key Features

  • Click-to-Call — Tapping the button instantly dials your phone number.
  • WhatsApp Integration — Opens WhatsApp with a pre-filled, customizable message.
  • Booking & External URLs — Send visitors directly to your booking page or any external link.
  • Smooth Scroll — Scrolls the page to a specific section using an anchor ID (#contact).
  • Layout Options — Choose between a centered Floating button or a Sticky Full-Width bottom bar on mobile.
  • Live Preview — See exactly how your button looks in real-time as you edit settings in the admin dashboard.
  • Mobile-Only Display — Zero desktop bloat. Hidden on screens > 767px via CSS and JS dual-enforcement.
  • Page-Level Exclusion — Easily hide the button on specific pages using slugs or IDs.
  • Optional Dismiss Button — Enabled by default; visitors can hide the CTA for the current tab session.
  • Performance Optimized — Sub-5kb total asset size with zero external dependencies (No jQuery, No React).

🛠 Tech Stack

  • PHP: 8.0+ (Namespaced, Object-Oriented, Manual PSR-4 Autoloading).
  • WordPress: 6.5+ (Utilizes Settings API and Frontend Footer Injection).
  • JavaScript: Vanilla ES6 (Dependency-free for maximum performance).
  • CSS: Vanilla CSS3 (Flexbox for positioning, CSS variables for dynamic styling).
  • Composer: Used for development dependencies and quality control (PHPCS/WPCS).

🏗 Architecture & Directory Structure

The project follows a modular, object-oriented approach for clean separation of concerns.

  • buttonflow.php — Main plugin entry point and manual PSR-4 autoloader.
  • includes/ — Core logic and classes.
    • Core.php — Singleton coordinator that initializes Admin and Frontend components.
    • Admin/Settings.php — Handles the WordPress Settings API, sanitization, and the admin UI.
    • Frontend/Renderer.php — Manages frontend HTML injection and dynamic asset enqueuing.
  • assets/ — Frontend and Admin assets.
    • css/ — buttonflow.css (Floating button) and admin-settings.css.
    • js/ — buttonflow.js (Visibility logic) and admin-settings.js (Live preview).
  • languages/ — Translation files (.pot).

💻 Development Setup

Local Environment

Requires a local WordPress installation (e.g., LocalWP, Studio by WordPress.com).

# Clone the repository
git clone https://github.com/gasatrya/buttonflow.git

# Install development dependencies (PHPCS / WordPress Coding Standards)
composer install

Quality Control

This project strictly follows the WordPress Coding Standards (WPCS).

# Run linting check
composer run phpcs

# Fix auto-fixable errors
composer run phpcbf

📄 License

This project is licensed under the GPL-2.0-or-later License.

About

WordPress plugin to add a permanent floating CTA button to your site on mobile. One tap to call, book, or message. Zero code required.

gasatrya.com/wp-plugins/buttonflow/

Topics

wordpresswordpress-developmentwordpress-plugin

Resources

Readme
GPL-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.