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 +6 -27 1.931.78 View file →
@@ -1,13 +1,6 @@
1 1 <?php
2 2
3 -use Kibo\PhastPlugins\PhastPress\CDN;
4 -use Kibo\PhastPlugins\PhastPress\Compat;
5 -
6 -if (!defined('PHASTPRESS_VERSION')) {
7 - exit;
8 -}
9 -
10 3 require_once __DIR__ . '/autoload.php';
11 4
12 5 add_action('plugins_loaded', function () {
13 6 if (!get_option('phastpress_1.43')) {
@@ -42,21 +35,10 @@
42 35 return $links;
43 36 });
44 37
45 38 add_action('plugins_loaded', function () {
46 - CDN::installHook();
47 - Compat\Log::setup();
48 -
49 - if (($priority = has_filter('init', 'wp_cache_late_loader')) !== false) {
50 - add_action('init', 'phastpress_deploy', $priority + 1);
51 - Compat\Log::add(
52 - 'wp-super-cache',
53 - 'deploying PhastPress via init hook to support WP Super Cache late init'
54 - );
55 - (new Compat\NextGenGallery())->setup($priority + 1);
56 - } else {
57 - phastpress_deploy();
58 - }
39 + \Kibo\PhastPlugins\PhastPress\CDN::installHook();
40 + phastpress_deploy();
59 41 });
60 42
61 43 add_action('admin_print_scripts', function () {
62 44 echo phastpress_get_plugin_sdk()->getAutoConfiguration()->renderScript();
@@ -73,22 +55,19 @@
73 55 });
74 56
75 57 add_action('wp_head', function () {
76 58 $style = 'font-family:helvetica,sans-serif';
77 - phastpress_console_log(
59 + $args = [
78 60 "%cOptimized with %cPhastPress%c %s\nhttps://wordpress.org/plugins/phastpress/",
79 61 $style,
80 62 $style . ';font-weight:bold',
81 63 $style,
82 - PHASTPRESS_VERSION
83 - );
84 -});
85 -
86 -function phastpress_console_log(...$args) {
64 + PHASTPRESS_VERSION,
65 + ];
87 66 echo '<script data-phast-no-defer>console.log(' .
88 67 implode(',', array_map('json_encode', $args)) .
89 68 ')</script>';
90 -}
69 +});
91 70
92 71 function phastpress_render_settings() {
93 72 echo sprintf(
94 73 '<div class="wrap">