PluginProbe ʕ •ᴥ•ʔ
Redirection / 1.2.9
Redirection v1.2.9
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0
redirect-redirection / activation.php
redirect-redirection Last commit date
analyst 3 months ago assets 3 months ago includes 3 months ago modules 3 months ago activation.php 3 months ago deactivation.php 3 months ago index.html 3 months ago readme.txt 3 months ago redirect-redirection.php 3 months ago uninstall.php 3 months ago
activation.php
44 lines
1 <?php
2
3 /**
4 * This file is loaded only on plugin's activation
5 */
6 if (!defined("ABSPATH")) {
7 exit();
8 }
9
10 /**
11 * Load contants and database manager
12 */
13 include_once "includes/irrp-constants.php";
14 include_once "includes/irrp-db-manager.php";
15
16 /**
17 * Make new database manager and try to create DB tables if does not exist
18 */
19 $iRdbManager = new IRRPDBManager();
20 $iRdbManager->createTables(is_multisite());
21
22 /**
23 * Mark activation option
24 */
25 update_option('irrp_activation_redirect', true);
26 if (!defined('IRRP_ACTIVATION_REQUEST')) {
27 define('IRRP_ACTIVATION_REQUEST', true);
28 }
29
30 //add_filter("cron_schedules", "irrpSetIntervals");
31
32 function irrpSetIntervals($schedules) {
33 $schedules[IRRP_CRON_DELETE_LOGS_RECURRENCE_KEY] = [
34 "interval" => IRRP_CRON_DELETE_LOGS_RECURRENCE,
35 "display" => esc_html__("Every 15 minutes", "redirect-redirection")
36 ];
37 return $schedules;
38 }
39
40 if (!wp_next_scheduled(IRRP_CRON_DELETE_LOGS)) {
41 //wp_schedule_event(current_time("timestamp", 1), IRRP_CRON_DELETE_LOGS_RECURRENCE_KEY, IRRP_CRON_DELETE_LOGS);
42 wp_schedule_event(current_time("timestamp", 1), "twicedaily", IRRP_CRON_DELETE_LOGS);
43 }
44