PluginProbe
Surfer – WordPress Plugin / trunk
Surfer – WordPress Plugin vtrunk
1.7.1.698 1.6.5.584 1.6.6.590 1.6.7.618 1.6.8.626 1.7.0.639 trunk 1.1.0.183 1.1.0.204 1.1.0.208 1.1.1.223 1.1.2.238 1.2.0.284 1.2.1.287 1.2.2.298 1.3.0.345 1.3.1.350 1.3.2.357 1.3.3.379 1.3.4.395 1.4.0.429 1.4.1.440 1.4.2.468 1.4.3.492 1.5.0.502 All 33 releases
surferseo / surferseo.php

surferseo.php in Surfer – WordPress Plugin trunk, at surferseo.php

71 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Surfer – WordPress Plugin
4 * Plugin URI: https://wordpress.org/plugins/surferseo/
5 * Description: Create content that ranks with Surfer in WordPress
6 * Version: 1.7.1.698
7 * Author: Surfer
8 * Author URI: https://surferseo.com
9 * License: GPLv2 or later
10 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 * Text Domain: surferseo
12 * Requires at least: 6.0
13 * Test up to: 7.1
14 * Requires PHP: 7.4
15 *
16 * @package SurferSEO
17 */
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22
23 if ( ! defined( 'SURFER_VERSION' ) ) {
24 define( 'SURFER_VERSION', '1.7.1.698' );
25 }
26
27 if ( ! defined( 'SURFER_PLUGIN_FILE' ) ) {
28 define( 'SURFER_PLUGIN_FILE', __FILE__ );
29 }
30
31 use SurferSEO\Surferseo;
32
33 if ( ! class_exists( 'Surferseo' ) ) {
34 require_once __DIR__ . '/includes/class-surferseo.php';
35 $surferseo = Surferseo::get_instance();
36 }
37
38
39 if ( ! ( function_exists( 'Surfer' ) ) ) {
40 /**
41 * Returns the main instance of Surferseo
42 *
43 * @return Surferseo
44 */
45 function Surfer() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
46 return Surferseo::get_instance();
47 }
48 }
49
50 register_uninstall_hook( __FILE__, 'surferseo_uninstall_hook' );
51
52 /**
53 * Clears after uninstall.
54 */
55 function surferseo_uninstall_hook() {
56 wp_cache_flush();
57
58 // Delete all SurferSEO options (keep only connection details).
59 delete_option( 'surfer_notification_dismissals' );
60
61 delete_transient( 'surfer_tracking_first_enabled' );
62 delete_transient( 'surfer_gsc_weekly_report_email_sent' );
63 delete_option( 'surfer_connection_token' );
64
65 // Clear crons.
66 wp_clear_scheduled_hook( 'surfer_gather_available_locations' );
67 wp_clear_scheduled_hook( 'surfer_gather_posts_traffic' );
68 wp_clear_scheduled_hook( 'surfer_gather_position_monitor_data' );
69 wp_clear_scheduled_hook( 'surfer_gather_drop_monitor_data' );
70 }
71