WordPress plugin intelligence profile

Page Guard

Adds a short code which allows conditional output of page content and title based on the value of a token passed as a URL parameter or a POST variable

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.0
Current version1.1
WordPress coverageTested up to WordPress 6.0
Minimum stackWP 4.7 · PHP —
Directory statusactive
Last directory update22 Aug 20224y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Page Guard version 1.1 as active, updated 4y ago and tested up to WordPress 6.0.

Overview

About this plugin

Page Guard uses a single URL parameter or POST variable as a means of providing a token to guard access to any page on which this plugin’s shortcode is placed. Output of alternative content can be made to occur when the token is missing or fails to match what is expected – if the token received matches the expected one, the controlled content can be revealed to the visitor.

)

The shortcode to use is ‘pageguard’ – its attributes are:

g. g. 'x34ggj45b' ne (optional) -> as for "eq" but when used, shortcode will output content on non matching token absent (optional) -> when absent="1", shortcode will output content on detection of missing token title (optional) -> a string containing a page title to apply when the parent shortcode's criteria are met

Syntax examples:

show block on matching token - [pageguard param="token" eq="download"] Text to be output on matching token found [/pageguard]

show block on non match + change title [pageguard tokenparam="token" ne="download" title="Downloads - invalid token"] Error text for output when token fails to match [/pageguard]

show this on no token found + change title [pageguard tokenparam="token" absent="1" title="Downloads - missing token"] Error text for output when token is missing [/pageguard]

Usage

A typical use scenario might be to control access to a downloads page. Suppose you have a PayPal “Buy Now” button on your site which allows visitors to make a payment for say, an eBook or audio recording. When setting up the button in your PayPal account you specify a URL on your site to which the visitor is returned after they’ve made payment.

On this return page you’ve added a link the visitor can use to download their purchase – however, you don’t want any non paying visitors to have access to the download link(s) on the page! )

g.

dltoken=x34ggj45b"

Next, add pageguard short codes for the cases you intend to handle to your return page in WordPress –

[pageguard param="token" eq="x34ggj45b" title="Title for matched token"] Text to be output on matching token found [/pageguard]

[pageguard tokenparam="token" ne="x34ggj45b" title="Title for failed match"] Error text for output when token fails to match [/pageguard]

[pageguard tokenparam="token" absent="1" title="Title for missing token"] Error text for output when token is missing [/pageguard]

This will correctly display the main content for the page when Page Guard detects a matching token. It also provides for the possibility of providing different error content for the page in the event of the token being incorrect or missing.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • conditional output
  • conditional title
  • query string
  • post
  • url
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.0

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.0.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.0
Minimum requirementsWordPress 4.7 · PHP not listed
Update activity22 Aug 20224y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.