Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Programmatically determine if a given redirect is active

$
0
0

Replies: 0

Is there a way to programmatically determine if a given redirect is active or inactive?

I am writing a plugin for a local food co-op that have a weekly market that is open for a few days eack week.

It is “closed” by enabling a redirect that diverts traffic from the checkout page to a “Market closed” page, so the status of the redirect acts as an on/off switch for the market.

I’d like to display a message indicating whether the market is currently open (ie the redirect is inactive). Is there any way to get that information?

I realise this is not a typical use case for the plugin 🙂

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles