Skip to content

Commit

Permalink
v 0.25.2
Browse files Browse the repository at this point in the history
- show active user on a page only when multiple users are present.
- avoid creating a link to an inexistant post.
  • Loading branch information
Darklg committed Sep 23, 2024
1 parent 5759a4c commit 125fba6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wpuactionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin URI: https://github.com/WordPressUtilities/wpuactionlogs
Update URI: https://github.com/WordPressUtilities/wpuactionlogs
Description: Useful logs about what’s happening on your website admin.
Version: 0.25.1
Version: 0.25.2
Author: Darklg
Author URI: https://darklg.me/
Text Domain: wpuactionlogs
Expand All @@ -26,7 +26,7 @@ class WPUActionLogs {
public $baseadmindatas;
public $settings_details;
public $settings;
private $plugin_version = '0.25.1';
private $plugin_version = '0.25.2';
private $transient_active_duration = 60;
private $plugin_settings = array(
'id' => 'wpuactionlogs',
Expand Down Expand Up @@ -452,7 +452,7 @@ public function wpubaseadmindatas_cellcontent($cellcontent, $cell_id, $settings)
}
/* Post ids */
$post_id = false;
if (isset($data['post_id'])) {
if (isset($data['post_id']) && is_numeric($data['post_id']) && get_post($data['post_id'])) {
$post_id = $data['post_id'];
$data['post_id'] = '<a href="' . get_edit_post_link($data['post_id']) . '">' . $data['post_id'] . '</a>';
}
Expand Down Expand Up @@ -954,7 +954,7 @@ public function admin_bar_menu_display_active_users() {
}

$active_users = $this->get_others_active_users_on_this_page();
if (!$active_users || count($active_users) < 1) {
if (!$active_users || count($active_users) < 2) {
return;
}

Expand Down

0 comments on commit 125fba6

Please sign in to comment.