Plugin Directory

Changeset 1175754


Ignore:
Timestamp:
06/06/2015 09:31:26 AM (11 years ago)
Author:
baseapp
Message:

Warning for site running through server

Location:
wpbase-cache/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpbase-cache/trunk/trunk/wpbase-cache.php

    r1161071 r1175754  
    44Plugin URI: https://github.com/baseapp/wpbase-cache
    55Description: A wordpress plugin for using all caches on varnish, nginx, php-fpm stack with php-apc. This plugin includes db-cache-reloaded-fix for dbcache.
    6 Version: 1.0.6
     6Version: 1.0.7
    77Author: Vikrant Datta
    88Author URI: http://blog.wpoven.com
     
    172172    $wpbase_cache->flush_varnish_cache($site);
    173173}
     174
     175add_action( 'admin_notices', 'warn_admin_notice' );
     176function warn_admin_notice()
     177{
     178    $url = $_SERVER[HTTP_HOST].$_SERVER['REQUEST_URI'];
     179    if (is_admin() && strpos($url,':8080') !== false){ ?>
     180         <div class="updated">
     181        <p><?php echo '<font color="red">WPBase-Cache Warning! </font>:  You are accessing the site through the server IP. It is recommended that you do not make any changes to the site while accessing through the server IP.'; ?></p>
     182    </div><?php
     183    }
     184}
  • wpbase-cache/trunk/wpbase-cache.php

    r1161071 r1175754  
    44Plugin URI: https://github.com/baseapp/wpbase-cache
    55Description: A wordpress plugin for using all caches on varnish, nginx, php-fpm stack with php-apc. This plugin includes db-cache-reloaded-fix for dbcache.
    6 Version: 1.0.6
     6Version: 1.0.7
    77Author: Vikrant Datta
    88Author URI: http://blog.wpoven.com
     
    172172    $wpbase_cache->flush_varnish_cache($site);
    173173}
     174
     175add_action( 'admin_notices', 'warn_admin_notice' );
     176function warn_admin_notice()
     177{
     178    $url = $_SERVER[HTTP_HOST].$_SERVER['REQUEST_URI'];
     179    if (is_admin() && strpos($url,':8080') !== false){ ?>
     180         <div class="updated">
     181        <p><?php echo '<font color="red">WPBase-Cache Warning! </font>:  You are accessing the site through the server IP. It is recommended that you do not make any changes to the site while accessing through the server IP.'; ?></p>
     182    </div><?php
     183    }
     184}
Note: See TracChangeset for help on using the changeset viewer.