/** * Uninstall * * @return void */ public static function do_uninstall() { // Get the settings $settings = get_option('easingslider_settings'); // If enabled, remove the plugin data if ($settings->remove_data) { // Delete all of the sliders foreach (ES_Slider::all() as $slider) { ES_Slider::delete($slider->ID); } // Delete options delete_option('easingslider_version'); delete_option('easingslider_settings'); // Remove data hook do_action('easingslider_remove_data'); } // Trigger hooks do_action('easingslider_uninstall'); }
/** * Processes a delete action * * @param int $id The slider ID * @return void */ public function process_delete_action($id) { // Delete the slider ES_Slider::delete($id); }