is_plugin_page()) {
return;
}
// Add help tabs based on current screen
$screen_id = $current_screen->id;
// Common help tab for all plugin pages
$current_screen->add_help_tab(array(
'id' => 'alp-help-overview',
'title' => __('Overview', 'activity-log-pro'),
'content' => $this->get_help_content('overview'),
));
// Add common help tabs for all plugin pages
$current_screen->add_help_tab(array(
'id' => 'alp-help-getting-started',
'title' => __('Getting Started', 'activity-log-pro'),
'content' => $this->get_help_content('getting-started'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-security-best-practices',
'title' => __('Security Best Practices', 'activity-log-pro'),
'content' => $this->get_help_content('security-best-practices'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-compliance',
'title' => __('Compliance Guide', 'activity-log-pro'),
'content' => $this->get_help_content('compliance'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-troubleshooting',
'title' => __('Troubleshooting', 'activity-log-pro'),
'content' => $this->get_help_content('troubleshooting'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-premium',
'title' => __('Premium Features', 'activity-log-pro'),
'content' => $this->get_help_content('premium'),
));
// Add screen-specific help tabs
if (strpos($screen_id, 'activity-log-pro') !== false) {
// Main activity log page
if (strpos($screen_id, 'activity-log-pro-settings') === false &&
strpos($screen_id, 'activity-log-pro-export') === false) {
$current_screen->add_help_tab(array(
'id' => 'alp-help-activity-log',
'title' => __('Activity Log', 'activity-log-pro'),
'content' => $this->get_help_content('activity-log'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-filtering',
'title' => __('Filtering & Searching', 'activity-log-pro'),
'content' => $this->get_help_content('filtering'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-live-monitor',
'title' => __('Live Monitor', 'activity-log-pro'),
'content' => $this->get_help_content('live-monitor'),
));
}
// Settings page
if (strpos($screen_id, 'activity-log-pro-settings') !== false) {
$current_screen->add_help_tab(array(
'id' => 'alp-help-settings',
'title' => __('Settings', 'activity-log-pro'),
'content' => $this->get_help_content('settings'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-event-tracking',
'title' => __('Event Tracking', 'activity-log-pro'),
'content' => $this->get_help_content('event-tracking'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-feeds',
'title' => __('Feeds', 'activity-log-pro'),
'content' => $this->get_help_content('feeds'),
));
}
// Export page
if (strpos($screen_id, 'activity-log-pro-export') !== false) {
$current_screen->add_help_tab(array(
'id' => 'alp-help-export',
'title' => __('Export', 'activity-log-pro'),
'content' => $this->get_help_content('export'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-export-formats',
'title' => __('Export Formats', 'activity-log-pro'),
'content' => $this->get_help_content('export-formats'),
));
}
// Integrations page
if (strpos($screen_id, 'activity-log-pro-integrations') !== false) {
$current_screen->add_help_tab(array(
'id' => 'alp-help-integrations',
'title' => __('Integrations', 'activity-log-pro'),
'content' => $this->get_help_content('integrations'),
));
}
// Stats & Insights page
if (strpos($screen_id, 'activity-log-pro-stats') !== false) {
$current_screen->add_help_tab(array(
'id' => 'alp-help-stats',
'title' => __('Stats & Insights', 'activity-log-pro'),
'content' => $this->get_help_content('stats'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-stats-overview',
'title' => __('Overview Metrics', 'activity-log-pro'),
'content' => $this->get_help_content('stats-overview'),
));
$current_screen->add_help_tab(array(
'id' => 'alp-help-stats-security',
'title' => __('Security Insights', 'activity-log-pro'),
'content' => $this->get_help_content('stats-security'),
));
}
}
// Add help sidebar
$current_screen->set_help_sidebar($this->get_help_sidebar());
}
/**
* Get help content for a specific topic
*
* @since 1.0.0
* @param string $topic The help topic
* @return string The help content
*/
/**
* Check if we're on a plugin page
*
* @since 1.0.0
* @return boolean True if on a plugin page, false otherwise
*/
private function is_plugin_page() {
// Only check in admin area
if (!is_admin()) {
return false;
}
// Get the current screen
$screen = get_current_screen();
// Check if the screen ID contains our plugin slug
if ($screen && strpos($screen->id, 'activity-log-pro') !== false) {
return true;
}
// Check if we're on a plugin page by checking the current page
// This is just a page check, not form processing, but we'll sanitize properly
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This is a page detection check, not form submission processing
if (isset($_GET['page'])) {$current_page = sanitize_text_field(wp_unslash($_GET['page']));if (strpos($current_page, 'activity-log-pro') !== false) {return true;}
}
return false;
}
/**
* Enqueue scripts and styles for the help system
*
* @since 1.0.0
* @param string $hook Current admin page
*/
public function enqueue_scripts($hook) {
// Only load on plugin pages
if (!$this->is_plugin_page()) {
return;
}
// Enqueue help styles
wp_enqueue_style('alp-help-css', ACTLOGPRO_PLUGIN_URL . 'admin/css/alp-help.css', array(), ACTLOGPRO_VERSION);
// Enqueue help script as a regular script first
wp_register_script('alp-help-js', ACTLOGPRO_PLUGIN_URL . 'admin/js/modules/alp-help.js', array('jquery'), ACTLOGPRO_VERSION, true);
wp_enqueue_script('alp-help-js');
// Add type="module" attribute using wp_script_add_data
wp_script_add_data('alp-help-js', 'type', 'module');
}
/**
* AJAX handler for getting help content
*
* @since 1.0.0
*/
public function ajax_get_help_content() {
// Check nonce with proper sanitization
if (!isset($_POST['nonce']) || !wp_verify_nonce(sanitize_key(wp_unslash($_POST['nonce'])), 'actlogpro_ajax_nonce')) {
wp_send_json_error(array('message' => __('Security check failed.', 'activity-log-pro')));
}
// Check user capabilities
if (!current_user_can('manage_options')) {
wp_send_json_error(array('message' => __('You do not have permission to perform this action.', 'activity-log-pro')));
}
// Get the topic with proper sanitization
$topic = isset($_POST['topic']) ? sanitize_text_field(wp_unslash($_POST['topic'])) : '';
// Get the help content
$content = $this->get_help_content($topic);
// Get the title
$title = $this->get_help_title($topic);
// Return the content
wp_send_json_success(array(
'title' => $title,
'content' => $content
));
}
/**
* Get help topic title.
*
* @since 1.0.0
* @param string $topic Help topic.
* @return string Help title.
*/
private function get_help_title($topic) {
switch ($topic) {
case 'getting-started':
$title = __('Getting Started', 'activity-log-pro');
break;
case 'activity-log':
$title = __('Activity Log', 'activity-log-pro');
break;
case 'filtering':
$title = __('Filtering & Searching', 'activity-log-pro');
break;
case 'live-monitor':
$title = __('Live Monitor', 'activity-log-pro');
break;
case 'settings':
$title = __('Settings', 'activity-log-pro');
break;
case 'event-tracking':
$title = __('Event Tracking', 'activity-log-pro');
break;
case 'export':
$title = __('Export', 'activity-log-pro');
break;
case 'export-formats':
$title = __('Export Formats', 'activity-log-pro');
break;
case 'integrations':
$title = __('Integrations', 'activity-log-pro');
break;
case 'stats':
$title = __('Stats & Insights', 'activity-log-pro');
break;
case 'stats-overview':
$title = __('Overview Metrics', 'activity-log-pro');
break;
case 'stats-security':
$title = __('Security Insights', 'activity-log-pro');
break;
case 'security-best-practices':
$title = __('Security Best Practices', 'activity-log-pro');
break;
case 'compliance':
$title = __('Compliance Guide', 'activity-log-pro');
break;
case 'troubleshooting':
$title = __('Troubleshooting', 'activity-log-pro');
break;
case 'premium':
$title = __('Premium Features', 'activity-log-pro');
break;
default:
$title = __('Help', 'activity-log-pro');
break;
}
return $title;
}
/**
* Get help content for a specific topic
*
* @since 1.0.0
* @param string $topic The help topic
* @return string The help content
*/
private function get_help_content($topic) {
$content = '';
switch ($topic) {
case 'overview':
$content = '
' . __('Activity Log Pro Overview', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro is a powerful WordPress plugin that tracks and logs all user activities with a clean, modern interface. It helps you monitor and audit all actions taken on your WordPress site for security, compliance, and troubleshooting purposes.', 'activity-log-pro') . '
';
$content .= '' . __('Use the Help dropdown menu in the admin bar to access specific help topics for the current page.', 'activity-log-pro') . '
';
$content .= '' . __('Key Benefits', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Enhanced Security: Track all user actions to identify potential security issues', 'activity-log-pro') . '
';
$content .= '- ' . __('Regulatory Compliance: Maintain detailed audit logs for compliance requirements', 'activity-log-pro') . '
';
$content .= '- ' . __('Issue Troubleshooting: Identify what changes led to site problems', 'activity-log-pro') . '
';
$content .= '- ' . __('User Accountability: Hold users accountable for their actions', 'activity-log-pro') . '
';
$content .= '
';
break;
case 'getting-started':
$content = '' . __('Getting Started with Activity Log Pro', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro automatically begins tracking activities as soon as it\'s activated. Here are some quick tips to get started:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Activity Log: View all logged activities in chronological order', 'activity-log-pro') . '
';
$content .= '- ' . __('Settings: Configure which events to track and how long to retain logs', 'activity-log-pro') . '
';
$content .= '- ' . __('Export: Export logs to CSV or JSON format for external analysis', 'activity-log-pro') . '
';
$content .= '- ' . __('Live Monitor: Watch activities in real-time as they happen', 'activity-log-pro') . '
';
$content .= '- ' . __('Stats & Insights: View analytics about your site\'s activity', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('First Steps Checklist', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Review the "Settings" page to customize which Core Track Events you want to monitor', 'activity-log-pro') . '
';
$content .= '- ' . __('Set an appropriate log retention period based on your compliance needs', 'activity-log-pro') . '
';
$content .= '- ' . __('Enable Security events tracking for enhanced site security monitoring', 'activity-log-pro') . '
';
$content .= '- ' . __('Consider enabling login notifications to inform users their actions are being logged', 'activity-log-pro') . '
';
$content .= '- ' . __('Check out the "Stats & Insights" page to get a visual overview of site activity', 'activity-log-pro') . '
';
$content .= '- ' . __('Review the "Integrations" page to enable tracking for third-party plugins you use', 'activity-log-pro') . '
';
$content .= '
';
break;
case 'activity-log':
$content = '' . __('Understanding the Activity Log', 'activity-log-pro') . '
';
$content .= '' . __('The main Activity Log page displays all tracked events in a chronological order (newest first). Each log entry contains the following information:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Date & Time: When the activity occurred', 'activity-log-pro') . '
';
$content .= '- ' . __('User: Who performed the action (username and role)', 'activity-log-pro') . '
';
$content .= '- ' . __('IP Address: Where the action originated from', 'activity-log-pro') . '
';
$content .= '- ' . __('Event Type: The category of the event (user, post, comment, etc.)', 'activity-log-pro') . '
';
$content .= '- ' . __('Action: What action was performed (create, update, delete, etc.)', 'activity-log-pro') . '
';
$content .= '- ' . __('Object: What was affected by the action (post, page, user, etc.)', 'activity-log-pro') . '
';
$content .= '- ' . __('Description: A human-readable description of the activity', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Click on any log entry to view additional details and context information.', 'activity-log-pro') . '
';
$content .= '' . __('WooCommerce Order Logging', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro provides comprehensive logging for WooCommerce order activities:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Order Status Changes: Tracks when orders move between different statuses', 'activity-log-pro') . '
';
$content .= '- ' . __('Order Updates: Logs modifications to orders including:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Product additions and removals', 'activity-log-pro') . '
';
$content .= '- ' . __('Quantity changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Customer information updates', 'activity-log-pro') . '
';
$content .= '
';
$content .= '- ' . __('Order Notes: Records when private or customer notes are added', 'activity-log-pro') . '
';
$content .= '- ' . __('Order Trash/Delete: Tracks when orders are moved to trash or permanently deleted', 'activity-log-pro') . '
';
$content .= '- ' . __('Order Refunds: Logs when orders are refunded, including refund amounts and reasons', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('The plugin supports both traditional WordPress post-based orders and the new WooCommerce HPOS (High-Performance Order Storage) system.', 'activity-log-pro') . '
';
break;
case 'filtering':
$content = '' . __('Filtering & Searching the Activity Log', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro provides powerful filtering options to help you find specific events:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Date Range: Filter logs by date range using the Date From and Date To fields', 'activity-log-pro') . '
';
$content .= '- ' . __('User: Filter logs by specific user', 'activity-log-pro') . '
';
$content .= '- ' . __('Event Type: Filter logs by event category (user, post, comment, etc.)', 'activity-log-pro') . '
';
$content .= '- ' . __('Action: Filter logs by specific action (create, update, delete, etc.)', 'activity-log-pro') . '
';
$content .= '- ' . __('Search: Search logs by keyword across multiple fields', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('You can combine multiple filters to narrow down your search. Click the "Apply Filters" button to apply your selections, or "Reset Filters" to clear all filters.', 'activity-log-pro') . '
';
$content .= '' . __('The activity log table can be sorted by clicking on any column header. Click once to sort ascending, and again to sort descending.', 'activity-log-pro') . '
';
break;
case 'live-monitor':
$content = '' . __('Using Live Monitor', 'activity-log-pro') . '
';
$content .= '' . __('The Live Monitor feature allows you to view activity logs in real-time without manually refreshing the page:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Enable Live Monitor: Check the "Live Monitor" checkbox in the filter section', 'activity-log-pro') . '
';
$content .= '- ' . __('Monitor Indicator: When active, a green indicator will appear showing "Live monitoring active"', 'activity-log-pro') . '
';
$content .= '- ' . __('Auto-Updates: New log entries will automatically appear at the top of the table as they occur', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Live Monitor is particularly useful for security monitoring or when troubleshooting issues in real-time. It makes an AJAX request to fetch the latest log data without refreshing the entire page.', 'activity-log-pro') . '
';
$content .= '' . __('Note: Live Monitor will continue to run until you uncheck the box or navigate away from the page.', 'activity-log-pro') . '
';
break;
case 'settings':
$content = '' . __('Configuring Settings', 'activity-log-pro') . '
';
$content .= '' . __('The Settings page allows you to customize how Activity Log Pro works:', 'activity-log-pro') . '
';
$content .= '' . __('General Settings', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Log Retention Period: How long to keep activity logs before they are automatically deleted', 'activity-log-pro') . '
';
$content .= '- ' . __('Items Per Page: Number of log entries to display per page in the activity log', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Core Track Events', 'activity-log-pro') . '
';
$content .= '' . __('Select which types of events you want to track. You can enable or disable tracking for specific event categories:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('User events: Login/logout events, profile updates, password changes, role modifications', 'activity-log-pro') . '
';
$content .= '- ' . __('Post events: Creation, updates, and deletion of posts, pages, and custom post types', 'activity-log-pro') . '
';
$content .= '- ' . __('Media events: File uploads, media library updates, and file deletions', 'activity-log-pro') . '
';
$content .= '- ' . __('Comment events: Comment creation, moderation actions, spam detection, and deletions', 'activity-log-pro') . '
';
$content .= '- ' . __('Plugin events: Plugin activation, deactivation, updates, and installation events', 'activity-log-pro') . '
';
$content .= '- ' . __('Theme events: Theme installation, switching, updates, customizer changes, and deletions', 'activity-log-pro') . '
';
$content .= '- ' . __('Widget events: Widget additions, updates, and removals from widget areas', 'activity-log-pro') . '
';
$content .= '- ' . __('Menu events: Menu creation, updates, and deletions including menu items and structure changes', 'activity-log-pro') . '
';
$content .= '- ' . __('WordPress Options: Changes to WordPress settings, plugin configurations, theme customizer changes, and wp_options table modifications', 'activity-log-pro') . '
';
$content .= '- ' . __('WordPress core events: WordPress core updates, database upgrades, and system-level changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Security events: Failed login attempts, suspicious user activities, and security-related events', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Tracking more event types provides more comprehensive monitoring but may increase database size. Choose the events that are most important for your security and auditing needs.', 'activity-log-pro') . '
';
$content .= '' . __('Feed Settings', 'activity-log-pro') . '
';
$content .= '' . __('Configure JSON and RSS feeds for external access to your activity logs. Feed URLs are automatically generated based on your WordPress permalink structure for maximum compatibility.', 'activity-log-pro') . '
';
$content .= '' . __('Login Notification', 'activity-log-pro') . '
';
$content .= '' . __('Enable and customize a notification message that appears after users log in, informing them that their actions are being logged.', 'activity-log-pro') . '
';
$content .= '' . __('Remember to click "Save Settings" after making any changes.', 'activity-log-pro') . '
';
break;
case 'event-tracking':
$content = '' . __('Event Tracking Options', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro can track various types of events in WordPress. You can customize which events to track based on your needs:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('User events: Logins, logouts, profile updates, password changes, role modifications, etc.', 'activity-log-pro') . '
';
$content .= '- ' . __('Post events: Creating, updating, and deleting posts, pages, and custom post types', 'activity-log-pro') . '
';
$content .= '- ' . __('Media events: File uploads, media library updates, and file deletions', 'activity-log-pro') . '
';
$content .= '- ' . __('Comment events: Comprehensive comment tracking including:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Comment creation and updates', 'activity-log-pro') . '
';
$content .= '- ' . __('Comment approval status changes (approved/unapproved)', 'activity-log-pro') . '
';
$content .= '- ' . __('Comment trash status (trashed/untrashed)', 'activity-log-pro') . '
';
$content .= '- ' . __('Comment spam status (spammed/unspammed)', 'activity-log-pro') . '
';
$content .= '- ' . __('Comment deletion', 'activity-log-pro') . '
';
$content .= '
';
$content .= '- ' . __('Plugin events: Installing, activating, deactivating, and updating plugins', 'activity-log-pro') . '
';
$content .= '- ' . __('Theme events: Installing, switching, updating, customizing, and deleting themes', 'activity-log-pro') . '
';
$content .= '- ' . __('Widget events: Adding, editing, and removing widgets from widget areas', 'activity-log-pro') . '
';
$content .= '- ' . __('Menu events: Creating, updating, and deleting navigation menus including menu items and structure changes', 'activity-log-pro') . '
';
$content .= '- ' . __('WordPress Options: Changes to WordPress settings, plugin configurations, theme customizer changes, and wp_options table modifications', 'activity-log-pro') . '
';
$content .= '- ' . __('WordPress core events: WordPress core updates, database upgrades, and system-level changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Security events: Failed login attempts, suspicious user activities, and security-related events', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Tracking more event types provides more comprehensive monitoring but may increase database size. Choose the events that are most important for your security and auditing needs.', 'activity-log-pro') . '
';
$content .= '' . __('Comment Event Details', 'activity-log-pro') . '
';
$content .= '' . __('The comment tracking system provides detailed logging of all comment-related activities:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Created: When a new comment is added to any post', 'activity-log-pro') . '
';
$content .= '- ' . __('Updated: When a comment\'s content is modified', 'activity-log-pro') . '
';
$content .= '- ' . __('Approved/Unapproved: When a comment\'s approval status changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Trashed/Untrashed: When a comment is moved to or restored from trash', 'activity-log-pro') . '
';
$content .= '- ' . __('Spammed/Unspammed: When a comment is marked as or unmarked from spam', 'activity-log-pro') . '
';
$content .= '- ' . __('Deleted: When a comment is permanently removed', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Each comment event includes relevant details such as the comment author, content, associated post, and the user who performed the action.', 'activity-log-pro') . '
';
$content .= '' . __('Security Event Details', 'activity-log-pro') . '
';
$content .= '' . __('The security tracking system monitors potential security threats and suspicious activities:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Failed Login Attempts: Tracks unsuccessful login attempts with username and IP address', 'activity-log-pro') . '
';
$content .= '- ' . __('Suspicious Activities: Monitors unusual user behavior patterns', 'activity-log-pro') . '
';
$content .= '- ' . __('Security Alerts: Identifies potential security threats in real-time', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Security events are particularly important for identifying potential breaches and maintaining site security.', 'activity-log-pro') . '
';
break;
case 'feeds':
$content = '' . __('Activity Log Feeds', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro can provide activity logs as feeds for integration with external systems:', 'activity-log-pro') . '
';
$content .= '' . __('JSON Feed', 'activity-log-pro') . '
';
$content .= '' . __('The JSON feed provides activity logs in JSON format, which is ideal for programmatic access and integration with other systems.', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Enable JSON Feed: Turn on/off the JSON feed', 'activity-log-pro') . '
';
$content .= '- ' . __('Public Access: Allow access without authentication (not recommended for production sites)', 'activity-log-pro') . '
';
$content .= '- ' . __('Feed URL: The URL to access the JSON feed', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('RSS Feed', 'activity-log-pro') . '
';
$content .= '' . __('The RSS feed provides activity logs in RSS format, which is ideal for feed readers and monitoring tools.', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Enable RSS Feed: Turn on/off the RSS feed', 'activity-log-pro') . '
';
$content .= '- ' . __('Public Access: Allow access without authentication (not recommended for production sites)', 'activity-log-pro') . '
';
$content .= '- ' . __('Feed URL: The URL to access the RSS feed', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('For security reasons, it is recommended to keep feeds private and use API keys for authentication when integrating with external systems.', 'activity-log-pro') . '
';
break;
case 'export':
$content = '' . __('Exporting Activity Logs', 'activity-log-pro') . '
';
$content .= '' . __('The Export page allows you to export activity logs for backup, analysis, or compliance purposes:', 'activity-log-pro') . '
';
$content .= '' . __('Export Options', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Date Range: Select a specific date range for the export', 'activity-log-pro') . '
';
$content .= '- ' . __('User: Filter logs by specific user', 'activity-log-pro') . '
';
$content .= '- ' . __('Event Type: Filter logs by event category', 'activity-log-pro') . '
';
$content .= '- ' . __('Action: Filter logs by specific action', 'activity-log-pro') . '
';
$content .= '- ' . __('Format: Choose between CSV and JSON export formats', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Export Process', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Select your export options', 'activity-log-pro') . '
';
$content .= '- ' . __('Click the "Generate Export" button', 'activity-log-pro') . '
';
$content .= '- ' . __('Wait for the export to be generated (this may take some time for large exports)', 'activity-log-pro') . '
';
$content .= '- ' . __('Click the "Download Export" button when it appears', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Exported files can be imported into spreadsheet applications, databases, or other analysis tools.', 'activity-log-pro') . '
';
break;
case 'integrations':
$content = '' . __('About Integrations', 'activity-log-pro') . '
';
$content .= '' . __('The Integrations page allows you to extend Activity Log Pro\'s functionality with additional third-party plugin integrations.', 'activity-log-pro') . '
';
$content .= '' . __('Each integration provides specialized tracking for activities specific to that plugin. You can enable or disable individual integrations based on your needs.', 'activity-log-pro') . '
';
$content .= '' . __('WooCommerce Integration', 'activity-log-pro') . '
';
$content .= '' . __('The WooCommerce integration provides comprehensive tracking of all e-commerce activities:', 'activity-log-pro') . '
';
$content .= '' . __('Orders', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Order creation and updates', 'activity-log-pro') . '
';
$content .= '- ' . __('Status changes and transitions', 'activity-log-pro') . '
';
$content .= '- ' . __('Product additions, removals, and quantity changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Order notes (both private and customer-facing)', 'activity-log-pro') . '
';
$content .= '- ' . __('Order trash and permanent deletion', 'activity-log-pro') . '
';
$content .= '- ' . __('Refunds and payment status changes', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Products', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Product creation and updates', 'activity-log-pro') . '
';
$content .= '- ' . __('Stock level changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Price modifications', 'activity-log-pro') . '
';
$content .= '- ' . __('Category and tag changes', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Customers', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Customer account creation', 'activity-log-pro') . '
';
$content .= '- ' . __('Profile updates', 'activity-log-pro') . '
';
$content .= '- ' . __('Address changes', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Other Features', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Coupon management', 'activity-log-pro') . '
';
$content .= '- ' . __('Tax rate changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Shipping zone updates', 'activity-log-pro') . '
';
$content .= '- ' . __('Payment gateway configuration', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Note: The WooCommerce integration supports both traditional post-based orders and the new HPOS (High-Performance Order Storage) system.', 'activity-log-pro') . '
';
return $content;
case 'stats':
$content = '' . __('About Stats & Insights', 'activity-log-pro') . '
';
$content .= '' . __('The Stats & Insights page provides visual analytics and detailed metrics about the activity logs in your WordPress site.', 'activity-log-pro') . '
';
$content .= '' . __('Use these statistics to identify patterns, monitor user activity, and improve security.', 'activity-log-pro') . '
';
return $content;
case 'stats-overview':
$content = '' . __('Understanding Overview Metrics', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro provides various metrics to help you understand your WordPress activity:', 'activity-log-pro') . '
';
$content .= '' . __('Daily Stats', 'activity-log-pro') . '
';
$content .= '' . __('The Daily Stats panel provides a snapshot of today\'s activity:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Activities Today: The total number of log entries recorded today with a comparison to yesterday.', 'activity-log-pro') . '
';
$content .= '- ' . __('Active Users: The number of distinct users who have performed activities today.', 'activity-log-pro') . '
';
$content .= '- ' . __('Top Event Type: The most frequently recorded event category today.', 'activity-log-pro') . '
';
$content .= '- ' . __('Failed Logins: The number of unsuccessful login attempts recorded today.', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Activity Overview', 'activity-log-pro') . '
';
$content .= '' . __('The Activity Overview section displays key metrics about your overall logs:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Total Logs: The total number of activity log entries recorded.', 'activity-log-pro') . '
';
$content .= '- ' . __('Database Size: The approximate size of your log data in the database.', 'activity-log-pro') . '
';
$content .= '- ' . __('Event Types: The number of different event categories being tracked.', 'activity-log-pro') . '
';
$content .= '- ' . __('Active Users: The number of distinct users with recorded activities.', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Activity Trends', 'activity-log-pro') . '
';
$content .= '' . __('The Activity Trends section provides visual analytics of your WordPress activity:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Daily Activity Chart: Interactive chart showing activity trends over time. You can adjust the time range (7, 14, or 30 days) using the dropdown selector to analyze different time periods. This helps identify patterns, peak activity times, and unusual spikes.', 'activity-log-pro') . '
';
$content .= '- ' . __('Activity by Event Type Chart: Pie chart visualizing the distribution of activities across different event types, with percentage breakdowns for each category. This gives a clear proportional view of what kinds of actions are most common on your site.', 'activity-log-pro') . '
';
$content .= '- ' . __('Action Type Distribution Chart: Doughnut chart showing the breakdown of different action types (such as created, updated, deleted) across your site, helping you understand the most common operations being performed.', 'activity-log-pro') . '
';
$content .= '- ' . __('Peak Activity Times: Displays a heatmap visualization showing when your site is most active throughout the week. This helps identify patterns in user activity by day and hour, highlighting the busiest and quietest periods.', 'activity-log-pro') . '
';
$content .= '- ' . __('Top Activities List: Lists the most frequent action types in your logs, showing both the event type and specific action.', 'activity-log-pro') . '
';
$content .= '
';
return $content;
case 'stats-security':
$content = '' . __('Security Insights Explained', 'activity-log-pro') . '
';
$content .= '' . __('The Security Insights section helps you monitor potential security concerns:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Failed Login Attempts: The total number of unsuccessful login attempts.', 'activity-log-pro') . '
';
$content .= '- ' . __('Suspicious IPs: IP addresses with multiple failed login attempts.', 'activity-log-pro') . '
';
$content .= '- ' . __('Plugin Changes: The number of plugin activation, deactivation, and update events.', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Regularly reviewing these metrics can help identify potential security threats before they become serious issues.', 'activity-log-pro') . '
';
return $content;
case 'security-best-practices':
$content = '' . __('Security Best Practices', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro helps enhance your WordPress site security by providing comprehensive audit logging. Here are some security best practices:', 'activity-log-pro') . '
';
$content .= '' . __('Regular Log Review', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Enable Security events tracking in Settings to monitor failed login attempts and suspicious activities', 'activity-log-pro') . '
';
$content .= '- ' . __('Check the Security Insights section daily for failed login attempts', 'activity-log-pro') . '
';
$content .= '- ' . __('Monitor suspicious IP addresses that have multiple failed login attempts', 'activity-log-pro') . '
';
$content .= '- ' . __('Review plugin and theme changes, especially if unexpected', 'activity-log-pro') . '
';
$content .= '- ' . __('Set up regular review schedules for critical site activities', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Alerts and Notifications', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Configure email alerts for critical security events', 'activity-log-pro') . '
';
$content .= '- ' . __('Set up notifications for admin user creation or role changes', 'activity-log-pro') . '
';
$content .= '- ' . __('Consider integrating with external security monitoring systems', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Access Control', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Restrict access to activity logs to authorized personnel only', 'activity-log-pro') . '
';
$content .= '- ' . __('Regularly audit user roles and permissions', 'activity-log-pro') . '
';
$content .= '- ' . __('Use the login notification feature to increase user awareness', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Log Management', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Export and archive logs regularly for compliance purposes', 'activity-log-pro') . '
';
$content .= '- ' . __('Balance log retention period with performance considerations', 'activity-log-pro') . '
';
$content .= '- ' . __('Consider external storage solutions for long-term log retention', 'activity-log-pro') . '
';
$content .= '
';
break;
case 'compliance':
$content = '' . __('Using Activity Log Pro for Compliance', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro helps organizations meet various regulatory compliance requirements by providing comprehensive audit logging capabilities:', 'activity-log-pro') . '
';
$content .= '' . __('GDPR Compliance', 'activity-log-pro') . '
';
$content .= '' . __('For EU General Data Protection Regulation (GDPR) compliance:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Track user data access and modifications', 'activity-log-pro') . '
';
$content .= '- ' . __('Monitor personal data exports and erasure requests', 'activity-log-pro') . '
';
$content .= '- ' . __('Document data processing activities', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('HIPAA Compliance', 'activity-log-pro') . '
';
$content .= '' . __('For healthcare organizations subject to HIPAA:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Track access to protected health information (PHI)', 'activity-log-pro') . '
';
$content .= '- ' . __('Monitor user activity for audit trail requirements', 'activity-log-pro') . '
';
$content .= '- ' . __('Document security incident investigations', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('PCI DSS Compliance', 'activity-log-pro') . '
';
$content .= '' . __('For Payment Card Industry Data Security Standard compliance:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Track access to cardholder data environments', 'activity-log-pro') . '
';
$content .= '- ' . __('Monitor changes to system components', 'activity-log-pro') . '
';
$content .= '- ' . __('Provide audit trails for security investigations', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Compliance Export Requirements', 'activity-log-pro') . '
';
$content .= '' . __('Recommendations for compliance-focused log management:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Set appropriate log retention periods based on your regulatory requirements', 'activity-log-pro') . '
';
$content .= '- ' . __('Establish a regular schedule for exporting and archiving logs', 'activity-log-pro') . '
';
$content .= '- ' . __('Document your log review procedures', 'activity-log-pro') . '
';
$content .= '- ' . __('Consider integrating with dedicated compliance management systems', 'activity-log-pro') . '
';
$content .= '
';
break;
case 'troubleshooting':
$content = '' . __('Troubleshooting with Activity Log Pro', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro can be an invaluable tool for diagnosing and resolving issues on your WordPress site:', 'activity-log-pro') . '
';
$content .= '' . __('Common Troubleshooting Scenarios', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Content Changes: Find out who modified or deleted specific content', 'activity-log-pro') . '
';
$content .= '- ' . __('Plugin Issues: Identify recent plugin activations or updates that might be causing conflicts', 'activity-log-pro') . '
';
$content .= '- ' . __('Setting Changes: Discover changes to WordPress settings that might affect site behavior', 'activity-log-pro') . '
';
$content .= '- ' . __('User Problems: Track user role changes or permission issues', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Effective Log Filtering for Troubleshooting', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Narrow the time range to when the issue first appeared', 'activity-log-pro') . '
';
$content .= '- ' . __('Filter by relevant event types (plugins, settings, posts, etc.)', 'activity-log-pro') . '
';
$content .= '- ' . __('Look for specific users if you suspect user-related issues', 'activity-log-pro') . '
';
$content .= '- ' . __('Use the search function to find specific content or components involved', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Creating Troubleshooting Reports', 'activity-log-pro') . '
';
$content .= '' . __('For ongoing issues or when working with support teams:', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Filter the logs to relevant events', 'activity-log-pro') . '
';
$content .= '- ' . __('Export the filtered logs as CSV or JSON', 'activity-log-pro') . '
';
$content .= '- ' . __('Share the export with developers or support personnel', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('This approach provides detailed context about what happened before, during, and after an issue occurred.', 'activity-log-pro') . '
';
$content .= '' . __('Feed URL Compatibility', 'activity-log-pro') . '
';
$content .= '' . __('If you experience issues with JSON or RSS feed URLs (such as 404 errors):', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Permalink Structure: Activity Log Pro automatically detects your WordPress permalink structure and generates compatible URLs', 'activity-log-pro') . '
';
$content .= '- ' . __('Index Permalinks: For sites using Plain permalinks (/?p=123) or Almost Pretty permalinks (/index.php/...), feed URLs use query string parameters', 'activity-log-pro') . '
';
$content .= '- ' . __('Pretty Permalinks: For sites using Pretty permalinks, feed URLs use clean REST API formats', 'activity-log-pro') . '
';
$content .= '- ' . __('Changing Permalinks: Feed URLs automatically update when you change your permalink structure in Settings > Permalinks', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . sprintf(
/* translators: %s: WordPress settings URL */
__('If feed URLs are not working, check your permalink settings and ensure your web server supports your chosen permalink structure.', 'activity-log-pro'),
admin_url('options-permalink.php')
) . '
';
break;
case 'premium':
$content = '' . __('Premium Features', 'activity-log-pro') . '
';
$content .= '' . __('Activity Log Pro Premium is an upgrade that unlocks advanced features for professional site monitoring, compliance, and support.', 'activity-log-pro') . '
';
$content .= '' . __('How to Get Premium', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . sprintf(
/* translators: %s: Official website URL */
__('Visit the official website to purchase a license.', 'activity-log-pro'),
'https://activitylog.pro/pricing/'
) . '
';
$content .= '- ' . __('Download the premium add-on after purchase.', 'activity-log-pro') . '
';
$content .= '- ' . __('Install and activate the premium plugin via your WordPress dashboard.', 'activity-log-pro') . '
';
$content .= '- ' . __('Enter your license key in the plugin settings to enable premium features and updates.', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Pricing & Costs', 'activity-log-pro') . '
';
$content .= '' . sprintf(
/* translators: %s: Pricing page URL */
__('Premium is available as an annual subscription: Personal 1 Site License, Business 3 Site License, Developer 20 Site License. For current pricing, see the pricing page.', 'activity-log-pro'),
'https://activitylog.pro/pricing/'
) . '
';
$content .= '' . __('Premium Benefits', 'activity-log-pro') . '
';
$content .= '';
$content .= '- ' . __('Advanced integrations (WooCommerce, Yoast, and more)', 'activity-log-pro') . '
';
$content .= '- ' . __('Extended log retention and advanced filtering', 'activity-log-pro') . '
';
$content .= '- ' . __('Export logs to CSV, JSON, and other formats', 'activity-log-pro') . '
';
$content .= '- ' . __('Priority support and regular updates', 'activity-log-pro') . '
';
$content .= '- ' . __('Premium dashboard widgets and analytics', 'activity-log-pro') . '
';
$content .= '- ' . __('IP address privacy controls', 'activity-log-pro') . '
';
$content .= '- ' . __('And much moreā¦', 'activity-log-pro') . '
';
$content .= '
';
$content .= '' . __('Support & Updates', 'activity-log-pro') . '
';
$content .= '' . __('Premium users receive priority email support and access to all new features and improvements as they are released.', 'activity-log-pro') . '
';
$content .= '' . __('Upgrade Now', 'activity-log-pro') . '
';
$content .= '' . sprintf(
/* translators: %s: Upgrade page URL */
__('Ready to unlock premium features? Upgrade to Premium today!', 'activity-log-pro'),
'https://activitylog.pro/pricing/'
) . '
';
break;
default:
$content = '' . __('Select a help topic from the dropdown menu to view detailed information.', 'activity-log-pro') . '
';
break;
}
return $content;
}
/**
* Get the help sidebar content
*
* @since 1.0.0
* @return string The help sidebar content
*/
private function get_help_sidebar() {
$sidebar = '' . __('For more information:', 'activity-log-pro') . '
';
$sidebar .= '' . __('Documentation', 'activity-log-pro') . '
';
$sidebar .= '' . __('Support', 'activity-log-pro') . '
';
$sidebar .= '' . __('FAQ', 'activity-log-pro') . '
';
return $sidebar;
}
}