Plugin Directory

Changeset 2152099


Ignore:
Timestamp:
09/06/2019 04:41:30 AM (7 years ago)
Author:
runcloud
Message:

updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • runcache-purger/trunk/runcache-purger.php

    r2151835 r2152099  
    55 * Plugin URI:      https://runcloud.io
    66 * Description:     This plugin will purge RunCloud.io NGINX fastcgi cache.
    7  * Version:         1.0.1
     7 * Version:         1.0.2
    88 * Author:          RunCloud
    99 * Author URI:      https://profiles.wordpress.org/runcloud/
     
    3030You should have received a copy of the GNU General Public License
    3131with this program. If not, visit: https://www.gnu.org/licenses/
    32  */
     32*/
    3333
    3434if (!defined('WPINC') || defined('RUNCACHE_PURGER_HOOK')) {
     
    6363
    6464    // 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';
    6767
    6868    // later
     
    139139     * @since 0.0.0
    140140     */
    141     private static function is_apache() {
     141    private static function is_apache()
     142    {
    142143
    143144        if ( false !== strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) ) {
     
    157158     * @since 0.0.0
    158159     */
    159     private static function is_nginx() {
     160    private static function is_nginx()
     161    {
    160162
    161163        if ( isset( $GLOBALS['is_nginx'] ) && (bool) $GLOBALS['is_nginx'] ) {
     
    193195    private static function purgeall_url()
    194196    {
    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 
    203197        $url = 'http://127.0.0.1/runcache-purgeall-'.( self::is_nginx() ? 'fastcgi' : 'proxy' );
    204198        return $url;
     
    323317    {
    324318        $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,
    332326        ];
    333327
Note: See TracChangeset for help on using the changeset viewer.