<?php

/**
 * Fired during plugin deactivation
 *
 * @link       https://kerosin.digital/
 * @since      1.0.0
 *
 * @package    Rss_Chimp
 * @subpackage Rss_Chimp/includes
 */

/**
 * Fired during plugin deactivation.
 *
 * This class defines all code necessary to run during the plugin's deactivation.
 *
 * @since      1.0.0
 * @package    Rss_Chimp
 * @subpackage Rss_Chimp/includes
 * @author     kerosin.digital <hello@kerosin.digital>
 */
class Rss_Chimp_Deactivator {

	/**
	 * Run on deactivation
	 *
	 * @since    1.0.0
	 */
	public static function deactivate() {
		
		/**
		 * Delete settings on deactivation
		 *
		 * @since    1.1.0
		 */
		if( get_option('rss_chimp_reset') == '1' ) {
			// Channel settings
			delete_option( 'rss_chimp_channel_choose_image' );
			delete_option( 'rss_chimp_channel_custom_image' );
			delete_option( 'rss_chimp_channel_copyright' );
			delete_option( 'rss_chimp_channel_editor' );
			delete_option( 'rss_chimp_channel_webmaster' );
			// Performance settings
			delete_option( 'rss_chimp_lazy_loading' );
			delete_option( 'rss_chimp_enable_cache' );
			// Feed delay
			delete_option( 'rss_chimp_feed_delay_status' );
			delete_option( 'rss_chimp_feed_delay_value' );
			// Thumbnail settings
			delete_option( 'rss_chimp_thumbnail_small' );
			delete_option( 'rss_chimp_thumbnail_medium' );
			// Other settings
			delete_option( 'rss_chimp_disable_commentsfeed' );
			delete_option( 'rss_chimp_generatortag' );
			delete_option( 'rss_chimp_reset' );
		  // Default feed
		  delete_option( 'rss_chimp_defaultfeed_disable' );
		  delete_option( 'rss_chimp_defaultfeed_imagesize' );
			delete_option( 'rss_chimp_defaultfeed_enclosure' );
			delete_option( 'rss_chimp_defaultfeed_image_title' );
			delete_option( 'rss_chimp_defaultfeed_image_description' );
			delete_option( 'rss_chimp_defaultfeed_content_before' );
			delete_option( 'rss_chimp_defaultfeed_content_after' );
			delete_option( 'rss_chimp_defaultfeed_link_parameter' );
		  // Custom feed
			delete_option( 'rss_chimp_customfeed' );
		}

	}

}
