-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwpscb.php
More file actions
44 lines (37 loc) · 1.53 KB
/
wpscb.php
File metadata and controls
44 lines (37 loc) · 1.53 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
<?php
/**
* Plugin Name: Social Chat Buttons
* Plugin URI: https://whitestudio.team/plugins/social-chat-buttons/
* Description: Add a beautiful floating chat widget to connect with visitors through WhatsApp, Telegram, Instagram, and 15+ social networks. Features smart scheduling, custom styling, and mobile optimization.
* Version: 1.0.3
* Author: whitestudio
* Author URI: https://whitestudio.team/plugins/social-chat-buttons/
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: social-chat-buttons
* Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
define( 'WPSCB_VERSION', '0.1.9' );
define( 'WPSCB_PLUGIN_FILE', __FILE__ );
define( 'WPSCB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'WPSCB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'WPSCB_OPTION_CONTACTS', 'wpscb_contacts' );
define( 'WPSCB_OPTION_SETTINGS', 'wpscb_settings' );
// Autoload core classes.
require_once WPSCB_PLUGIN_DIR . 'includes/class-wpscb.php';
// Initialize core singleton.
WPSCB::instance();
function wpscb_activate() {
if ( get_option( WPSCB_OPTION_SETTINGS ) === false ) {
update_option( WPSCB_OPTION_SETTINGS, array( 'enabled' => 1, 'position' => 'right' ) );
}
if ( get_option( WPSCB_OPTION_CONTACTS ) === false ) {
update_option( WPSCB_OPTION_CONTACTS, array() );
}
}
register_activation_hook( __FILE__, 'wpscb_activate' );
function wpscb_deactivate() {
// No cleanup on deactivate; options retained.
}
register_deactivation_hook( __FILE__, 'wpscb_deactivate' );