<?php
/**
 * AP Family Archive - Deactivator
 *
 * Deactivation is deliberately non-destructive: no tables or options are
 * touched (spec-00 Section 8 - core data is collectively owned; plugin data
 * deletion is governed by the apfaar_delete_data_on_uninstall option at
 * UNINSTALL time, see uninstall.php).
 *
 * @package    APFAAR_Family_Archive
 * @subpackage APFAAR_Family_Archive/includes
 * @since      0.1.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Deactivation routines (deliberately non-destructive).
 *
 * @since 0.1.0
 */
class APFAAR_Deactivator {

	/**
	 * Nothing destructive happens here by design - only the rewrite rules
	 * this plugin registered are dropped and the persisted set re-flushed,
	 * so no stale archive rewrites survive deactivation.
	 *
	 * @return void
	 */
	public static function deactivate() {
		if ( ! class_exists( 'APFAAR_Rewrites' ) ) {
			require_once APFAAR_DIR . 'includes/class-apfa-rewrites.php';
		}
		APFAAR_Rewrites::deactivate_flush();
	}
}
