28
28
* @link https://gitlab.com/smncd/wp-assets
29
29
* @license GNU Public License v3 or later http://www.gnu.org/licenses/gpl-3.0.txt
30
30
* @copyright 2022 Simon Lagerlöf
31
- * @version 0.1 .0
31
+ * @version 1.0 .0
32
32
*/
33
33
class WPAssets {
34
34
@@ -51,7 +51,7 @@ class WPAssets {
51
51
* @return void
52
52
*
53
53
* @see https://developer.wordpress.org/reference/functions/wp_register_style/
54
- * @since @next
54
+ * @since 1.0.0
55
55
*/
56
56
public static function register_style (
57
57
string $ handle ,
@@ -78,7 +78,7 @@ public static function register_style(
78
78
* @return void
79
79
*
80
80
* @see https://developer.wordpress.org/reference/functions/wp_register_script/
81
- * @since @next
81
+ * @since 1.0.0
82
82
*/
83
83
public static function register_script (
84
84
string $ handle ,
@@ -105,7 +105,7 @@ public static function register_script(
105
105
* @return void
106
106
*
107
107
* @see https://developer.wordpress.org/reference/functions/wp_enqueue_style/
108
- * @since @next
108
+ * @since 1.0.0
109
109
*/
110
110
public static function enqueue_style (
111
111
string $ handle ,
@@ -137,7 +137,7 @@ function() use ( $handle, $src, $dependencies, $version, $media ) {
137
137
* @return void
138
138
*
139
139
* @see https://developer.wordpress.org/reference/functions/wp_enqueue_script/
140
- * @since @next
140
+ * @since 1.0.0
141
141
*/
142
142
public static function enqueue_script (
143
143
string $ handle ,
@@ -164,7 +164,7 @@ function() use ( $handle, $src, $dependencies, $version, $in_footer ) {
164
164
* @param string $src
165
165
*
166
166
* @see https://developer.wordpress.org/reference/hooks/enqueue_block_editor_assets/
167
- * @since @next
167
+ * @since 1.0.0
168
168
*/
169
169
public static function enqueue_editor_style ( string $ handle , string $ src ):void {
170
170
add_action ( 'enqueue_block_editor_assets ' , function () use ( $ handle , $ src ) {
@@ -182,7 +182,7 @@ public static function enqueue_editor_style( string $handle, string $src ):void
182
182
* @param string $src
183
183
*
184
184
* @see https://developer.wordpress.org/reference/hooks/enqueue_block_editor_assets/
185
- * @since @next
185
+ * @since 1.0.0
186
186
*/
187
187
public static function enqueue_editor_script ( string $ handle , string $ src ):void {
188
188
add_action ( 'enqueue_block_editor_assets ' , function () use ( $ handle , $ src ) {
@@ -201,7 +201,7 @@ public static function enqueue_editor_script( string $handle, string $src ):void
201
201
*
202
202
* @return array
203
203
*
204
- * @since @next
204
+ * @since 1.0.0
205
205
*/
206
206
private static function dependencies ( string $ src , array |null $ dependencies ):array {
207
207
if (isset ($ dependencies ) && is_array ($ dependencies ) && isset ($ dependencies [0 ]) ) return $ dependencies ;
@@ -219,7 +219,7 @@ private static function dependencies( string $src, array|null $dependencies ):ar
219
219
*
220
220
* @return string
221
221
*
222
- * @since @next
222
+ * @since 1.0.0
223
223
*/
224
224
private static function version ( string $ src , string |null $ version ): string {
225
225
if (isset ($ version ) && is_string ($ version )) return $ version ;
@@ -238,7 +238,7 @@ private static function version( string $src, string|null $version ): string {
238
238
*
239
239
* @return array
240
240
*
241
- * @since @next
241
+ * @since 1.0.0
242
242
*/
243
243
private static function script_asset ( string $ src ): array {
244
244
if ( pathinfo ( $ src , PATHINFO_EXTENSION ) !== 'js ' ) return [];
0 commit comments