WP Manifestindependent plugin directory
manifest / seo / wp-scheduled-redirection

WP Scheduled Redirection self-updates

WordPress plugin that redirects URLs based on Google Calendar events. Perfect for QR codes that dynamically redirect to different content during scheduled events.

by Xadja · github.com/sawdustandcoffee/wp-scheduled-redirection · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/sawdustandcoffee/wp-scheduled-redirection/archive/refs/heads/main.zip

Ships its own WordPress updater (Plugin Update Checker), so new versions show up under Dashboard → Updates.

A WordPress plugin that redirects URLs based on Google Calendar events. Perfect for businesses that want to use static QR codes that dynamically redirect to different content based on scheduled events.

Description

WP Scheduled Redirection allows you to create redirect rules that link a source URL (perfect for QR codes) to a default destination, with the ability to override that destination during scheduled Google Calendar events.

Use Case Example

A restaurant prints QR codes on their tables that link to /menu. During the week, visitors are redirected to their regular menu. But on Thursday nights during karaoke events (scheduled in Google Calendar), the same QR code automatically redirects to a karaoke signup page.

Features

  • Google Calendar Integration: Connect your Google Calendar via OAuth 2.0
  • Flexible Redirect Rules: Create multiple redirect rules with unique source URLs
  • Codeword System: Embed redirect URLs in calendar events using customizable codeword formats
  • Real-time Updates: Webhooks and polling ensure redirects update promptly
  • Conflict Detection: Warns about overlapping events that might cause redirect conflicts
  • Comprehensive Logging: Track all redirects, syncs, and errors
  • WordPress Native UI: Seamlessly integrates with WordPress admin

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • MySQL 5.7+ (via WordPress)
  • HTTPS enabled (required for Google OAuth)
  • Google Cloud Console project with Calendar API enabled

Installation

  1. Download the plugin files
  2. Upload to /wp-content/plugins/wp-scheduled-redirection/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Navigate to 'Scheduled Redirects' in the admin menu to configure

Configuration

Google Cloud Setup

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Calendar API
  4. Configure the OAuth consent screen
  5. Create OAuth 2.0 credentials (Web application type)
  6. Add your authorized redirect URI:
    https://yourdomain.com/wp-admin/admin-ajax.php?action=wsr_oauth_callback

Plugin Setup

  1. Go to Scheduled RedirectsSettings
  2. Enter your Google API Client ID and Client Secret
  3. Configure polling frequency (for backup sync)
  4. Set log retention period

Creating a Redirect Rule

  1. Go to Scheduled RedirectsRedirect Rules
  2. Click Add New Rule
  3. Enter the source URL path (e.g., /qr-menu)
  4. Enter the default destination URL
  5. Connect your Google account
  6. Select the calendar to monitor
  7. Choose your preferred codeword format
  8. Save the rule

Adding Calendar Events with Redirects

Create events in your Google Calendar with a codeword in the description:

Format: ##url##

Karaoke Night
##https://example.com/karaoke-signup##

Format: link:url

Happy Hour Special
link:https://example.com/happy-hour

Format: REDIRECT:url

Live Music Event
REDIRECT:https://example.com/live-music

When the event is active, visitors to your source URL will be redirected to the codeword URL. When the event ends, they'll be redirected to your default destination.

How It Works

  1. Sync: The plugin periodically syncs with your Google Calendar (via webhooks and polling)
  2. Parse: Events with codewords are extracted and stored locally
  3. Match: When a visitor hits a source URL, the plugin checks for active events
  4. Redirect: A 307 (temporary) redirect sends visitors to the appropriate destination

Codeword Formats

Format Example
##url## ##https://example.com/page##
link:url link:https://example.com/page
REDIRECT:url REDIRECT:https://example.com/page

All formats are case-insensitive.

Troubleshooting

Redirects not working

  • Check that the rule is enabled
  • Verify the source URL path matches exactly
  • Ensure events are synced (check Logs tab)
  • Confirm events have valid codewords

Calendar not syncing

  • Check Google account connection status
  • Verify API credentials are correct
  • Look for errors in the Logs tab
  • Try manual sync

Conflicts detected

  • Overlapping events with codewords cause conflicts
  • Use separate calendars for overlapping redirect needs
  • Check the conflict warnings in the admin

Security

  • OAuth tokens are encrypted in the database
  • All admin actions require manage_options capability
  • Forms use WordPress nonce verification
  • Sensitive operations require confirmation

Changelog

1.0.9

  • Added version badge to Support page header for easy reference

1.0.8

  • Added Xadja company logo to the Support page About section

1.0.7

  • Added in-plugin Documentation and Support pages
  • Docs and Support links in footer now open within plugin admin
  • Updated plugin author to Xadja (xadja.com)

1.0.6

  • Super admins can now update directly from subsite plugins page (no need to go to Network Admin)

1.0.5

  • Added "last synced" timestamp to admin footer (e.g., "synced 5 mins ago")

1.0.4

  • Improved multisite compatibility: shows update notice on site plugins page with manual download link
  • Added documentation for multisite network activation requirement

1.0.3

  • Added live status summary to admin footer (rule count, enabled count, active events indicator)

1.0.2

  • Fixed plugin update mechanism to use GitHub Releases for proper folder naming

1.0.1

  • Added version number and helpful links to admin page footer
  • Integrated Plugin Update Checker for GitHub-based updates

1.0.0

  • Initial release
  • Google Calendar OAuth integration
  • Redirect rules management
  • Webhook and polling sync
  • Conflict detection
  • Comprehensive logging

License

GPL v2 or later

Support

For support, please open an issue on the plugin repository.