Plugin Directory

Changeset 769748


Ignore:
Timestamp:
09/10/2013 02:23:03 PM (13 years ago)
Author:
anukit
Message:

ignoring more option updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • observer/trunk/lib/AMWObserver.php

    r769014 r769748  
    111111    public function log_updated_option($option, $oldvalue, $newvalue) {
    112112       
    113         // ignore transients
    114         if (preg_match('/.*_transient_.*/i', $option)) return;
    115        
    116         // ignore 'wp_ID_user_roles' changes
    117         if (preg_match('/.*user_roles$/i', $option)) return;
     113        // ignore options matching these regexes
     114        $ignores = array(
     115            '/.*_transient_.*/i',
     116            '/.*user_roles$/i',
     117            '/^stats_cache$/i'
     118        );
     119
     120        foreach ($ignores as $r) {
     121            if (preg_match($r, $option)) return;
     122        }
    118123
    119124        // convert values to strings
Note: See TracChangeset for help on using the changeset viewer.