PluginProbe
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings / 7.1.2
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings v7.1.2
7.2.1 7.2 7.1.2 7.1.1 7.1 7.0.4 7.0.6 7.0.7 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 6.3.1 trunk 5.7.3 5.7.5 5.8.1 5.8.2 5.8.3 5.8.4 5.8.6 6.0.4 6.0.5 All 36 releases
mlsimport / includes / class-mlsimport-deactivator.php

class-mlsimport-deactivator.php in MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings 7.1.2, at includes/class-mlsimport-deactivator.php

54 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Guard: block direct web access — only load when WordPress is bootstrapped.
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7
8 /**
9 * Fired during plugin deactivation
10 *
11 * File role: defines the deactivation hook handler for the plugin. Registered as the
12 * register_deactivation_hook() callback in mlsimport.php. Currently a no-op — all cleanup
13 * (options/transients) is intentionally left commented out so settings survive deactivation.
14 *
15 * @link http://mlsimport.com/
16 * @since 1.0.0
17 *
18 * @package Mlsimport
19 * @subpackage Mlsimport/includes
20 */
21
22 /**
23 * Fired during plugin deactivation.
24 *
25 * This class defines all code necessary to run during the plugin's deactivation.
26 *
27 * @since 1.0.0
28 * @package Mlsimport
29 * @subpackage Mlsimport/includes
30 * @author MlsImport <office@mlsimport.com>
31 */
32 class Mlsimport_Deactivator {
33
34
35 /**
36 * Run on plugin deactivation.
37 *
38 * Settings survive deactivation on purpose (re-activating keeps the user's
39 * configuration), but the cached rewrite rules must not: the standalone
40 * property archive rule would keep claiming its URL base with the plugin
41 * off (#206). Deleting rewrite_rules makes WordPress rebuild them on the
42 * next request, without this plugin's CPTs. The mode signature is deleted
43 * too so Mlsimport_Standalone_Cpt::maybe_flush_rewrites() re-flushes on
44 * the first init after a future re-activation.
45 *
46 * @since 1.0.0
47 * @return void
48 */
49 public static function deactivate() {
50 delete_option( 'rewrite_rules' );
51 delete_option( 'mlsimport_rewrite_mode' );
52 }
53 }
54