css
6 years ago
images
6 years ago
js
6 years ago
partials
6 years ago
class-firebase-authentication-public.php
6 years ago
index.php
6 years ago
class-firebase-authentication-public.php
104 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * The public-facing functionality of the plugin. |
| 5 | * |
| 6 | * @link https://miniorange.com |
| 7 | * @since 1.0.0 |
| 8 | * |
| 9 | * @package Firebase_Authentication |
| 10 | * @subpackage Firebase_Authentication/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 Firebase_Authentication |
| 20 | * @subpackage Firebase_Authentication/public |
| 21 | * @author miniOrange <info@miniorange.com> |
| 22 | */ |
| 23 | class MO_Firebase_Authentication_Public { |
| 24 | |
| 25 | /** |
| 26 | * The ID of this plugin. |
| 27 | * |
| 28 | * @since 1.0.0 |
| 29 | * @access private |
| 30 | * @var string $plugin_name The ID of this plugin. |
| 31 | */ |
| 32 | private $plugin_name; |
| 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 $plugin_name The name of the plugin. |
| 48 | * @param string $version The version of this plugin. |
| 49 | */ |
| 50 | public function __construct( $plugin_name, $version ) { |
| 51 | |
| 52 | $this->plugin_name = $plugin_name; |
| 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 | * This function is provided for demonstration purposes only. |
| 66 | * |
| 67 | * An instance of this class should be passed to the run() function |
| 68 | * defined in MO_Firebase_Authentication_Loader as all of the hooks are defined |
| 69 | * in that particular class. |
| 70 | * |
| 71 | * The MO_Firebase_Authentication_Loader will then create the relationship |
| 72 | * between the defined hooks and the functions defined in this |
| 73 | * class. |
| 74 | */ |
| 75 | |
| 76 | wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/firebase-authentication-public.css', array(), $this->version, 'all' ); |
| 77 | |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Register the JavaScript for the public-facing side of the site. |
| 82 | * |
| 83 | * @since 1.0.0 |
| 84 | */ |
| 85 | public function enqueue_scripts() { |
| 86 | |
| 87 | /** |
| 88 | * This function is provided for demonstration purposes only. |
| 89 | * |
| 90 | * An instance of this class should be passed to the run() function |
| 91 | * defined in MO_Firebase_Authentication_Loader as all of the hooks are defined |
| 92 | * in that particular class. |
| 93 | * |
| 94 | * The MO_Firebase_Authentication_Loader will then create the relationship |
| 95 | * between the defined hooks and the functions defined in this |
| 96 | * class. |
| 97 | */ |
| 98 | |
| 99 | wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/firebase-authentication-public.js', array( 'jquery' ), $this->version, false ); |
| 100 | |
| 101 | } |
| 102 | |
| 103 | } |
| 104 |