| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
* Settings page template |
| 5 |
* |
| 6 |
* @package PoweredCache |
| 7 |
* @subpackage PoweredCache/Settings |
| 8 |
*/ |
| 9 |
|
| 10 |
// Exit if accessed directly |
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
?> |
| 16 |
|
| 17 |
<div class="meta-box-sortables ui-sortable"> |
| 18 |
|
| 19 |
<div class="postbox"> |
| 20 |
<div class="inside"> |
| 21 |
|
| 22 |
<table class="form-table"> |
| 23 |
<tbody> |
| 24 |
<tr> |
| 25 |
<th scope="row"><label for="powered_cache_cache_message"><?php _e( 'Cache status message', 'powered-cache' ); ?></label></th> |
| 26 |
<td> |
| 27 |
<label><input type="checkbox" id="powered_cache_cache_message" name="powered_cache_settings[show_cache_message]" <?php checked( powered_cache_get_option( 'show_cache_message' ), 1 ); ?> value="1"><?php _e('Show cache status message in footer','powered-cache'); ?></label> |
| 28 |
</td> |
| 29 |
</tr> |
| 30 |
|
| 31 |
<?php |
| 32 |
// additional control needed for cache flushing |
| 33 |
if ( ( is_multisite() && current_user_can( 'manage_network' ) ) || current_user_can( 'activate_plugins' ) ): ?> |
| 34 |
<tr> |
| 35 |
<th scope="row"><label for="powered_cache_clear_cache"><?php _e( 'Clear Cache', 'powered-cache' ); ?></label></th> |
| 36 |
<td> |
| 37 |
<?php echo Powered_Cache_Admin_Helper::flush_cache_button(); ?> |
| 38 |
<br> |
| 39 |
<span class="description"><?php _e( 'Clear all cache, including object cache', 'powered-cache' ); ?></span> |
| 40 |
</td> |
| 41 |
</tr> |
| 42 |
<?php endif; ?> |
| 43 |
|
| 44 |
<tr> |
| 45 |
<th scope="row"><label for="powered_cache_rewrite"><?php _e( 'Download Configuration', 'powered-cache' ); ?></label></th> |
| 46 |
<td> |
| 47 |
<a href="<?php echo wp_nonce_url( admin_url( 'admin-post.php?action=powered_cache_download_rewrite_settings&server=apache' ), 'powered_cache_download_rewrite' ); ?>" class="button-secondary"> |
| 48 |
<?php _e( '.htaccess configuration', 'powered-cache' ); ?> |
| 49 |
</a> |
| 50 |
<a href="<?php echo wp_nonce_url( admin_url( 'admin-post.php?action=powered_cache_download_rewrite_settings&server=nginx' ), 'powered_cache_download_rewrite' ); ?>" class="button-secondary"> |
| 51 |
<?php _e( 'nginx configuration', 'powered-cache' ); ?> |
| 52 |
</a> |
| 53 |
<br> |
| 54 |
<span class="description"><?php _e( 'Download configuration file for your server', 'powered-cache' ); ?></span> |
| 55 |
</td> |
| 56 |
</tr> |
| 57 |
<tr> |
| 58 |
<th scope="row"><label for="powered_cache_clear_cache"><?php _e( 'Reset All Settings', 'powered-cache' ); ?></label></th> |
| 59 |
<td> |
| 60 |
<?php echo Powered_Cache_Admin_Helper::reset_settings_button(); ?> |
| 61 |
</td> |
| 62 |
</tr> |
| 63 |
|
| 64 |
<tr> |
| 65 |
<th scope="row"><label for="powered_cache_export_settings"><?php _e( 'Export', 'powered-cache' ); ?></label></th> |
| 66 |
<td> |
| 67 |
<?php echo Powered_Cache_Admin_Helper::export_settings_button(); ?> |
| 68 |
</td> |
| 69 |
</tr> |
| 70 |
|
| 71 |
<tr> |
| 72 |
<th scope="row"><label for="powered_cache_import_settings"><?php _e( 'Import', 'powered-cache' ); ?></label></th> |
| 73 |
<td> |
| 74 |
<input type="file" id="powered_cache_import_settings" name="powered_cache_import"> |
| 75 |
<br> |
| 76 |
<input type="submit" name="do-import" id="do-import" class="button" value="<?php _e('Upload and import','powered-cache');?>"> |
| 77 |
</td> |
| 78 |
</tr> |
| 79 |
|
| 80 |
|
| 81 |
</tbody> |
| 82 |
</table> |
| 83 |
|
| 84 |
</div> |
| 85 |
<!-- .inside --> |
| 86 |
|
| 87 |
</div> |
| 88 |
<!-- .postbox --> |
| 89 |
|
| 90 |
</div> |
| 91 |
|