1
1
<?php
2
2
3
+ // require_once "wp-load.php";
4
+
3
5
define ('APP_PATH ' , dirname (__FILE__ ));
4
6
5
7
$ preload_patterns = [
6
- 'wp-load.php ' ,
7
- 'wp-includes/http.php ' ,
8
- 'wp-includes/class-http.php ' ,
9
- 'wp-includes/class-wp-http-response.php ' ,
10
- 'wp-includes/class-wp-http-requests-hooks.php ' ,
11
- 'wp-includes/class-wp-http-proxy.php ' ,
12
- 'wp-includes/class-wp-http-requests-response.php ' ,
13
- 'wp-includes/class-wp-http-cookie.php ' ,
14
- 'wp-includes/class-wp-query.php ' ,
15
- 'wp-includes/class-wp-tax-query.php ' ,
16
- 'wp-includes/class-wp-user.php ' ,
17
- 'wp-includes/class-wp-post.php ' ,
18
- 'wp-includes/class-wp-roles.php ' ,
19
- 'wp-includes/class-wp-role.php ' ,
20
-
21
- 'wp-includes/taxonomy.php ' ,
22
- 'wp-includes/post.php ' ,
23
- 'wp-includes/user.php ' ,
24
- 'wp-includes/pluggable.php ' ,
25
- 'wp-includes/rest-api.php ' ,
26
- 'wp-includes/kses.php ' ,
27
- 'wp-includes/capabilities.php ' ,
28
- 'wp-includes/comment.php ' ,
29
- 'wp-includes/query.php ' ,
30
- 'wp-includes/shortcodes.php ' ,
31
- 'wp-includes/theme.php ' ,
32
- 'wp-includes/post-template.php ' ,
33
- 'wp-includes/post-thumbnail-template.php ' ,
34
- 'wp-includes/media.php ' ,
35
- 'wp-includes/date.php ' ,
36
- 'wp-includes/author-template.php ' ,
37
-
38
- "wp-includes/**/*.php " ,
39
- "wp-includes/**/**/*.php " ,
40
- "wp-includes/**/**/**/*.php " ,
41
- "wp-includes/**/**/**/**/*.php " ,
8
+ "wp-load.php " ,
9
+ "wp-settings.php " ,
10
+ "wasmer/plugins/*.php " ,
11
+ "wasmer/plugins/*/*.php " ,
12
+ "wp-includes/*.php " ,
13
+ "wp-includes/*/*.php " ,
14
+ "wp-includes/*/*/*.php " ,
15
+ "wp-includes/*/*/*/*.php " ,
16
+ "wp-includes/*/*/*/*/*.php " ,
17
+ "wp-includes/*/*/*/*/*/*.php " ,
18
+ "wp-includes/*/*/*/*/*/*/*.php " ,
19
+ "wp-includes/*/*/*/*/*/*/*/*.php " ,
20
+ "wp-content/themes/*/*.php " ,
21
+ "wp-content/themes/*/*/*.php " ,
22
+ "wp-content/themes/*/*/*/*.php " ,
42
23
];
43
24
44
25
foreach ($ preload_patterns as $ pattern ) {
45
- $ files = glob (APP_PATH . $ pattern );
26
+ $ files = glob (APP_PATH . " / " . $ pattern );
46
27
47
28
foreach ($ files as $ file ) {
48
29
opcache_compile_file ($ file );
49
30
}
50
31
}
51
32
52
- echo "Preloading complete \n" ;
33
+ echo "Preloading complete " . PHP_EOL ;
0 commit comments