PluginProbe
Scrollsequence – Cinematic Scroll Image Animation Plugin / 1.5.7
Scrollsequence – Cinematic Scroll Image Animation Plugin v1.5.7
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.5.7, 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 * The ID of this plugin.
25 *
26 * @since 0.7.0
27 * @access private
28 * @var string $plugin_name The ID of this plugin.
29 */
30 private $plugin_name;
31
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 /**
42 * Initialize the class and set its properties.
43 *
44 * @since 0.7.0
45 * @param string $plugin_name The name of the plugin.
46 * @param string $version The version of this plugin.
47 */
48 public function __construct( $plugin_name, $version ) {
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 * This function is provided for demonstration purposes only.
61 *
62 * An instance of this class should be passed to the run() function
63 * defined in Scrollsequence_Loader as all of the hooks are defined
64 * in that particular class.
65 *
66 * The Scrollsequence_Loader will then create the relationship
67 * between the defined hooks and the functions defined in this
68 * class.
69 */
70 if ( is_singular( 'scrollsequence' ) ) {
71 // we dont really need CSS, activate line below when situation changes.
72 //wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/scrollsequence-public.css', array(), $this->version, 'all' );
73 }
74 }
75
76 /**
77 * Register the JavaScript for the public-facing side of the site.
78 *
79 * @since 0.7.0
80 */
81 public function enqueue_scripts() {
82 // FREE VERSION ONLY
83 wp_register_script(
84 $this->plugin_name . '-lib',
85 plugin_dir_url( __FILE__ ) . 'js/ssq-lib.js',
86 array('jquery'),
87 $this->version,
88 true
89 );
90 // SHORTCODE REGISTER SCRIPTS
91 // BLOCK START
92 // if ( freemius_scrollsequence()->is_plan_or_trial__premium_only('PRO') ) {
93 // wp_enqueue_script( $this->plugin_name.'-gsap-scrolltrigger', plugin_dir_url( __FILE__ ) . 'js/gsap-scrolltrigger__premium_only.js', array( 'jquery' ), $this->version, true );
94 // }
95 // Wrap all this in IF statement AKTodo
96 //wp_enqueue_script( $this->plugin_name.'-ssq-block', plugin_dir_url( __FILE__ ) . 'js/ssq-block.js', array( 'jquery' ), $this->version, true );
97 // BLOCK END
98 }
99
100 // End of wp enqueue script function
101 }
102
103 // End of class