| @@ -1,6 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +use Kibo\PhastPlugins\PhastPress\CDN; | |
| 4 | +use Kibo\PhastPlugins\PhastPress\Compat; | |
| 5 | + | |
| 3 | 6 | if (!defined('PHASTPRESS_VERSION')) { |
| 4 | 7 | exit; |
| 5 | 8 | } |
| 6 | 9 | |
| @@ -39,17 +42,18 @@ | ||
| 39 | 42 | return $links; |
| 40 | 43 | }); |
| 41 | 44 | |
| 42 | 45 | add_action('plugins_loaded', function () { |
| 43 | - \Kibo\PhastPlugins\PhastPress\CDN::installHook(); | |
| 46 | + CDN::installHook(); | |
| 47 | + Compat\Log::setup(); | |
| 44 | 48 | |
| 45 | 49 | if (($priority = has_filter('init', 'wp_cache_late_loader')) !== false) { |
| 46 | 50 | 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 | - }); | |
| 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); | |
| 52 | 56 | } else { |
| 53 | 57 | phastpress_deploy(); |
| 54 | 58 | } |
| 55 | 59 | }); |