WordPress.org

Plugin Directory

Changeset 592524


Ignore:
Timestamp:
08/30/12 17:13:15 (20 months ago)
Author:
mpvanwinkle77
Message:

Added deactivation logic

Location:
thesis-cacher-beta/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • thesis-cacher-beta/trunk/lib/object-cache.php

    r581467 r592524  
    11<?php 
     2//#THESISCACHER#// 
    23include_once(dirname(__FILE__).'/plugins/thesis-cacher-beta/lib/class.cacheobject.php'); 
    34$GLOBALS['thesis_cache'] = new WPCacheObject(); 
  • thesis-cacher-beta/trunk/thesis-cacher.php

    r581469 r592524  
    2424 
    2525} 
     26 
     27register_deactivation_hook(__FILE__,'thesis_cacher_deactivation'); 
     28function thesis_cacher_deactivation() { 
     29 
     30        $obcache_file = WP_CONTENT_DIR.'/object-cache.php'; 
     31        if(file_exists($obcache_file)) { 
     32             
     33            $object_cache = file_get_contents($obcache_file); 
     34 
     35            //if this is the object-cache installed by thesis cache(r) remove it. 
     36            if( preg_match("/THESISCACHER/",$object_cache) ) 
     37                unlink($obcache_file); 
     38         
     39        } 
     40} 
     41 
    2642 
    2743/* 
Note: See TracChangeset for help on using the changeset viewer.