'page')); if ($page !== ABJ404_PP) { return; } $notice = get_transient('abj404_plugin_db_notice'); if (!is_array($notice)) { return; } $type = isset($notice['type']) ? $notice['type'] : ''; // Collation issues are developer-level; don't show them to the user. if ($type === 'collation') { return; } $noticeMessage = isset($notice['message']) && is_string($notice['message']) ? $notice['message'] : ''; if ($noticeMessage === '') { return; } $guidance = isset($notice['guidance']) && is_string($notice['guidance']) ? $notice['guidance'] : ''; // Same native notice shape either way; only the left border colour // differs. A condition the plugin degrades past (stale summary columns) // must not wear the red an unusable plugin wears. Payloads written // before this key existed carry no severity and stay errors. $severity = isset($notice['severity']) && $notice['severity'] === ABJ_404_Solution_DatabaseNoticeStateHolder::SEVERITY_WARNING ? 'notice-warning' : 'notice-error'; echo '
404 Solution: ' . esc_html($noticeMessage) . '
'; if ($guidance !== '') { echo '' . esc_html($guidance) . '
'; } if (!empty($notice['error_string'])) { $errorString = is_string($notice['error_string']) ? $notice['error_string'] : ''; echo '' . esc_html($errorString) . '
404 Solution: '; echo esc_html(__('Some required plugin files are missing. Please reinstall the plugin package.', '404-solution')); $missingBasenames = array(); foreach ($missing as $missingPath) { if (is_string($missingPath)) { $missingBasenames[] = basename($missingPath); } } echo '
' . esc_html(implode(', ', $missingBasenames)) . '