-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuttonflow.php
More file actions
58 lines (52 loc) · 1.47 KB
/
buttonflow.php
File metadata and controls
58 lines (52 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* ButtonFlow - Sticky Floating Mobile Button for Call, Messaging & Booking
*
* @package ButtonFlow
* @author Ga Satrya
* @copyright 2026 Ga Satrya
* @license GPL-2.0-or-later
*
* @wordpress-plugin
* Plugin Name: ButtonFlow
* Plugin URI: https://www.ctaflow.com/plugins/buttonflow/
* Description: Add a permanent floating CTA button to your site on mobile. One tap to call, book, or message. Zero code required.
* Version: 1.1.0
* Requires at least: 6.5
* Requires PHP: 8.0
* Author: Ga Satrya
* Author URI: https://www.ctaflow.com/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: buttonflow
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit();
}
/**
* Manual PSR-4 Autoloader
*/
spl_autoload_register(
function ( $class_name ) {
$prefix = 'ButtonFlow\\';
$base_dir = __DIR__ . '/includes/';
$len = strlen( $prefix );
if ( 0 !== strncmp( $prefix, $class_name, $len ) ) {
return;
}
$relative_class = substr( $class_name, $len );
$file = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
if ( file_exists( $file ) ) {
require $file;
}
}
);
/**
* Initialize the plugin.
*/
function buttonflow_init() {
// Initialize the main plugin class.
\ButtonFlow\Core::get_instance();
}
add_action( 'plugins_loaded', 'buttonflow_init' );