Download the PHP package plugin/yard-page-guard without Composer
On this page you can find all versions of the php package plugin/yard-page-guard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yard-page-guard
Yard Page Guard
Description
Assign content owners to WordPress pages (or other post types), allowing them to mark pages as 'verified' and receive automated review reminders based on user-defined dates.
Installation through /wp-admin
- Upload plugin .zip through the 'Upload plugin' button
- Activate the plugin
Installation through Composer
-
Install this package with Composer:
- Activate the plugin through the 'Plugins' menu in WordPress
Security
Access to the metaboxes is granted to all users with the edit_pages capability initially. Once an author and content owner are connected to a post object, only these two entities will have access. Besides that, admin roles (see item #3 under the Hooks paragraph) also have access to the metaboxes. As well as the admin overview
Configuration
Add the following constants to wp-config.php as needed. All constants fall back to $_ENV equivalents.
Authentication salt
Used to sign review tokens. For a cross-site PDC/Pub connection this value must be identical on all connected sites.
Falls back to $_ENV['YPG_AUTH_SALT'], then the WordPress core AUTH_SALT constant, and then $_ENV['AUTH_SALT'].
External endpoint URLs (Fusion PDC / OpenPub)
Required when this site connects to an external Fusion PDC or OpenPub installation.
Falls back to $_ENV['OPENPDC_ENDPOINT'] / $_ENV['OPENPUB_ENDPOINT'].
Hooks
-
Post types which will have the page guard metaboxes registered:
-
Post statuses that will be used to find posts and the associated content owners who need to receive a notification:
-
Roles that are allowed to bypass (in addition to the post author and content owner):
-
Override the login name of the dummy WordPress user whose admin bar is hidden on the review modal:
-
Disable writing content owner information to internal data fields (Fusion Portal, Fusion PDC, Brave/ACF):
-
Fires after content owner information has been written to internal data fields:
- Fires after content owner information has been removed from internal data fields:
Local Development
The scheduled event ypg_site_cron is executed once a day, which can make testing a bit difficult. However, you can temporarily alter the code in your local development environment to make testing easier.
Inside the register method of the Yard\PageGuard\WPCron\WPCronServiceProvider class, the event is scheduled as follows:
To make testing easier, first ensure you use the filter below before scheduling the event:
Then schedule the event like this:
The event will be executed every 5 seconds. Make sure your local development environment intercepts the sent emails. Don't forget to configure a post so that a notification is sent to the configured content owner.