delete-cache-button.js
4 years ago
delete-cache-button.php
3 years ago
preload-notification.js
3 years ago
preload-notification.php
4 years ago
preload-notification.php
15 lines
| 1 | <?php |
| 2 | |
| 3 | function wpsc_preload_notification_scripts() { |
| 4 | global $cache_path; |
| 5 | if ( |
| 6 | isset( $_GET['page'] ) && $_GET['page'] === 'wpsupercache' && |
| 7 | isset( $_GET['tab'] ) && $_GET['tab'] === 'preload' && |
| 8 | @file_exists( $cache_path . 'preload_permalink.txt' ) |
| 9 | ) { |
| 10 | wp_enqueue_script( 'preload-notification', plugins_url( '/preload-notification.js', __FILE__ ), array('jquery'), '1.0', 1 ); |
| 11 | wp_localize_script( 'preload-notification', 'wpsc_preload_ajax', array( 'preload_permalink_url' => home_url( str_replace( $_SERVER['DOCUMENT_ROOT'], '', $cache_path ) . '/preload_permalink.txt' ) ) ); |
| 12 | } |
| 13 | } |
| 14 | add_action( 'admin_enqueue_scripts', 'wpsc_preload_notification_scripts' ); |
| 15 |