PluginProbe
PhastPress / 1.78
PhastPress v1.78
3.12 3.11 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 All 119 releases
← All changes | bootstrap.php +5 -22 1.891.78 View file →
@@ -1,10 +1,6 @@
1 1 <?php
2 2
3 -if (!defined('PHASTPRESS_VERSION')) {
4 - exit;
5 -}
6 -
7 3 require_once __DIR__ . '/autoload.php';
8 4
9 5 add_action('plugins_loaded', function () {
10 6 if (!get_option('phastpress_1.43')) {
@@ -40,19 +36,9 @@
40 36 });
41 37
42 38 add_action('plugins_loaded', function () {
43 39 \Kibo\PhastPlugins\PhastPress\CDN::installHook();
44 -
45 - if (($priority = has_filter('init', 'wp_cache_late_loader')) !== false) {
46 - add_action('init', 'phastpress_deploy', $priority + 1);
47 - add_action('wp_head', function () {
48 - phastpress_console_log(
49 - 'PhastPress deployed via init hook for WP Super Cache late init compat'
50 - );
51 - });
52 - } else {
53 - phastpress_deploy();
54 - }
40 + phastpress_deploy();
55 41 });
56 42
57 43 add_action('admin_print_scripts', function () {
58 44 echo phastpress_get_plugin_sdk()->getAutoConfiguration()->renderScript();
@@ -69,22 +55,19 @@
69 55 });
70 56
71 57 add_action('wp_head', function () {
72 58 $style = 'font-family:helvetica,sans-serif';
73 - phastpress_console_log(
59 + $args = [
74 60 "%cOptimized with %cPhastPress%c %s\nhttps://wordpress.org/plugins/phastpress/",
75 61 $style,
76 62 $style . ';font-weight:bold',
77 63 $style,
78 - PHASTPRESS_VERSION
79 - );
80 -});
81 -
82 -function phastpress_console_log(...$args) {
64 + PHASTPRESS_VERSION,
65 + ];
83 66 echo '<script data-phast-no-defer>console.log(' .
84 67 implode(',', array_map('json_encode', $args)) .
85 68 ')</script>';
86 -}
69 +});
87 70
88 71 function phastpress_render_settings() {
89 72 echo sprintf(
90 73 '<div class="wrap">