Changeset 1313239
- Timestamp:
- 12/21/2015 08:29:45 AM (10 years ago)
- File:
-
- 1 edited
-
wpbase-cache/trunk/wpbase-cache.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpbase-cache/trunk/wpbase-cache.php
r1305163 r1313239 4 4 Plugin URI: https://github.com/baseapp/wpbase-cache 5 5 Description: 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: 3.06 Version: 4.0 7 7 Author: Vikrant Datta 8 8 Author URI: http://blog.wpoven.com … … 43 43 } 44 44 45 function is_wpoven_site() { 46 $file = ABSPATH . 'wp-config.php'; 47 $content = file_get_contents($file); 48 $match = ''; 49 preg_match('/define.*DB_NAME.*\'(.*)\'/', $content, $match); 50 $dbname = $match[1]; 51 $sitename = substr($dbname, 2); 52 $ch = curl_init(); 53 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 54 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); 55 curl_setopt($ch, CURLOPT_TIMEOUT, 5); 56 curl_setopt($ch, CURLOPT_URL, "https://wpoven.com/sites/check/wpbasecachecheck/" . $sitename); 57 $content = curl_exec($ch); 58 curl_close($ch); 59 return $content; 60 } 61 45 62 function check_wpoven_site() { 46 $check_path = dirname(dirname(dirname(ABSPATH))); 47 if (is_file($check_path . '/bamon/key')) { 63 64 $check_site = is_wpoven_site(); 65 if ($check_site == "1") { 48 66 49 67 function custom_button_example($wp_admin_bar) { … … 260 278 $send_as = $options['send_as']; 261 279 if ($send_as != NULL) { 262 add_filter('wp_mail_from', 'mail_from ');263 add_filter('wp_mail_from_name', 'mail_from_name ');264 } 265 266 function mail_from ($email) {280 add_filter('wp_mail_from', 'mail_from_wpoven'); 281 add_filter('wp_mail_from_name', 'mail_from_name_wpoven'); 282 } 283 284 function mail_from_wpoven($email) { 267 285 268 286 $options = get_option('wpbase_cache_options'); … … 288 306 } 289 307 290 function mail_from_name ($name) {308 function mail_from_name_wpoven($name) { 291 309 $options = get_option('wpbase_cache_options'); 292 310 $send_as = $options['send_as'];
Note: See TracChangeset
for help on using the changeset viewer.