diff --git a/changelog.md b/changelog.md
index d370fed..2a8fa36 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,17 @@
## Changelog
+### Version: 3.0 / february 6, 2026
+
+* **new** plugin tested with `WordPress` up to 6.9
+* **new** plugin tested with `PHP` up to 8.5
+* **new** updated plugin system requirements
+* **edit** various updates to the plugin core and code structure
+* **edit** Dev4Press Library 5.5.1
+* **edit** Device Detector Library 6.5
+* **edit** IP2Location 9.8.1
+* **fix** a few small code formatting issues
+
### Version: 2.8 / June 14, 2025
* **edit** Device Detector Library 6.4.6
@@ -22,17 +33,3 @@
* **edit** Device Detector Library 6.4.3
* **edit** Dev4Press Library 5.3
* **fix** doing it wrong warning for translations on WordPress 6.7
-
-### Version: 2.6 / October 24, 2024
-
-* **new** component: `SweepPress` with 8 more events
-* **new** post meta updated: check for values equality
-* **new** comment meta updated: check for values equality
-* **new** term meta updated: check for values equality
-* **new** user meta updated: check for values equality
-* **new** option to control logging options and meta changes
-* **edit** option edited event: change to equality detection
-* **edit** sitemeta edited event: change to equality detection
-* **edit** expanded default values for some settings
-* **fix** some metadata logging events used wrong meta arguments
-* **fix** minor issue with the generating hidden logs row
diff --git a/composer.json b/composer.json
index ead3d7b..55c76bf 100644
--- a/composer.json
+++ b/composer.json
@@ -1,8 +1,8 @@
{
"require": {
- "dev4press/library": "~5.4",
- "matomo/device-detector": "^6.4",
- "ip2location/ip2location-php": "^9.7",
+ "dev4press/library": "5.5.1",
+ "matomo/device-detector": "^6.5",
+ "ip2location/ip2location-php": "^9.8",
"geoip2/geoip2": "2.13.0"
}
}
diff --git a/composer.lock b/composer.lock
index 4d5f506..153b7fb 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e86c7631a21f8044ef95968e549d3a68",
+ "content-hash": "e7936447bffce2d521ace2feb146f0c4",
"packages": [
{
"name": "composer/ca-bundle",
- "version": "1.5.7",
+ "version": "1.5.10",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
- "reference": "d665d22c417056996c59019579f1967dfe5c1e82"
+ "reference": "961a5e4056dd2e4a2eedcac7576075947c28bf63"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d665d22c417056996c59019579f1967dfe5c1e82",
- "reference": "d665d22c417056996c59019579f1967dfe5c1e82",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/961a5e4056dd2e4a2eedcac7576075947c28bf63",
+ "reference": "961a5e4056dd2e4a2eedcac7576075947c28bf63",
"shasum": ""
},
"require": {
@@ -64,7 +64,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues",
- "source": "https://github.com/composer/ca-bundle/tree/1.5.7"
+ "source": "https://github.com/composer/ca-bundle/tree/1.5.10"
},
"funding": [
{
@@ -74,26 +74,22 @@
{
"url": "https://github.com/composer",
"type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
}
],
- "time": "2025-05-26T15:08:54+00:00"
+ "time": "2025-12-08T15:06:51+00:00"
},
{
"name": "dev4press/library",
- "version": "5.4.0",
+ "version": "5.5.1",
"source": {
"type": "git",
"url": "https://github.com/dev4press/library.git",
- "reference": "996d409448d31f3edff9a192879bfef3ca63f5ae"
+ "reference": "9a22437bbc8216e156bcc41f522eb32d994f52a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dev4press/library/zipball/996d409448d31f3edff9a192879bfef3ca63f5ae",
- "reference": "996d409448d31f3edff9a192879bfef3ca63f5ae",
+ "url": "https://api.github.com/repos/dev4press/library/zipball/9a22437bbc8216e156bcc41f522eb32d994f52a3",
+ "reference": "9a22437bbc8216e156bcc41f522eb32d994f52a3",
"shasum": ""
},
"require": {
@@ -102,7 +98,7 @@
"ext-curl": "*",
"ext-fileinfo": "*",
"ext-json": "*",
- "php": ">=7.4"
+ "php": ">=8.0"
},
"type": "library",
"autoload": {
@@ -139,7 +135,7 @@
"type": "ko_fi"
}
],
- "time": "2025-05-23T18:34:00+00:00"
+ "time": "2026-02-05T19:04:52+00:00"
},
{
"name": "erusev/parsedown",
@@ -302,16 +298,16 @@
},
{
"name": "ip2location/ip2location-php",
- "version": "9.7.3",
+ "version": "9.8.1",
"source": {
"type": "git",
"url": "https://github.com/chrislim2888/IP2Location-PHP-Module.git",
- "reference": "67c7bf13b0571b70925435e640ea5598e9fdeee9"
+ "reference": "e18e5372cfa4b57f33d2dc8c15d24cee1ee6d1ce"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/chrislim2888/IP2Location-PHP-Module/zipball/67c7bf13b0571b70925435e640ea5598e9fdeee9",
- "reference": "67c7bf13b0571b70925435e640ea5598e9fdeee9",
+ "url": "https://api.github.com/repos/chrislim2888/IP2Location-PHP-Module/zipball/e18e5372cfa4b57f33d2dc8c15d24cee1ee6d1ce",
+ "reference": "e18e5372cfa4b57f33d2dc8c15d24cee1ee6d1ce",
"shasum": ""
},
"require": {
@@ -357,22 +353,22 @@
],
"support": {
"issues": "https://github.com/chrislim2888/IP2Location-PHP-Module/issues",
- "source": "https://github.com/chrislim2888/IP2Location-PHP-Module/tree/9.7.3"
+ "source": "https://github.com/chrislim2888/IP2Location-PHP-Module/tree/9.8.1"
},
- "time": "2024-02-26T22:30:40+00:00"
+ "time": "2025-12-21T22:28:29+00:00"
},
{
"name": "matomo/device-detector",
- "version": "6.4.6",
+ "version": "6.5.0",
"source": {
"type": "git",
"url": "https://github.com/matomo-org/device-detector.git",
- "reference": "6f07f615199851548db47a900815d2ea2cdcde08"
+ "reference": "e0fff2309dad83eb3cfb2564e524be715cfcf3cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/6f07f615199851548db47a900815d2ea2cdcde08",
- "reference": "6f07f615199851548db47a900815d2ea2cdcde08",
+ "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/e0fff2309dad83eb3cfb2564e524be715cfcf3cf",
+ "reference": "e0fff2309dad83eb3cfb2564e524be715cfcf3cf",
"shasum": ""
},
"require": {
@@ -386,14 +382,13 @@
"matthiasmullie/scrapbook": "^1.4.7",
"mayflower/mo4-coding-standard": "^v9.0.0",
"phpstan/phpstan": "^1.10.44",
- "phpunit/phpunit": "^8.5.8",
- "psr/cache": "^1.0.1",
- "psr/simple-cache": "^1.0.1",
+ "phpunit/phpunit": "^8.5.2 || ^9 || ^10 || ^11 || ^12",
+ "psr/cache": "^1.0.1 || ^2.0 || ^3.0",
+ "psr/simple-cache": "^1.0.1 || ^2.0 || ^3.0",
"slevomat/coding-standard": "<8.16.0",
"symfony/yaml": "^5.1.7"
},
"suggest": {
- "doctrine/cache": "Can directly be used for caching purpose",
"ext-yaml": "Necessary for using the Pecl YAML parser"
},
"type": "library",
@@ -429,20 +424,20 @@
"source": "https://github.com/matomo-org/matomo",
"wiki": "https://dev.matomo.org/"
},
- "time": "2025-06-10T10:00:59+00:00"
+ "time": "2026-01-21T07:53:39+00:00"
},
{
"name": "maxmind-db/reader",
- "version": "v1.12.1",
+ "version": "v1.13.1",
"source": {
"type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
- "reference": "815939e006b7e68062b540ec9e86aaa8be2b6ce4"
+ "reference": "2194f58d0f024ce923e685cdf92af3daf9951908"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/815939e006b7e68062b540ec9e86aaa8be2b6ce4",
- "reference": "815939e006b7e68062b540ec9e86aaa8be2b6ce4",
+ "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/2194f58d0f024ce923e685cdf92af3daf9951908",
+ "reference": "2194f58d0f024ce923e685cdf92af3daf9951908",
"shasum": ""
},
"require": {
@@ -455,12 +450,13 @@
"friendsofphp/php-cs-fixer": "3.*",
"phpstan/phpstan": "*",
"phpunit/phpunit": ">=8.0.0,<10.0.0",
- "squizlabs/php_codesniffer": "3.*"
+ "squizlabs/php_codesniffer": "4.*"
},
"suggest": {
"ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
"ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
- "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
+ "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups",
+ "maxmind-db/reader-ext": "C extension for significantly faster IP lookups (install via PIE: pie install maxmind-db/reader-ext)"
},
"type": "library",
"autoload": {
@@ -490,35 +486,35 @@
],
"support": {
"issues": "https://github.com/maxmind/MaxMind-DB-Reader-php/issues",
- "source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.12.1"
+ "source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.13.1"
},
- "time": "2025-05-05T20:56:32+00:00"
+ "time": "2025-11-21T22:24:26+00:00"
},
{
"name": "maxmind/web-service-common",
- "version": "v0.9.0",
+ "version": "v0.11.1",
"source": {
"type": "git",
"url": "https://github.com/maxmind/web-service-common-php.git",
- "reference": "4dc5a3e8df38aea4ca3b1096cee3a038094e9b53"
+ "reference": "c309236b5a5555b96cf560089ec3cead12d845d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/4dc5a3e8df38aea4ca3b1096cee3a038094e9b53",
- "reference": "4dc5a3e8df38aea4ca3b1096cee3a038094e9b53",
+ "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/c309236b5a5555b96cf560089ec3cead12d845d2",
+ "reference": "c309236b5a5555b96cf560089ec3cead12d845d2",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0.3",
"ext-curl": "*",
"ext-json": "*",
- "php": ">=7.2"
+ "php": ">=8.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.*",
"phpstan/phpstan": "*",
- "phpunit/phpunit": "^8.0 || ^9.0",
- "squizlabs/php_codesniffer": "3.*"
+ "phpunit/phpunit": "^10.0",
+ "squizlabs/php_codesniffer": "4.*"
},
"type": "library",
"autoload": {
@@ -541,9 +537,9 @@
"homepage": "https://github.com/maxmind/web-service-common-php",
"support": {
"issues": "https://github.com/maxmind/web-service-common-php/issues",
- "source": "https://github.com/maxmind/web-service-common-php/tree/v0.9.0"
+ "source": "https://github.com/maxmind/web-service-common-php/tree/v0.11.1"
},
- "time": "2022-03-28T17:43:20+00:00"
+ "time": "2026-01-13T17:56:03+00:00"
},
{
"name": "mustangostang/spyc",
diff --git a/core/admin/AJAX.php b/core/admin/AJAX.php
index 7afd1ad..79c943c 100644
--- a/core/admin/AJAX.php
+++ b/core/admin/AJAX.php
@@ -6,21 +6,27 @@
use Dev4Press\Plugin\CoreActivity\Log\Activity;
use Dev4Press\Plugin\CoreActivity\Log\WhoIs;
use Dev4Press\Plugin\CoreActivity\Table\Live;
-use Dev4Press\v54\Core\Quick\Sanitize;
+use Dev4Press\v55\Core\Quick\Sanitize;
+use JetBrains\PhpStorm\NoReturn;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class AJAX {
- public function __construct() {
+ private function __construct() {
add_action( 'wp_ajax_coreactivity_toggle_event', array( $this, 'toggle_event' ) );
add_action( 'wp_ajax_coreactivity_toggle_notification', array( $this, 'toggle_notification' ) );
add_action( 'wp_ajax_coreactivity_live_logs', array( $this, 'live_logs' ) );
add_action( 'wp_ajax_coreactivity_whois_ip', array( $this, 'whois_ip' ) );
}
- public static function instance() : AJAX {
+ /** @deprecated 3.0 Use self::i() instead. */
+ public static function instance() : static {
+ return static::i();
+ }
+
+ public static function i() : static {
static $instance = null;
if ( ! isset( $instance ) ) {
@@ -30,7 +36,8 @@ public static function instance() : AJAX {
return $instance;
}
- private function json_respond( $response, $code = 200 ) {
+ #[NoReturn]
+ private function json_respond( $response, $code = 200 ) : void {
status_header( $code );
if ( ! headers_sent() ) {
@@ -41,31 +48,33 @@ private function json_respond( $response, $code = 200 ) {
die( wp_json_encode( $response ) );
}
- public function toggle_event() {
+ #[NoReturn]
+ public function toggle_event() : void {
$id = isset( $_POST['event'] ) ? absint( $_POST['event'] ) : 0;
$toggle = '';
if ( $id > 0 && isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_ajax_nonce'] ), 'coreactivity-toggle-event-' . $id ) ) {
- $status = Activity::instance()->event_status( $id );
+ $status = Activity::i()->event_status( $id );
if ( ! empty( $status ) ) {
$new = $status == 'active' ? 'inactive' : 'active';
$toggle = $status == 'active' ? 'off' : 'on';
- DB::instance()->change_event_status( $id, $new );
+ DB::i()->change_event_status( $id, $new );
}
}
$this->json_respond( array( 'toggle' => $toggle ) );
}
- public function toggle_notification() {
+ #[NoReturn]
+ public function toggle_notification() : void {
$id = isset( $_POST['event'] ) ? absint( $_POST['event'] ) : 0;
$key = isset( $_POST['notification'] ) ? Sanitize::slug( $_POST['notification'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput
$toggle = '';
if ( $id > 0 && isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_ajax_nonce'] ), 'coreactivity-toggle-notification-' . $key . '-' . $id ) ) {
- $change = Activity::instance()->event_notification_toggle( $id, $key );
+ $change = Activity::i()->event_notification_toggle( $id, $key );
if ( ! is_null( $change ) ) {
$toggle = $change ? 'on' : 'off';
@@ -75,7 +84,8 @@ public function toggle_notification() {
$this->json_respond( array( 'toggle' => $toggle ) );
}
- public function live_logs() {
+ #[NoReturn]
+ public function live_logs() : void {
$output = '';
if ( isset( $_REQUEST['args'] ) ) {
@@ -100,7 +110,7 @@ public function live_logs() {
ob_end_clean();
if ( ! empty( $output ) ) {
- $output = DB::instance()->get_last_log_id() . '.' . $output;
+ $output = DB::i()->get_last_log_id() . '.' . $output;
}
}
}
@@ -108,12 +118,13 @@ public function live_logs() {
die( $output ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
- public function whois_ip() {
+ #[NoReturn]
+ public function whois_ip() : void {
$ip = isset( $_POST['whois'] ) ? Sanitize::text( $_POST['whois'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput
$out = __( 'WhoIs check failed', 'coreactivity' );
if ( ! empty( $ip ) && isset( $_REQUEST['_ajax_nonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_ajax_nonce'] ), 'coreactivity-whois-' . $ip ) ) {
- $out = nl2br( trim( WhoIs::instance()->get( $ip ) ) );
+ $out = nl2br( trim( WhoIs::i()->get( $ip ) ) );
}
die( $out ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
diff --git a/core/admin/GetBack.php b/core/admin/GetBack.php
index 3c924f2..7afb7fd 100644
--- a/core/admin/GetBack.php
+++ b/core/admin/GetBack.php
@@ -4,15 +4,15 @@
use Dev4Press\Plugin\CoreActivity\Basic\DB;
use Dev4Press\Plugin\CoreActivity\Log\Activity;
-use Dev4Press\v54\Core\Admin\GetBack as BaseGetBack;
-use Dev4Press\v54\Core\Quick\Sanitize;
+use Dev4Press\v55\Core\Admin\GetBack as BaseGetBack;
+use Dev4Press\v55\Core\Quick\Sanitize;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class GetBack extends BaseGetBack {
- protected function process() {
+ protected function process() : void {
parent::process();
if ( ! empty( $this->a()->panel ) ) {
@@ -34,7 +34,7 @@ protected function process() {
do_action( 'coreactivity_admin_getback_handler', $this->p(), $this->a() );
}
- private function action_dashboard() {
+ private function action_dashboard() : void {
$action = $this->get_single_action();
if ( in_array( $action, array( 'disable-logging', 'enable-logging' ) ) ) {
@@ -49,7 +49,7 @@ private function action_dashboard() {
}
}
- private function action_logs() {
+ private function action_logs() : void {
$action = $this->get_single_action();
if ( $action == 'do-not-log' ) {
@@ -75,7 +75,7 @@ private function action_logs() {
}
}
- private function bulk_panel_events() {
+ private function bulk_panel_events() : void {
check_admin_referer( 'bulk-events' );
$action = $this->get_bulk_action();
@@ -88,9 +88,9 @@ private function bulk_panel_events() {
$new = $action == 'enable' ? 'active' : 'inactive';
foreach ( $ids as $event_id ) {
- DB::instance()->change_event_status( $event_id, $new );
+ DB::i()->change_event_status( $event_id, $new );
}
- } else if ( substr( $action, 0, 13 ) == 'notifications' ) {
+ } else if ( str_starts_with( $action, 'notifications' ) ) {
$elements = explode( '-', substr( $action, 14 ) );
if ( count( $elements ) == 2 ) {
@@ -99,7 +99,7 @@ private function bulk_panel_events() {
if ( in_array( $notification, array( 'instant', 'daily', 'weekly' ), true ) && in_array( $status, array( 'on', 'off' ), true ) ) {
foreach ( $ids as $event_id ) {
- Activity::instance()->event_notification_toggle( $event_id, $notification, $status );
+ Activity::i()->event_notification_toggle( $event_id, $notification, $status );
}
}
}
@@ -111,7 +111,7 @@ private function bulk_panel_events() {
}
}
- private function bulk_panel_logs() {
+ private function bulk_panel_logs() : void {
check_admin_referer( 'bulk-logs' );
$action = $this->get_bulk_action();
@@ -121,7 +121,7 @@ private function bulk_panel_logs() {
if ( ! empty( $ids ) ) {
if ( $action == 'delete' ) {
- DB::instance()->delete_log_entries( $ids );
+ DB::i()->delete_log_entries( $ids );
wp_redirect( $this->a()->current_url() . '&message=delete-completed' );
exit;
diff --git a/core/admin/Help.php b/core/admin/Help.php
index 0a16771..63ac6e9 100644
--- a/core/admin/Help.php
+++ b/core/admin/Help.php
@@ -7,7 +7,7 @@
}
class Help {
- public function __construct() {
+ private function __construct() {
if ( $this->a()->panel == 'dashboard' ) {
$this->_for_dashboard();
} else if ( $this->a()->panel == 'logs' ) {
@@ -17,7 +17,12 @@ public function __construct() {
}
}
- public static function instance() : Help {
+ /** @deprecated 3.0 Use self::i() instead. */
+ public static function instance() : static {
+ return static::i();
+ }
+
+ public static function i() : static {
static $instance = null;
if ( is_null( $instance ) ) {
@@ -31,7 +36,7 @@ private function a() : Plugin {
return coreactivity_admin();
}
- private function _for_dashboard() {
+ private function _for_dashboard() : void {
$this->a()->screen()->add_help_tab(
array(
'id' => 'coreactivity-dashboard-events',
@@ -59,7 +64,7 @@ private function _for_dashboard() {
);
}
- private function _for_logs() {
+ private function _for_logs() : void {
$this->a()->screen()->add_help_tab(
array(
'id' => 'coreactivity-logs-help',
@@ -76,7 +81,7 @@ private function _for_logs() {
);
}
- private function _for_events() {
+ private function _for_events() : void {
$this->a()->screen()->add_help_tab(
array(
'id' => 'coreactivity-events-help',
diff --git a/core/admin/Panel.php b/core/admin/Panel.php
index 78fddcc..db8c47f 100644
--- a/core/admin/Panel.php
+++ b/core/admin/Panel.php
@@ -2,7 +2,7 @@
namespace Dev4Press\Plugin\CoreActivity\Admin;
-use Dev4Press\v54\Core\UI\Admin\Panel as BasePanel;
+use Dev4Press\v55\Core\UI\Admin\Panel as BasePanel;
if ( ! defined( 'ABSPATH' ) ) {
exit;
diff --git a/core/admin/Plugin.php b/core/admin/Plugin.php
index 13a278d..b9e83cf 100644
--- a/core/admin/Plugin.php
+++ b/core/admin/Plugin.php
@@ -6,7 +6,7 @@
use Dev4Press\Plugin\CoreActivity\Basic\Plugin as CorePlugin;
use Dev4Press\Plugin\CoreActivity\Basic\Settings as CoreSettings;
use Dev4Press\Plugin\CoreActivity\Basic\Wizard;
-use Dev4Press\v54\Core\Admin\Network\Plugin as BasePlugin;
+use Dev4Press\v55\Core\Admin\Network\Plugin as BasePlugin;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -33,14 +33,14 @@ class Plugin extends BasePlugin {
'coreactivity_events_rows_per_page',
);
- public function constructor() {
+ public function constructor() : void {
$this->url = COREACTIVITY_URL;
$this->path = COREACTIVITY_PATH;
- Users::instance();
+ Users::i();
}
- public function register_scripts_and_styles() {
+ public function register_scripts_and_styles() : void {
$this->enqueue->register( 'css', 'coreactivity-admin',
array(
'path' => 'css/',
@@ -71,7 +71,7 @@ public function register_scripts_and_styles() {
) );
}
- public function plugins_loaded() {
+ public function plugins_loaded() : void {
parent::plugins_loaded();
add_filter( 'default_hidden_columns', array( $this, 'hide_columns_default' ), 10, 2 );
@@ -92,7 +92,7 @@ public function svg_icon() : string {
return coreactivity()->svg_icon;
}
- public function admin_menu_items() {
+ public function admin_menu_items() : void {
$this->setup_items = array(
'install' => array(
'title' => __( 'Install', 'coreactivity' ),
@@ -162,15 +162,15 @@ public function admin_menu_items() {
}
}
- public function run_getback() {
+ public function run_getback() : void {
new GetBack( $this );
}
- public function run_postback() {
+ public function run_postback() : void {
new PostBack( $this );
}
- public function admin_init() {
+ public function admin_init() : void {
if ( ! coreactivity()->is_logging_active() ) {
if ( coreactivity_settings()->get( 'notice_if_logging_is_disabled' ) ) {
if ( is_super_admin() ) {
@@ -180,7 +180,7 @@ public function admin_init() {
}
}
- public function notice_disabled() {
+ public function notice_disabled() : void {
?>
@@ -220,7 +220,7 @@ public function settings_definitions() : Settings {
return Settings::instance();
}
- public function enqueue() {
+ public function enqueue() : void {
$this->e()->css( 'coreactivity-admin' );
$this->e()->js( 'coreactivity-admin' );
@@ -232,22 +232,22 @@ public function enqueue() {
}
public function wizard() {
- return Wizard::instance();
+ return Wizard::i();
}
- public function help_tab_getting_help() {
+ public function help_tab_getting_help() : void {
if ( ! empty( $this->panel ) ) {
- Help::instance();
+ Help::i();
}
parent::help_tab_getting_help();
}
- protected function extra_enqueue_scripts_plugin() {
+ protected function extra_enqueue_scripts_plugin() : void {
$this->enqueue();
}
- protected function extra_enqueue_scripts_final( $hook ) {
+ protected function extra_enqueue_scripts_final( $hook ) : void {
$this->e()->css( 'coreactivity-global' );
}
}
diff --git a/core/admin/PostBack.php b/core/admin/PostBack.php
index e7ea2d4..1b9548a 100644
--- a/core/admin/PostBack.php
+++ b/core/admin/PostBack.php
@@ -6,8 +6,9 @@
use Dev4Press\Plugin\CoreActivity\Basic\Plugin;
use Dev4Press\Plugin\CoreActivity\Log\Activity;
use Dev4Press\Plugin\CoreActivity\Log\Cleanup;
-use Dev4Press\v54\Core\Admin\PostBack as BasePostBack;
-use Dev4Press\v54\Core\Quick\Sanitize;
+use Dev4Press\v55\Core\Admin\PostBack as BasePostBack;
+use Dev4Press\v55\Core\Quick\Sanitize;
+use JetBrains\PhpStorm\NoReturn;
use WP_Filesystem_Direct;
if ( ! defined( 'ABSPATH' ) ) {
@@ -15,7 +16,7 @@
}
class PostBack extends BasePostBack {
- protected function process() {
+ protected function process() : void {
parent::process();
if ( $this->p() == $this->get_page_name( 'wizard' ) ) {
@@ -25,7 +26,7 @@ protected function process() {
do_action( 'coreactivity_admin_postback_handler', $this->p(), $this->a() );
}
- protected function tools() {
+ protected function tools() : void {
if ( $this->a()->subpanel == 'notifications' ) {
$this->notifications();
} else if ( $this->a()->subpanel == 'cleanup' ) {
@@ -35,7 +36,8 @@ protected function tools() {
}
}
- protected function notifications() {
+ #[NoReturn]
+ protected function notifications() : void {
$data = $_POST['coreactivity']['tools-notifications'] ?? array(); // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput
$msg = 'notifications-updated';
@@ -44,13 +46,14 @@ protected function notifications() {
$daily = $data['daily'] ?? 'skip';
$weekly = $data['weekly'] ?? 'skip';
- Activity::instance()->events_notification_bulk_control( $instant, $daily, $weekly );
+ Activity::i()->events_notification_bulk_control( $instant, $daily, $weekly );
wp_redirect( $this->a()->current_url() . '&message=' . $msg );
exit;
}
- protected function cleanup() {
+ #[NoReturn]
+ protected function cleanup() : void {
$data = $_POST['coreactivity']['tools-cleanup'] ?? array(); // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput
$when = $data['period'] ?? '';
@@ -60,7 +63,7 @@ protected function cleanup() {
if ( ! empty( $when ) && ! empty( $what ) && strlen( $when ) == 4 ) {
$what = Sanitize::ids_list( $what );
- Cleanup::instance()->cleanup_log( $when, $what );
+ Cleanup::i()->cleanup_log( $when, $what );
$msg = 'cleanup-completed';
}
@@ -69,7 +72,8 @@ protected function cleanup() {
exit;
}
- protected function remove() {
+ #[NoReturn]
+ protected function remove() : void {
$message = 'nothing-removed';
$remove = Sanitize::_get_switch_array( 'coreactivity-tools', 'remove' );
@@ -79,7 +83,7 @@ protected function remove() {
}
if ( in_array( 'geo-db', $remove ) ) {
- $path = Plugin::instance()->uploads_path();
+ $path = Plugin::i()->uploads_path();
if ( $path !== false ) {
WP_Filesystem();
@@ -90,13 +94,13 @@ protected function remove() {
}
if ( in_array( 'drop', $remove ) ) {
- InstallDB::instance()->drop();
+ InstallDB::i()->drop();
if ( ! isset( $remove['disable'] ) ) {
$this->a()->settings()->mark_for_update();
}
} else if ( in_array( 'truncate', $remove ) ) {
- InstallDB::instance()->truncate();
+ InstallDB::i()->truncate();
}
if ( in_array( 'disable', $remove ) ) {
diff --git a/core/admin/Settings.php b/core/admin/Settings.php
index f970311..3668fa4 100644
--- a/core/admin/Settings.php
+++ b/core/admin/Settings.php
@@ -3,9 +3,9 @@
namespace Dev4Press\Plugin\CoreActivity\Admin;
use Dev4Press\Plugin\CoreActivity\Log\Activity;
-use Dev4Press\v54\Core\Options\Settings as BaseSettings;
-use Dev4Press\v54\Core\Options\Type;
-use Dev4Press\v54\Core\Quick\Sanitize;
+use Dev4Press\v55\Core\Options\Settings as BaseSettings;
+use Dev4Press\v55\Core\Options\Type;
+use Dev4Press\v55\Core\Quick\Sanitize;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -49,7 +49,7 @@ public function tools_cleanup() : array {
);
$component = isset( $_GET['component'] ) ? Sanitize::text( $_GET['component'] ) : '';
- $listing = empty( $component ) ? Activity::instance()->get_select_events() : Activity::instance()->get_select_events( false, array( $component ) );
+ $listing = empty( $component ) ? Activity::i()->get_select_events() : Activity::i()->get_select_events( false, array( $component ) );
$settings['cleanup-events'] = array(
'name' => __( 'Cleanup Events', 'coreactivity' ),
diff --git a/core/admin/meta/Users.php b/core/admin/meta/Users.php
index c631644..10e905b 100644
--- a/core/admin/meta/Users.php
+++ b/core/admin/meta/Users.php
@@ -14,11 +14,16 @@ class Users {
'coreactivity_login' => 'coreactivity_last_login',
);
- public function __construct() {
+ private function __construct() {
add_action( 'current_screen', array( $this, 'current_screen' ) );
}
- public static function instance() : Users {
+ /** @deprecated 3.0 Use self::i() instead. */
+ public static function instance() : self {
+ return self::i();
+ }
+
+ public static function i() : self {
static $instance = null;
if ( ! isset( $instance ) ) {
@@ -28,7 +33,7 @@ public static function instance() : Users {
return $instance;
}
- public function current_screen( $screen ) {
+ public function current_screen( $screen ) : void {
if ( $screen->id == 'users' ) {
add_filter( 'manage_users_columns', array( $this, 'manage_columns' ) );
add_filter( 'manage_users_sortable_columns', array( $this, 'sortable_columns' ) );
@@ -62,13 +67,13 @@ public function manage_columns( $columns ) {
public function column_values( $value, $column, $user_id ) {
switch ( $column ) {
case 'coreactivity_online':
- if ( Feature::instance()->is_user_online( $user_id ) ) {
+ if ( Feature::i()->is_user_online( $user_id ) ) {
return '
' . __( 'Online', 'coreactivity' ) . '
';
} else {
return '
' . __( 'Offline', 'coreactivity' ) . '
';
}
case 'coreactivity_activity':
- $last_activity = Feature::instance()->get_user_last_activity( $user_id );
+ $last_activity = Feature::i()->get_user_last_activity( $user_id );
if ( $last_activity == 0 ) {
return '/';
@@ -78,7 +83,7 @@ public function column_values( $value, $column, $user_id ) {
return gmdate( 'Y.m.d', $timestamp ) . '
@ ' . gmdate( 'H:i:s', $timestamp );
}
case 'coreactivity_login':
- $last_login = Feature::instance()->get_user_last_login( $user_id );
+ $last_login = Feature::i()->get_user_last_login( $user_id );
if ( $last_login == 0 ) {
return '/';
diff --git a/core/admin/panel/About.php b/core/admin/panel/About.php
index 4186b7e..35ad516 100644
--- a/core/admin/panel/About.php
+++ b/core/admin/panel/About.php
@@ -2,7 +2,7 @@
namespace Dev4Press\Plugin\CoreActivity\Admin\Panel;
-use Dev4Press\v54\Core\UI\Admin\PanelAbout;
+use Dev4Press\v55\Core\UI\Admin\PanelAbout;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -11,7 +11,7 @@
class About extends PanelAbout {
protected bool $history = true;
- protected function init_default_subpanels() {
+ protected function init_default_subpanels() : void {
parent::init_default_subpanels();
$this->subpanels = array_slice( $this->subpanels(), 0, 2 ) +
diff --git a/core/admin/panel/Dashboard.php b/core/admin/panel/Dashboard.php
index 9698660..d9771e5 100644
--- a/core/admin/panel/Dashboard.php
+++ b/core/admin/panel/Dashboard.php
@@ -3,8 +3,8 @@
namespace Dev4Press\Plugin\CoreActivity\Admin\Panel;
use Dev4Press\Plugin\CoreActivity\Basic\Render;
-use Dev4Press\v54\Core\Scope;
-use Dev4Press\v54\Core\UI\Admin\PanelDashboard;
+use Dev4Press\v55\Core\Scope;
+use Dev4Press\v55\Core\UI\Admin\PanelDashboard;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -14,7 +14,7 @@ class Dashboard extends PanelDashboard {
public function __construct( $admin ) {
parent::__construct( $admin );
- if ( Scope::instance()->is_master_network_admin() ) {
+ if ( Scope::i()->is_master_network_admin() ) {
$this->sidebar_links['plugin']['events'] = array(
'icon' => $this->a()->menu_items['events']['icon'],
'class' => 'button-primary',
@@ -34,13 +34,13 @@ public function __construct( $admin ) {
$this->sidebar_links['plugin']['logs'] = array(
'icon' => $this->a()->menu_items['logs']['icon'],
- 'class' => Scope::instance()->is_master_network_admin() ? 'button-primary' : 'button-secondary',
+ 'class' => Scope::i()->is_master_network_admin() ? 'button-primary' : 'button-secondary',
'url' => $this->a()->panel_url( 'logs', '', '', $this->a()->get_menu_item_network_url_flag( 'logs' ) ),
'label' => __( 'Logs', 'coreactivity' ),
'scope' => $this->a()->menu_items['logs']['scope'] ?? array(),
);
- if ( ! Scope::instance()->is_master_network_admin() ) {
+ if ( ! Scope::i()->is_master_network_admin() ) {
unset( $this->sidebar_links['basic']['settings'], $this->sidebar_links['basic']['tools'] );
}
}
diff --git a/core/admin/panel/Events.php b/core/admin/panel/Events.php
index 2f1c59c..6359f32 100644
--- a/core/admin/panel/Events.php
+++ b/core/admin/panel/Events.php
@@ -16,7 +16,7 @@ class Events extends Panel {
protected bool $form_multiform = false;
protected string $form_method = 'get';
- public function screen_options_show() {
+ public function screen_options_show() : void {
add_screen_option( 'per_page', array(
'label' => __( 'Rows', 'coreactivity' ),
'default' => 50,
diff --git a/core/admin/panel/Logs.php b/core/admin/panel/Logs.php
index 0dd565b..84a0000 100644
--- a/core/admin/panel/Logs.php
+++ b/core/admin/panel/Logs.php
@@ -17,7 +17,7 @@ class Logs extends Panel {
protected bool $form_multiform = false;
protected string $form_method = 'get';
- public function screen_options_show() {
+ public function screen_options_show() : void {
add_screen_option( 'per_page', array(
'label' => __( 'Rows', 'coreactivity' ),
'default' => 25,
diff --git a/core/admin/panel/Settings.php b/core/admin/panel/Settings.php
index a312c86..592e8fd 100644
--- a/core/admin/panel/Settings.php
+++ b/core/admin/panel/Settings.php
@@ -2,14 +2,14 @@
namespace Dev4Press\Plugin\CoreActivity\Admin\Panel;
-use Dev4Press\v54\Core\UI\Admin\PanelSettings;
+use Dev4Press\v55\Core\UI\Admin\PanelSettings;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Settings extends PanelSettings {
- public $settings_class = '\\Dev4Press\\Plugin\\CoreActivity\\Admin\\Settings';
+ public string $settings_class = '\\Dev4Press\\Plugin\\CoreActivity\\Admin\\Settings';
public function __construct( $admin ) {
parent::__construct( $admin );
diff --git a/core/admin/panel/Tools.php b/core/admin/panel/Tools.php
index 27922bf..d2977a2 100644
--- a/core/admin/panel/Tools.php
+++ b/core/admin/panel/Tools.php
@@ -2,14 +2,14 @@
namespace Dev4Press\Plugin\CoreActivity\Admin\Panel;
-use Dev4Press\v54\Core\UI\Admin\PanelTools;
+use Dev4Press\v55\Core\UI\Admin\PanelTools;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Tools extends PanelTools {
- protected function init_default_subpanels() {
+ protected function init_default_subpanels() : void {
parent::init_default_subpanels();
$this->subpanels = array_slice( $this->subpanels, 0, 2 ) +
diff --git a/core/admin/panel/Wizard.php b/core/admin/panel/Wizard.php
index c245571..13f9f4d 100644
--- a/core/admin/panel/Wizard.php
+++ b/core/admin/panel/Wizard.php
@@ -2,7 +2,7 @@
namespace Dev4Press\Plugin\CoreActivity\Admin\Panel;
-use Dev4Press\v54\Core\UI\Admin\PanelWizard;
+use Dev4Press\v55\Core\UI\Admin\PanelWizard;
if ( ! defined( 'ABSPATH' ) ) {
exit;
diff --git a/core/autoload.php b/core/autoload.php
index dbcf2a9..9956424 100644
--- a/core/autoload.php
+++ b/core/autoload.php
@@ -8,7 +8,7 @@ function dev4press_plugin_coreactivity_autoload( $class ) {
$path = __DIR__ . '/';
$base = 'Dev4Press\\Plugin\\CoreActivity\\';
- dev4press_v54_autoload_for_plugin( $class, $base, $path );
+ dev4press_v55_autoload_for_plugin( $class, $base, $path );
}
spl_autoload_register( 'dev4press_plugin_coreactivity_autoload' );
diff --git a/core/base/Component.php b/core/base/Component.php
index 162a296..f3b79d9 100644
--- a/core/base/Component.php
+++ b/core/base/Component.php
@@ -4,7 +4,7 @@
use Dev4Press\Plugin\CoreActivity\Log\Activity;
use Dev4Press\Plugin\CoreActivity\Log\Core;
-use Dev4Press\v54\Core\Quick\WPR;
+use Dev4Press\v55\Core\Quick\WPR;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -49,7 +49,7 @@ abstract class Component {
protected $log_values_if_array_or_object = false;
protected $plugin_file = '';
- public function __construct() {
+ protected function __construct() {
$this->log_values_if_array_or_object = coreactivity_settings()->get( 'log_values_if_array_or_object' );
add_action( 'coreactivity_component_registration', array( $this, 'register_component' ) );
@@ -63,8 +63,12 @@ public function __construct() {
}
}
- /** @return static */
- public static function instance() {
+ /** @deprecated 3.0 Use self::i() instead. */
+ public static function instance() : static {
+ return static::i();
+ }
+
+ public static function i() : static {
static $instance = array();
if ( ! isset( $instance[ static::class ] ) ) {
@@ -141,12 +145,12 @@ public function init() {
public function log( string $event, array $data = array(), array $meta = array() ) : int {
if ( $this->is_active( $event ) ) {
- $event_id = Activity::instance()->get_event_id( $this->code(), $event );
+ $event_id = Activity::i()->get_event_id( $this->code(), $event );
if ( $event_id > 0 ) {
$data = $this->prepare_data_for_log( $event, $data );
- return Core::instance()->log( $event_id, $data, $meta );
+ return Core::i()->log( $event_id, $data, $meta );
}
}
@@ -158,7 +162,7 @@ public function is_registered( string $event ) : bool {
}
public function is_active( string $event ) : bool {
- return Activity::instance()->is_event_active( $this->code(), $event );
+ return Activity::i()->is_event_active( $this->code(), $event );
}
public function is_any_event_active() : bool {
diff --git a/core/basic/AdminBar.php b/core/basic/AdminBar.php
index 67bf933..6db0242 100644
--- a/core/basic/AdminBar.php
+++ b/core/basic/AdminBar.php
@@ -74,7 +74,7 @@ public function integration() {
global $wp_admin_bar;
$show = '';
- $count = coreactivity_settings()->get( 'admin_bar_indicator' ) ? DB::instance()->get_new_log_entries_since_last_log_visit() : 0;
+ $count = coreactivity_settings()->get( 'admin_bar_indicator' ) ? DB::i()->get_new_log_entries_since_last_log_visit() : 0;
$title = '
' . __( 'coreActivity', 'coreactivity' ) . '';
diff --git a/core/basic/Cache.php b/core/basic/Cache.php
index 54687d8..a6ee912 100644
--- a/core/basic/Cache.php
+++ b/core/basic/Cache.php
@@ -2,7 +2,7 @@
namespace Dev4Press\Plugin\CoreActivity\Basic;
-use Dev4Press\v54\Core\Cache\Core;
+use Dev4Press\v55\Core\Cache\Core;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -13,7 +13,7 @@ class Cache extends Core {
public function get_all_registered_events() {
if ( ! $this->in( 'events', 'registered' ) ) {
- $events = DB::instance()->get_all_registered_events();
+ $events = DB::i()->get_all_registered_events();
$this->set( 'events', 'registered', $events );
}
diff --git a/core/basic/DB.php b/core/basic/DB.php
index f4b58d4..eed865b 100644
--- a/core/basic/DB.php
+++ b/core/basic/DB.php
@@ -3,7 +3,7 @@
namespace Dev4Press\Plugin\CoreActivity\Basic;
use Dev4Press\Plugin\CoreActivity\Log\Users;
-use Dev4Press\v54\Core\Plugins\DB as BaseDB;
+use Dev4Press\v55\Core\Plugins\DB as BaseDB;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -344,7 +344,7 @@ public function get_users_without_activity_keys() : array {
}
public function get_new_log_entries_since_last_log_visit() : int {
- $timestamp = Users::instance()->get_user_last_log_visit();
+ $timestamp = Users::i()->get_user_last_log_visit();
if ( $timestamp > 0 ) {
$datetime = coreactivity()->datetime()->mysql_date( true, $timestamp );
diff --git a/core/basic/Information.php b/core/basic/Information.php
index 8a84805..09dcebc 100644
--- a/core/basic/Information.php
+++ b/core/basic/Information.php
@@ -2,7 +2,7 @@
namespace Dev4Press\Plugin\CoreActivity\Basic;
-use Dev4Press\v54\Core\Plugins\Information as BaseInformation;
+use Dev4Press\v55\Core\Plugins\Information as BaseInformation;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -11,11 +11,11 @@
class Information extends BaseInformation {
public string $code = 'coreactivity';
- public string $version = '2.8';
- public int $build = 2800;
+ public string $version = '3.0';
+ public int $build = 3000;
public string $edition = 'free';
public string $status = 'stable';
- public string $updated = '2025.06.14';
+ public string $updated = '2026.02.06';
public string $released = '2023.09.06';
public string $github_url = 'https://github.com/dev4press/coreactivity';
diff --git a/core/basic/InstallDB.php b/core/basic/InstallDB.php
index 54dc639..9991267 100644
--- a/core/basic/InstallDB.php
+++ b/core/basic/InstallDB.php
@@ -2,7 +2,7 @@
namespace Dev4Press\Plugin\CoreActivity\Basic;
-use Dev4Press\v54\Core\Plugins\InstallDB as BaseInstallDB;
+use Dev4Press\v55\Core\Plugins\InstallDB as BaseInstallDB;
if ( ! defined( 'ABSPATH' ) ) {
exit;
diff --git a/core/basic/Jobs.php b/core/basic/Jobs.php
index fdd4ce9..9c4a204 100644
--- a/core/basic/Jobs.php
+++ b/core/basic/Jobs.php
@@ -6,14 +6,14 @@
use Dev4Press\Plugin\CoreActivity\Log\GEO as LogLocation;
use Dev4Press\Plugin\CoreActivity\Log\Notifications;
use Dev4Press\Plugin\CoreActivity\Log\Statistics;
-use Dev4Press\v54\Core\Quick\WPR;
+use Dev4Press\v55\Core\Quick\WPR;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Jobs {
- public function __construct() {
+ private function __construct() {
add_action( 'coreactivity_instant_notification', array( $this, 'instant_notification' ) );
if ( is_main_site() ) {
@@ -30,7 +30,12 @@ public function __construct() {
}
}
- public static function instance() : Jobs {
+ /** @deprecated 3.0 Use self::i() instead. */
+ public static function instance() : static {
+ return static::i();
+ }
+
+ public static function i() : static {
static $instance = null;
if ( ! isset( $instance ) ) {
@@ -71,11 +76,11 @@ public function jobs_scheduler_init() {
wp_schedule_event( $cron_time, 'weekly', 'coreactivity_weekly_maintenance' );
}
- Notifications::instance()->schedule_digests();
+ Notifications::i()->schedule_digests();
}
public function instant_notification() {
- Notifications::instance()->scheduled_instant();
+ Notifications::i()->scheduled_instant();
}
public function daily_maintenance() {
@@ -85,17 +90,17 @@ public function daily_maintenance() {
}
public function daily_digest() {
- Notifications::instance()->scheduled_daily();
+ Notifications::i()->scheduled_daily();
}
public function daily_statistics() {
- Statistics::instance()->daily_update();
+ Statistics::i()->daily_update();
}
public function weekly_digest() {
coreactivity()->clean_cron_jobs();
- Notifications::instance()->scheduled_weekly();
+ Notifications::i()->scheduled_weekly();
}
public function weekly_maintenance() {
@@ -103,21 +108,21 @@ public function weekly_maintenance() {
}
public function task_log_purge() {
- Cleanup::instance()->auto_cleanup_log();
+ Cleanup::i()->auto_cleanup_log();
}
public function task_geo_db_update() {
if ( coreactivity()->s()->get( 'geolocation_method' ) == 'ip2location' ) {
- LogLocation::instance()->ip2location_db_update();
+ LogLocation::i()->ip2location_db_update();
}
if ( coreactivity()->s()->get( 'geolocation_method' ) == 'geoip2' ) {
- LogLocation::instance()->geoip2_db_update();
+ LogLocation::i()->geoip2_db_update();
}
}
public function task_users_meta() {
- $ids = DB::instance()->get_users_without_activity_keys();
+ $ids = DB::i()->get_users_without_activity_keys();
foreach ( $ids as $id ) {
$id = absint( $id );
diff --git a/core/basic/Plugin.php b/core/basic/Plugin.php
index da652fc..ed4bab7 100644
--- a/core/basic/Plugin.php
+++ b/core/basic/Plugin.php
@@ -9,8 +9,8 @@
use Dev4Press\Plugin\CoreActivity\Log\Metas as LogMetas;
use Dev4Press\Plugin\CoreActivity\Log\Notifications;
use Dev4Press\Plugin\CoreActivity\Log\Users as LogUsers;
-use Dev4Press\v54\Core\Plugins\Core;
-use Dev4Press\v54\Core\Quick\WPR;
+use Dev4Press\v55\Core\Plugins\Core;
+use Dev4Press\v55\Core\Quick\WPR;
if ( ! defined( 'ABSPATH' ) ) {
exit;
@@ -21,7 +21,7 @@ class Plugin extends Core {
public string $plugin = 'coreactivity';
- public function __construct() {
+ protected function __construct() {
$this->url = COREACTIVITY_URL;
$this->path = COREACTIVITY_PATH;
@@ -47,15 +47,15 @@ public function l() {
public function run() {
do_action( 'coreactivity_load_settings' );
- LogActivity::instance();
- LogLocation::instance();
- LogMetas::instance();
- LogCore::instance();
- LogUsers::instance();
+ LogActivity::i();
+ LogLocation::i();
+ LogMetas::i();
+ LogCore::i();
+ LogUsers::i();
do_action( 'coreactivity_plugin_core_ready' );
- Notifications::instance();
+ Notifications::i();
add_action( 'init', array( $this, 'init' ), 100 );
add_action( 'debugpress-tracker-plugins-call', array( $this, 'debugpress' ) );
@@ -65,21 +65,21 @@ public function run() {
}
}
- public function after_setup_theme() {
+ public function after_setup_theme() : void {
do_action( 'coreactivity_prepare' );
- Jobs::instance();
+ Jobs::i();
}
public function debugpress() {
if ( function_exists( 'debugpress_store_for_plugin' ) ) {
debugpress_store_for_plugin( COREACTIVITY_FILE, array(
'data' => array(
- 'components' => Activity::instance()->get_all_components(),
- 'events' => Activity::instance()->get_all_events(),
- 'statistics' => Activity::instance()->statistics,
+ 'components' => Activity::i()->get_all_components(),
+ 'events' => Activity::i()->get_all_events(),
+ 'statistics' => Activity::i()->statistics,
),
- 'log' => LogCore::instance()->get_current_page_log(),
+ 'log' => LogCore::i()->get_current_page_log(),
) );
}
}
diff --git a/core/basic/Render.php b/core/basic/Render.php
index f6b1bf8..ca2d760 100644
--- a/core/basic/Render.php
+++ b/core/basic/Render.php
@@ -11,13 +11,13 @@
class Render {
public static function panel_header_ip_block() : string {
- GEO::instance()->bulk( array( Core::instance()->get( 'server_ip' ), Core::instance()->get( 'ip' ) ) );
+ GEO::i()->bulk( array( Core::i()->get( 'server_ip' ), Core::i()->get( 'ip' ) ) );
- $_server_ip = Core::instance()->get( 'server_ip' );
- $_visitor_ip = Core::instance()->get( 'ip' );
+ $_server_ip = Core::i()->get( 'server_ip' );
+ $_visitor_ip = Core::i()->get( 'ip' );
- $server_ip = empty( $_server_ip ) ? null : GEO::instance()->locate( $_server_ip );
- $visitor_ip = empty( $_visitor_ip ) ? null : GEO::instance()->locate( $_visitor_ip );
+ $server_ip = empty( $_server_ip ) ? null : GEO::i()->locate( $_server_ip );
+ $visitor_ip = empty( $_visitor_ip ) ? null : GEO::i()->locate( $_visitor_ip );
$render = '