Changeset 2152099
- Timestamp:
- 09/06/2019 04:41:30 AM (7 years ago)
- File:
-
- 1 edited
-
runcache-purger/trunk/runcache-purger.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
runcache-purger/trunk/runcache-purger.php
r2151835 r2152099 5 5 * Plugin URI: https://runcloud.io 6 6 * Description: This plugin will purge RunCloud.io NGINX fastcgi cache. 7 * Version: 1.0. 17 * Version: 1.0.2 8 8 * Author: RunCloud 9 9 * Author URI: https://profiles.wordpress.org/runcloud/ … … 30 30 You should have received a copy of the GNU General Public License 31 31 with this program. If not, visit: https://www.gnu.org/licenses/ 32 */32 */ 33 33 34 34 if (!defined('WPINC') || defined('RUNCACHE_PURGER_HOOK')) { … … 63 63 64 64 // version 65 private static $version = '1.0. 1';66 private static $version_prev = '1.0. 0';65 private static $version = '1.0.2'; 66 private static $version_prev = '1.0.1'; 67 67 68 68 // later … … 139 139 * @since 0.0.0 140 140 */ 141 private static function is_apache() { 141 private static function is_apache() 142 { 142 143 143 144 if ( false !== strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) ) { … … 157 158 * @since 0.0.0 158 159 */ 159 private static function is_nginx() { 160 private static function is_nginx() 161 { 160 162 161 163 if ( isset( $GLOBALS['is_nginx'] ) && (bool) $GLOBALS['is_nginx'] ) { … … 193 195 private static function purgeall_url() 194 196 { 195 /*if (strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {196 return 'http://127.0.0.1/runcache-purgeall-fastcgi';197 } else if (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {198 return 'http://127.0.0.1/runcache-purgeall-proxy';199 }200 201 wp_die('Unsupported Web Server!');*/202 203 197 $url = 'http://127.0.0.1/runcache-purgeall-'.( self::is_nginx() ? 'fastcgi' : 'proxy' ); 204 198 return $url; … … 323 317 { 324 318 $options = [ 325 'homepage_post_onn' => 0,326 'homepage_removed_onn' => 0,327 'content_publish_onn' => 0,328 'content_comment_approved_onn' => 0,329 'content_comment_removed_onn' => 0,330 'archives_homepage_onn' => 0,331 'archives_content_onn' => 0,319 'homepage_post_onn' => 1, 320 'homepage_removed_onn' => 1, 321 'content_publish_onn' => 1, 322 'content_comment_approved_onn' => 1, 323 'content_comment_removed_onn' => 1, 324 'archives_homepage_onn' => 1, 325 'archives_content_onn' => 1, 332 326 ]; 333 327
Note: See TracChangeset
for help on using the changeset viewer.