PluginProbe
Advanced Scrollbar – Give Your Site a Sleek Branded Scrolling Feel / 1.1.10
Advanced Scrollbar – Give Your Site a Sleek Branded Scrolling Feel v1.1.10
1.1.11 1.1.12 1.1.9 trunk 1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8
advanced-scrollbar / advanced-scrollbar.php

advanced-scrollbar.php in Advanced Scrollbar – Give Your Site a Sleek Branded Scrolling Feel 1.1.10, at advanced-scrollbar.php

112 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * Plugin Name: Advanced scrollbar
5 * Author URI: http://bplugins.com
6 * Description: Customize scrollbar of your website with unlimited styling and color using the plugin.
7 * Version: 1.1.10
8 * Author: bPlugins
9 * License: GPLv3
10 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11 * Text Domain: advanced-scrollbar
12 */
13 /*-------------------------------------------------------------------------------*/
14 /* Rendering all javaScript
15 /*-------------------------------------------------------------------------------*/
16 if ( function_exists( 'asb_fs' ) ) {
17 asb_fs()->set_basename( false, __FILE__ );
18 // asb_fs()->add_settings_page();
19 } else {
20 define( 'CSB_VERSION', ( isset( $_SERVER['HTTP_HOST'] ) && 'localhost' === $_SERVER['HTTP_HOST'] ? time() : '1.1.10' ) );
21 define( 'CSB_DIR_URL', plugin_dir_url( __FILE__ ) );
22 define( 'CSB_DIR_PATH', plugin_dir_path( __FILE__ ) );
23 define( 'CSB_HAS_FREE', 'advanced-scrollbar/plugin.php' === plugin_basename( __FILE__ ) );
24 define( 'CSB_HAS_PRO', 'advanced-scrollbar-pro/plugin.php' === plugin_basename( __FILE__ ) );
25 if ( !function_exists( 'asb_fs' ) ) {
26 function asb_fs() {
27 global $asb_fs;
28 if ( !isset( $asb_fs ) ) {
29 require_once dirname( __FILE__ ) . '/freemius/start.php';
30 $asb_fs = fs_dynamic_init( array(
31 'id' => '14870',
32 'slug' => 'advanced-scrollbar',
33 'premium_slug' => 'advanced-scrollbar-pro',
34 'type' => 'plugin',
35 'public_key' => 'pk_419d245dc8547a274d192990c096a',
36 'is_premium' => false,
37 'premium_suffix' => 'Pro',
38 'has_addons' => false,
39 'has_paid_plans' => true,
40 'menu' => array(
41 'slug' => 'advanced-scrollbar',
42 'contact' => false,
43 'support' => false,
44 'parent' => array(
45 'slug' => 'options-general.php',
46 ),
47 ),
48 'is_live' => true,
49 ) );
50 }
51 return $asb_fs;
52 }
53
54 asb_fs();
55 do_action( 'asb_fs_loaded' );
56 }
57 function asbIsPremium() {
58 return asb_fs()->is__premium_only() && asb_fs()->can_use_premium_code();
59 }
60
61 if ( !class_exists( "CSB_Scrollbar" ) ) {
62 class CSB_Scrollbar {
63 function __construct() {
64 add_action( "wp_enqueue_scripts", [$this, "enqueueScrollbarScript"] );
65 add_action( 'wp_footer', [$this, "csbFooter"] );
66 // add_action('wp_head', [$this,"isPremium"]);
67 // add_action('admin_head', [$this,"isPremium"]);
68 // add_action('edit_attachment_head"', [$this,"isPremium"]);
69 }
70
71 function csbFooter() {
72 $csb_data = get_option( 'asb-advanced-scrollbar-thirds' );
73 $csb_data = json_encode( $csb_data );
74 echo '<div id="csbScrollbar" data-scrollbar="' . esc_attr( $csb_data ) . '"></div>';
75 }
76
77 function enqueueScrollbarScript() {
78 wp_enqueue_script(
79 'csb-nicescroll-js',
80 CSB_DIR_URL . 'assets/js/jquery.nicescroll.min.js',
81 array('jquery'),
82 CSB_VERSION,
83 false
84 );
85 wp_enqueue_style(
86 'csb-scrollbar-style',
87 CSB_DIR_URL . 'build/scrollbar.css',
88 array(),
89 CSB_VERSION,
90 false
91 );
92 wp_enqueue_script(
93 'csb-scrollbar-script',
94 CSB_DIR_URL . 'build/scrollbar.js',
95 array('react', 'react-dom', 'jquery'),
96 CSB_VERSION,
97 false
98 );
99 }
100
101 }
102
103 new CSB_Scrollbar();
104 }
105 /*-------------------------------------------------------------------------------*/
106 /* Include all require file
107 /*-------------------------------------------------------------------------------*/
108 require_once "inc/Settings.php";
109 require_once "inc/import.php";
110 require_once "inc/cursor.php";
111 require_once "inc/admin.php";
112 }