Changeset 2323582
- Timestamp:
- 06/13/2020 01:32:54 PM (6 years ago)
- Location:
- wp-admin-cache/trunk
- Files:
-
- 3 edited
-
index.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
settings.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-admin-cache/trunk/index.php
r2323502 r2323582 5 5 Plugin URI: https://www.wpadmincache.com 6 6 Description: The first cache plugin for WordPress admin area 7 Version: 0.2. 67 Version: 0.2.7 8 8 Author: Grf Studio 9 9 Author URI: https://www.grfstudio.com … … 58 58 function init() { 59 59 add_options_page('WP Admin Cache', 'WP Admin Cache', 'manage_options', 'wp-admin-cache', array($this, 'options_page')); 60 wp_enqueue_script('wp-admin-cache-script', plugin_dir_url(__FILE__) . 'index.js', array(), '0.2. 6');61 wp_enqueue_style('wp-admin-cache-style', plugin_dir_url(__FILE__) . 'index.css', array(), '0.2. 6');60 wp_enqueue_script('wp-admin-cache-script', plugin_dir_url(__FILE__) . 'index.js', array(), '0.2.7'); 61 wp_enqueue_style('wp-admin-cache-style', plugin_dir_url(__FILE__) . 'index.css', array(), '0.2.7'); 62 62 $session = wp_get_session_token(); 63 63 if (!isset($_COOKIE['wp-admin-cache-session']) || $_COOKIE['wp-admin-cache-session'] != $session) setcookie('wp-admin-cache-session', $session, 0, admin_url()); … … 108 108 109 109 function purgeCache() { 110 foreach ($this->getEnabledUrls() as $url) { 110 $enabledUrls=$this->getEnabledUrls(); 111 if($enabledUrls==null)return; 112 foreach ($enabledUrls as $url) { 111 113 delete_transient('wp-admin-cached-' . $this->getToken() . $url); 112 114 } -
wp-admin-cache/trunk/readme.txt
r2323502 r2323582 2 2 Contributors: grfstudio 3 3 Tags: admin cache, admin performance, admin speed, slow admin, woocommerce performance, slow woocommerce 4 Stable tag: 0.2. 64 Stable tag: 0.2.7 5 5 Requires PHP: 5.6 6 6 Requires at least: 4.6 … … 42 42 43 43 == Changelog == 44 45 = 0.2.7 = 46 47 * Fixed: some php warnings 44 48 45 49 = 0.2.6 = -
wp-admin-cache/trunk/settings.php
r2323502 r2323582 2 2 if (!isset($this)) die(''); 3 3 if (!is_admin()) die(''); 4 $status ='';4 $status = ''; 5 5 if (isset($_POST['wp_admin_cache_save'])) { 6 6 check_admin_referer('wp_admin_cache_settings_n'); 7 7 $obj = array(); 8 8 $obj['enabled'] = sanitize_text_field($_POST['wp_admin_cache_enabled']); 9 $this->enabled =$obj['enabled'];9 $this->enabled = $obj['enabled']; 10 10 if (isset($_POST['wp_admin_cache_url_enabled'])) { 11 11 $urlsEnabled = $_POST['wp_admin_cache_url_enabled']; … … 25 25 } 26 26 $this->purgeCache(); 27 28 $status= '<div class="updated notice"><p>'.__('Settings updated', 'wp-admin-cache').'</p></div>'; 29 27 28 $status = '<div class="updated notice"><p>' . __('Settings updated', 'wp-admin-cache') . '</p></div>'; 30 29 } 31 30 … … 49 48 foreach ($this->getPageHooks() as $url) { 50 49 $checked = ''; 51 if (in_array($url, $enabledUrls)) $checked = 'checked'; 50 if ($enabledUrls != null) { 51 if (in_array($url, $enabledUrls)) $checked = 'checked'; 52 } 52 53 echo '<li><label><input type="checkbox" name="wp_admin_cache_url_enabled[]" value="' . $url . '" ' . $checked . ' > ' . $url . '</label></li>'; 53 54 } … … 58 59 <?php echo __('The cache is regenerated after the specified time, or when certain events occur (adding or updating a post or a page, saving options, saving widgets, activating plugins).', 'wp-admin-cache') ?><br> 59 60 <?php echo __('Important: the cache is managed for each user; if more than one user is connected, not all users may have updated pages; in these cases, reduce the duration of the cache.', 'wp-admin-cache') ?> 60 </p>61 </p> 61 62 <p> 62 63 <label><input type="checkbox" name="wp_admin_cache_show_label" value="1" <?php if ($settings['show-label'] == '1') echo 'checked' ?>> <?php echo __('Show a label on each cached page (shows which pages are actually cached)', 'wp-admin-cache') ?></label>
Note: See TracChangeset
for help on using the changeset viewer.