PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7.1
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / class-lp-asset-key.php

class-lp-asset-key.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.7.1, at inc/class-lp-asset-key.php

96 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class LP_Asset_Key
5 *
6 * @author tungnx
7 * @package LearnPress/Classes
8 * @version 1.0.1
9 * @since 3.2.8
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly
14 }
15
16 class LP_Asset_Key {
17 /**
18 * Url of file css/js
19 *
20 * @var string
21 */
22 public $_url = '';
23 /**
24 * Attach js/css need load
25 *
26 * @var array
27 */
28 public $_deps = array();
29 /**
30 * Load on footer
31 *
32 * @var int
33 */
34 public $_in_footer = 0;
35 /**
36 * Value 1 for run wp_register_script(), 0 for run wp_enqueue_script()
37 *
38 * @var int
39 */
40 public $_only_register = 1;
41 /**
42 * Default value empty will load all page
43 *
44 * @var array|string[]
45 */
46 public $_screens = array();
47 /**
48 * Set screens(pages) not load js
49 *
50 * @var array|string[]
51 */
52 public $_exclude_screens = array();
53 /**
54 * Version of addon
55 *
56 * @var string
57 */
58 public $_version = '';
59
60 /**
61 * LP_ASSET_KEY constructor.
62 *
63 * @param string $url .
64 * @param array $deps .
65 * @param string[] $screens .
66 * @param int $only_register .
67 * @param int $in_footer .
68 */
69 public function __construct( string $url = '', array $deps = array(), array $screens = array(), int $only_register = 1, int $in_footer = 0, string $version = '' ) {
70 $this->_url = $url;
71 $this->_deps = $deps;
72 $this->_in_footer = $in_footer;
73 $this->_only_register = $only_register;
74 $this->_screens = $screens;
75 $this->_version = $version;
76 }
77
78 /**
79 * Set pages not call js.
80 *
81 * @param string[] $screens .
82 */
83 public function exclude_screen( array $screens = array() ) {
84 $this->_exclude_screens = $screens;
85 }
86
87 /**
88 * Set dependency
89 *
90 * @param array $deps
91 */
92 public function set_dependency_js( array $deps ) {
93 $this->_deps = $deps;
94 }
95 }
96