Plugin Directory

Changeset 994229


Ignore:
Timestamp:
09/21/2014 02:51:26 PM (12 years ago)
Author:
freshlabs
Message:

Moved removal of deprecated options to database class

Location:
wp-simile-timeline/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-simile-timeline/trunk/inc/WPSimileTimelineDatabase.class.php

    r994223 r994229  
    5555            $wpdb->query("ALTER TABLE $terms_table ADD COLUMN $column_name VARCHAR( 255 ) NOT NULL AFTER `color`");
    5656        }
     57       
     58        $deprecated_options = array(
     59            'stl_timeline_band_options',    // deprecated since 0.4.6.4
     60            'stl_timelinecategories',   // deprecated since 0.4.7
     61            'stl_timeline_locale'       // deprecated since 0.4.8.2
     62        );
     63        // remove deprecated options from database
     64        foreach($deprecated_options as $d){
     65            if(get_option($d)){
     66                delete_option($d);
     67            }
     68        }
    5769    }
    5870
  • wp-simile-timeline/trunk/timeline.php

    r994137 r994229  
    118118     */
    119119    function doVersionUpdates(){
    120         $deprecated_options = array(
    121             'stl_timeline_band_options',    // since 0.4.6.4
    122             'stl_timelinecategories',       // since 0.4.7
    123             'stl_timeline_locale'           // since 0.4.8.2
    124         );
    125         // remove deprecated options from database
    126         foreach($deprecated_options as $d){
    127             if(get_option($d)){
    128                 delete_option($d);
    129             }
    130         }
    131        
     120
    132121        // process database updates
    133122        WPSimileTimelineDatabase::doUpdates();
Note: See TracChangeset for help on using the changeset viewer.