PluginProbe
Cron Logger / trunk
Cron Logger vtrunk
trunk 1.0.1 1.0.2 1.0.3 1.0.4 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4
cron-logger / plugin.php

plugin.php in Cron Logger trunk, at plugin.php

73 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Cron Logger
4 * Description: Logs for wp-cron.php runs.
5 * Version: 1.3.4
6 * Requires at least: 5.3
7 * Tested up to: 6.8.2
8 * Author: Palasthotel <rezeption@palasthotel.de> (Edward Bock)
9 * Author URI: https://palasthotel.de
10 * Domain Path: /languages
11 * Text Domain: cron-logger
12 * Requires PHP: 8.1
13 * @copyright Palasthotel
14 * @package Palasthotel\CronLogger
15 */
16
17 namespace CronLogger;
18
19 require_once dirname( __FILE__ ) . "/vendor/autoload.php";
20
21 class Plugin extends Components\Plugin {
22
23 /**
24 * ---------------------------------------------
25 * constants
26 * ---------------------------------------------
27 */
28 const DOMAIN = "cron-logger";
29
30 const ACTION_INIT = "cron_logger_init";
31
32 const ACTION_WP_CRON_START = "cron_logger_wp_cron_start";
33 const ACTION_WP_CRON_FINISH = "cron_logger_wp_cron_shutdown";
34
35 const FILTER_EXPIRE = "cron_logger_expire";
36
37 const TABLE_LOGS = "cron_logs";
38 const OPTION_VERSION = "_cron_logger_version";
39
40 const SCHEDULE = "cron_logger";
41
42 public Timer $timer;
43 public Log $log;
44
45 /**
46 * Plugin constructor
47 */
48 function onCreate(): void {
49
50 $this->loadTextdomain(
51 Plugin::DOMAIN,
52 "languages"
53 );
54
55 $this->timer = new Timer();
56 $this->log = new Log();
57 new Updates( $this );
58 new Services( $this );
59 new Page( $this );
60 new Schedule($this);
61 new Ajax($this);
62 }
63
64 /**
65 * on activation
66 */
67 function onSiteActivation(): void {
68 $this->log->createTables();
69 }
70 }
71
72 Plugin::instance();
73