PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.6
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.6
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / integrations / uninstall-integration.php

uninstall-integration.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.6, at src/integrations/uninstall-integration.php

49 lines 1006 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Integrations;
4
5 use Yoast\WP\SEO\Conditionals\No_Conditionals;
6
7 /**
8 * Class to manage the integration with the WP uninstall flow.
9 */
10 class Uninstall_Integration implements Integration_Interface {
11
12 use No_Conditionals;
13
14 /**
15 * Initializes the integration.
16 *
17 * This is the place to register hooks and filters.
18 *
19 * @return void
20 */
21 public function register_hooks() {
22 \add_action( 'uninstall_' . \WPSEO_BASENAME, [ $this, 'wpseo_uninstall' ] );
23 }
24
25 /**
26 * Performs all necessary actions that should happen upon plugin uninstall.
27 *
28 * @return void
29 */
30 public function wpseo_uninstall() {
31 $this->clear_import_statuses();
32 }
33
34 /**
35 * Clears the persistent import statuses.
36 *
37 * @return void
38 */
39 public function clear_import_statuses() {
40 $yoast_options = \get_site_option( 'wpseo' );
41
42 if ( isset( $yoast_options['importing_completed'] ) ) {
43 $yoast_options['importing_completed'] = [];
44
45 \update_site_option( 'wpseo', $yoast_options );
46 }
47 }
48 }
49