1 | <?php |
||
19 | class _WP_Dependency { |
||
20 | /** |
||
21 | * The handle name. |
||
22 | * |
||
23 | * @access public |
||
24 | * @since 2.6.0 |
||
25 | * @var null |
||
26 | */ |
||
27 | public $handle; |
||
28 | |||
29 | /** |
||
30 | * The handle source. |
||
31 | * |
||
32 | * @access public |
||
33 | * @since 2.6.0 |
||
34 | * @var null |
||
35 | */ |
||
36 | public $src; |
||
37 | |||
38 | /** |
||
39 | * An array of handle dependencies. |
||
40 | * |
||
41 | * @access public |
||
42 | * @since 2.6.0 |
||
43 | * @var array |
||
44 | */ |
||
45 | public $deps = array(); |
||
46 | |||
47 | /** |
||
48 | * The handle version. |
||
49 | * |
||
50 | * Used for cache-busting. |
||
51 | * |
||
52 | * @access public |
||
53 | * @since 2.6.0 |
||
54 | * @var bool|string |
||
55 | */ |
||
56 | public $ver = false; |
||
57 | |||
58 | /** |
||
59 | * Additional arguments for the handle. |
||
60 | * |
||
61 | * @access public |
||
62 | * @since 2.6.0 |
||
63 | * @var null |
||
64 | */ |
||
65 | public $args = null; // Custom property, such as $in_footer or $media. |
||
66 | |||
67 | /** |
||
68 | * Extra data to supply to the handle. |
||
69 | * |
||
70 | * @access public |
||
71 | * @since 2.6.0 |
||
72 | * @var array |
||
73 | */ |
||
74 | public $extra = array(); |
||
75 | |||
76 | /** |
||
77 | * Setup dependencies. |
||
78 | * |
||
79 | * @since 2.6.0 |
||
80 | */ |
||
81 | public function __construct() { |
||
86 | |||
87 | /** |
||
88 | * Add handle data. |
||
89 | * |
||
90 | * @access public |
||
91 | * @since 2.6.0 |
||
92 | * |
||
93 | * @param string $name The data key to add. |
||
94 | * @param mixed $data The data value to add. |
||
95 | * @return bool False if not scalar, true otherwise. |
||
96 | */ |
||
97 | public function add_data( $name, $data ) { |
||
103 | |||
104 | } |
||
105 |
If you suppress an error, we recommend checking for the error condition explicitly: