PluginProbe
Scrollsequence – Cinematic Scroll Image Animation Plugin / 1.4.6
Scrollsequence – Cinematic Scroll Image Animation Plugin v1.4.6
1.4.3 1.4.4 1.4.5 1.4.6 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 trunk 0.9.92 0.9.93 0.9.94 0.9.96 1.0.072 1.0.073 All 61 releases
scrollsequence / public / class-scrollsequence-public.php

class-scrollsequence-public.php in Scrollsequence – Cinematic Scroll Image Animation Plugin 1.4.6, at public/class-scrollsequence-public.php

103 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The public-facing functionality of the plugin.
5 *
6 * @link www.scrollsequence.com
7 * @since 0.7.0
8 *
9 * @package Scrollsequence
10 * @subpackage Scrollsequence/public
11 */
12 /**
13 * The public-facing functionality of the plugin.
14 *
15 * Defines the plugin name, version, and two examples hooks for how to
16 * enqueue the public-facing stylesheet and JavaScript.
17 *
18 * @package Scrollsequence
19 * @subpackage Scrollsequence/public
20 * @author Scrollsequence <info@scrollsequence.com>
21 */
22 class Scrollsequence_Public
23 {
24 /**
25 * The ID of this plugin.
26 *
27 * @since 0.7.0
28 * @access private
29 * @var string $plugin_name The ID of this plugin.
30 */
31 private $plugin_name ;
32 /**
33 * The version of this plugin.
34 *
35 * @since 0.7.0
36 * @access private
37 * @var string $version The current version of this plugin.
38 */
39 private $version ;
40 /**
41 * Initialize the class and set its properties.
42 *
43 * @since 0.7.0
44 * @param string $plugin_name The name of the plugin.
45 * @param string $version The version of this plugin.
46 */
47 public function __construct( $plugin_name, $version )
48 {
49 $this->plugin_name = $plugin_name;
50 $this->version = $version;
51 }
52
53 /**
54 * Register the stylesheets for the public-facing side of the site.
55 *
56 * @since 0.7.0
57 */
58 public function enqueue_styles()
59 {
60 /**
61 * This function is provided for demonstration purposes only.
62 *
63 * An instance of this class should be passed to the run() function
64 * defined in Scrollsequence_Loader as all of the hooks are defined
65 * in that particular class.
66 *
67 * The Scrollsequence_Loader will then create the relationship
68 * between the defined hooks and the functions defined in this
69 * class.
70 */
71 if ( is_singular( 'scrollsequence' ) ) {
72 // we dont really need CSS, activate line below when situation changes.
73 //wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/scrollsequence-public.css', array(), $this->version, 'all' );
74 }
75 }
76
77 /**
78 * Register the JavaScript for the public-facing side of the site.
79 *
80 * @since 0.7.0
81 */
82 public function enqueue_scripts()
83 {
84 // FREE VERSION ONLY
85 wp_register_script(
86 $this->plugin_name . '-lib',
87 plugin_dir_url( __FILE__ ) . 'js/ssq-lib.js',
88 array( 'jquery' ),
89 $this->version,
90 true
91 );
92 // SHORTCODE REGISTER SCRIPTS
93 // BLOCK START
94 // if ( freemius_scrollsequence()->is_plan_or_trial__premium_only('PRO') ) {
95 // wp_enqueue_script( $this->plugin_name.'-gsap-scrolltrigger', plugin_dir_url( __FILE__ ) . 'js/gsap-scrolltrigger__premium_only.js', array( 'jquery' ), $this->version, true );
96 // }
97 // Wrap all this in IF statement AKTodo
98 //wp_enqueue_script( $this->plugin_name.'-ssq-block', plugin_dir_url( __FILE__ ) . 'js/ssq-block.js', array( 'jquery' ), $this->version, true );
99 // BLOCK END
100 }
101
102 }
103 // End of class