PluginProbe ʕ •ᴥ•ʔ
Redirection / 1.2.7
Redirection v1.2.7
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 1 year ago assets 1 year ago includes 1 year ago modules 1 year ago activation.php 1 year ago deactivation.php 1 year ago index.html 1 year ago readme.txt 1 year ago redirect-redirection.php 1 year ago uninstall.php 1 year 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