From bf9a2125a3b4f767fd1eaae65e52fa44dbe912d6 Mon Sep 17 00:00:00 2001 From: bengizmo Date: Fri, 30 May 2025 10:51:52 -0600 Subject: [PATCH] fix: Ensure tribe_community_events shortcode is processed on manage-event page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added HVAC_Manage_Event class to handle shortcode processing - Ensures do_shortcode() is explicitly called for the page content - Shows helpful message if TEC Community Events plugin is not active - Adds authentication check for the manage-event page This fixes the issue where the raw shortcode was being displayed instead of the event submission form. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../includes/class-hvac-community-events.php | 1 + .../includes/class-hvac-manage-event.php | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-community-events.php b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-community-events.php index fe27ac05..0a8881d3 100644 --- a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-community-events.php +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-community-events.php @@ -58,6 +58,7 @@ class HVAC_Community_Events { 'class-event-form-handler.php', // Add our form handler 'class-event-author-fixer.php', // Fix event author assignment 'class-hvac-dashboard.php', // New dashboard handler + 'class-hvac-manage-event.php', // Manage event page handler 'certificates/class-certificate-installer.php', // Certificate database installer 'certificates/class-certificate-manager.php', // Certificate management 'certificates/class-certificate-generator.php', // Certificate generation diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php new file mode 100644 index 00000000..4a4fb5d3 --- /dev/null +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-manage-event.php @@ -0,0 +1,73 @@ + +

The event submission form is currently unavailable. Please ensure:

+ +

Return to Dashboard

+ '; + } + + return $content; + } + + /** + * Check authentication for manage-event page + */ + public function check_manage_event_auth() { + // Check if we're on the manage-event page + if (is_page('manage-event') && !is_user_logged_in()) { + // Redirect to login page + wp_redirect(home_url('/community-login/?redirect_to=' . urlencode($_SERVER['REQUEST_URI']))); + exit; + } + } +} + +// Initialize the manage event handler +new HVAC_Manage_Event(); \ No newline at end of file