Changeset 1749824
- Timestamp:
- 10/20/2017 11:02:04 AM (8 years ago)
- Location:
- prime-ads/trunk
- Files:
-
- 4 edited
-
inc/controllers/ApiController.php (modified) (1 diff)
-
inc/services/AdsHelper.php (modified) (2 diffs)
-
prime-ads.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
prime-ads/trunk/inc/controllers/ApiController.php
r1747413 r1749824 163 163 public function clear_cacheAction(){ 164 164 if(function_exists('wp_cache_clear_cache')) wp_cache_clear_cache(); 165 if(function_exists('w3tc_flush_all')) w3tc_flush_all(); 165 if(function_exists('w3tc_flush_all')) 166 update_option('ads-flush-w3tc', true); 166 167 echo json_encode(array('result' => 'ok', 'ver' => ADS_VERSION)); 167 168 return false; -
prime-ads/trunk/inc/services/AdsHelper.php
r1747845 r1749824 380 380 381 381 $folder = get_option('ads-folder'); 382 $out = preg_replace('#<!--tizer-\d+-->|<!--tizer-\d+-end-->#iU', '', $out); 382 383 $out = str_replace('/prime-ads/', '/' . $folder . '/', $out); 383 384 … … 426 427 private function _generateFixed($positionObj, $blockData) 427 428 { 428 $prefix = AdsHelper::getPrefix();429 429 if($blockData == '') return ''; 430 $data = '<div id="' . $prefix . '-fixed-' . $positionObj->id . '-wrap">'; 431 $data .= $blockData; 432 $data .= '</div>'; 433 $data .= $positionObj->template; 430 $data = str_replace("{{block_data}}", $blockData, $positionObj->template); 434 431 return $data; 435 432 } -
prime-ads/trunk/prime-ads.php
r1747845 r1749824 3 3 Plugin Name: Prime Ads 4 4 Description: Вывод рекламы с сервиса Prime Ads 5 Version: 1.9. 35 Version: 1.9.4 6 6 Author: Proffit 7 7 Author URI: http://proffit.guru/ … … 19 19 use AdsNS\SxGeo\SxGeo; 20 20 21 define('ADS_VERSION', '1.9. 3');21 define('ADS_VERSION', '1.9.4'); 22 22 define('ADS_DB_VERSION', '1.7.9'); 23 23 define('ADS_PATH', realpath(__DIR__)); … … 486 486 } 487 487 488 //delete_option('ads-link-hash');489 //delete_option('ads-folder');490 488 $primeAds = new PrimeAds(); 491 489 PrimeAds::checkHash(); 490 491 if(get_option('ads-flush-w3tc')){ 492 add_action('plugins_loaded', 'w3tc_flush_all', 100); 493 add_action('plugins_loaded', 'w3tc_pgcache_flush', 100); 494 add_action('plugins_loaded', 'w3tc_flush_posts', 100); 495 add_action('plugins_loaded', 'w3tc_objectcache_flush', 100); 496 add_action('plugins_loaded', 'ads_w3tc_flush', 101); 497 delete_option('ads-flush-w3tc'); 498 ads_w3tc_flush(); 499 } 500 501 function ads_w3tc_flush(){ 502 w3tc_flush_all(); 503 w3tc_flush_posts(); 504 $w3 = \W3TC\Dispatcher::component( 'CacheFlush' ); 505 $w3->dbcache_flush(); 506 $w3->minifycache_flush(); 507 $w3->objectcache_flush(); 508 $w3->opcache_flush(); 509 $w3->browsercache_flush(); 510 $pgcache_cleanup = \W3TC\Dispatcher::component( 'PgCache_Plugin_Admin' ); 511 $pgcache_cleanup->cleanup(); 512 $pgcacheflush = \W3TC\Dispatcher::component( 'PgCache_Flush' ); 513 $pgcacheflush->flush(); 514 $pgcacheflush->flush_post_cleanup(); 515 } 492 516 493 517 if(isset($_SERVER['REQUEST_URI']) and strpos($_SERVER['REQUEST_URI'], '/primeads_api') === 0){ -
prime-ads/trunk/readme.txt
r1747845 r1749824 7 7 Requires at least: 4.0 8 8 Tested up to: 4.6 9 Stable tag: 1.9. 39 Stable tag: 1.9.4 10 10 11 11 Ответная часть сервиса монитизации Prime Ads (http://primeads.ru)
Note: See TracChangeset
for help on using the changeset viewer.