PluginProbe
Extendify / 0.9.3
Extendify v0.9.3
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / app / Library / Frontend.php

Frontend.php in Extendify 0.9.3, at app/Library/Frontend.php

63 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Manage any frontend related tasks here.
4 */
5
6 namespace Extendify\Library;
7
8 use Extendify\Config;
9
10 /**
11 * This class handles any file loading for the frontend of the site.
12 */
13 class Frontend
14 {
15
16 /**
17 * The instance
18 *
19 * @var $instance
20 */
21 public static $instance = null;
22
23 /**
24 * Adds various actions to set up the page
25 *
26 * @return self|void
27 */
28 public function __construct()
29 {
30 if (self::$instance) {
31 return self::$instance;
32 }
33
34 self::$instance = $this;
35 $this->loadScripts();
36 }
37
38 /**
39 * Adds scripts and styles to every page is enabled
40 *
41 * @return void
42 */
43 public function loadScripts()
44 {
45 \add_action(
46 'wp_enqueue_scripts',
47 function () {
48 // TODO: Determine a way to conditionally load assets (https://github.com/extendify/company-product/issues/72).
49 $this->addStylesheets();
50 }
51 );
52 }
53
54 /**
55 * Adds stylesheets as needed
56 *
57 * @return void
58 */
59 public function addStylesheets()
60 {
61 }
62 }
63