File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 10
10
],
11
11
"require" : {
12
12
"php" : " >=8.0" ,
13
- "automattic/jetpack-constants" : " ^2.0 " ,
13
+ "automattic/jetpack-constants" : " ^2 | ^3 " ,
14
14
"x-wp/helper-functions" : " ^1.18" ,
15
15
"x-wp/helper-traits" : " ^1.9"
16
16
},
Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ class Font extends File {
15
15
/**
16
16
* Add the preload tag to the head for the font.
17
17
*
18
+ * @param int|null $priority Priority of the action. Defaults to the bundle priority.
18
19
* @return bool
19
20
*/
20
- public function preload (): bool {
21
+ public function preload ( ? int $ priority = null ): bool {
21
22
if ( \did_action ( 'wp_head ' ) ) {
22
23
return false ;
23
24
}
@@ -31,7 +32,7 @@ function () {
31
32
\esc_attr ( $ this ->ext () ),
32
33
);
33
34
},
34
- $ this ->bundle ->priority (),
35
+ $ priority ?? $ this ->bundle ->priority (),
35
36
);
36
37
37
38
return true ;
You can’t perform that action at this time.
0 commit comments