PluginProbe
SocketLabs / trunk
SocketLabs vtrunk
trunk 1.2.1 1.2.2
socketlabs / public / class-socketlabs-public.php

class-socketlabs-public.php in SocketLabs trunk, at public/class-socketlabs-public.php

100 lines 2.5 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 http://socketlabs.com
7 * @since 1.0.0
8 *
9 * @package Socketlabs
10 * @subpackage Socketlabs/public
11 */
12
13 /**
14 * The public-facing functionality of the plugin.
15 *
16 * Defines the plugin name, version, and two examples hooks for how to
17 * enqueue the public-facing stylesheet and JavaScript.
18 *
19 * @package Socketlabs
20 * @subpackage Socketlabs/public
21 * @author SocketLabs Dev Team <support@socketlabs.com>
22 */
23 class Socketlabs_Public {
24
25 /**
26 * The ID of this plugin.
27 *
28 * @since 1.0.0
29 * @access private
30 * @var string $socketlabs The ID of this plugin.
31 */
32 private $socketlabs;
33
34 /**
35 * The version of this plugin.
36 *
37 * @since 1.0.0
38 * @access private
39 * @var string $version The current version of this plugin.
40 */
41 private $version;
42
43 /**
44 * Initialize the class and set its properties.
45 *
46 * @since 1.0.0
47 * @param string $socketlabs The name of the plugin.
48 * @param string $version The version of this plugin.
49 */
50 public function __construct( $socketlabs, $version ) {
51
52 $this->socketlabs = $socketlabs;
53 $this->version = $version;
54
55 }
56
57 /**
58 * Register the stylesheets for the public-facing side of the site.
59 *
60 * @since 1.0.0
61 */
62 public function enqueue_styles() {
63
64 /**
65 * An instance of this class should be passed to the run() function
66 * defined in Socketlabs_Loader as all of the hooks are defined
67 * in that particular class.
68 *
69 * The Socketlabs_Loader will then create the relationship
70 * between the defined hooks and the functions defined in this
71 * class.
72 */
73
74 wp_enqueue_style( $this->socketlabs, plugin_dir_url( __FILE__ ) . 'css/socketlabs-public.css', array(), $this->version, 'all' );
75
76 }
77
78 /**
79 * Register the JavaScript for the public-facing side of the site.
80 *
81 * @since 1.0.0
82 */
83 public function enqueue_scripts() {
84
85 /**
86 * An instance of this class should be passed to the run() function
87 * defined in Socketlabs_Loader as all of the hooks are defined
88 * in that particular class.
89 *
90 * The Socketlabs_Loader will then create the relationship
91 * between the defined hooks and the functions defined in this
92 * class.
93 */
94
95 wp_enqueue_script( $this->socketlabs, plugin_dir_url( __FILE__ ) . 'js/socketlabs-public.js', array( 'jquery' ), $this->version, false );
96
97 }
98
99 }
100