setupDev.php
Set up pfeifferNet development site.
- Functionality for the pfeifferNet development website(s).
- Sets copied WordPress production site to development status, or sets a clean WordPress site to development status.
- Run-once logic largely copied from https://wordpress.org/plugins/reset-roles-and-capabilities/
Tags
Table of Contents
Constants
- ACTIVATION_KEY = 'setupdev_activated'
- The plugin activation options key.
- ALLOWED_SUBSCRIBERS = array('anneother17@gmail.com')
- The email addresses of subscribers to retain.
- DEVMASTER_EMAIL = 'development@pfeiffer.net.au'
- The devmaster email address.
- LOGO_SLUG = 'dev-logo'
- The development site logo slug.
- PNET_SETTINGS = 'pnet_settings'
- The pNet settings name.
- TRANSIENT_EXPIRATION = 10 * MINUTE_IN_SECONDS
- The admin notice transient expiration.
- TRANSIENT_KEY = 'setupdev_message'
- The admin notice transient key.
Functions
- activate_plugin() : void
- Setup development site on plugin activation.
- hide_default_notice() : void
- Hide the default admin notice shown on plugin activation.
- deactivate_plugin() : void
- Deactivate plugin.
- notify_admin() : void
- (Maybe) show a message after activation and then delete the transient.
Constants
ACTIVATION_KEY
The plugin activation options key.
public
string
ACTIVATION_KEY
= 'setupdev_activated'
Tags
ALLOWED_SUBSCRIBERS
The email addresses of subscribers to retain.
public
array<string|int, mixed>
ALLOWED_SUBSCRIBERS
= array('anneother17@gmail.com')
Tags
DEVMASTER_EMAIL
The devmaster email address.
public
string
DEVMASTER_EMAIL
= 'development@pfeiffer.net.au'
Tags
LOGO_SLUG
The development site logo slug.
public
string
LOGO_SLUG
= 'dev-logo'
Tags
PNET_SETTINGS
The pNet settings name.
public
string
PNET_SETTINGS
= 'pnet_settings'
Tags
TRANSIENT_EXPIRATION
The admin notice transient expiration.
public
int
TRANSIENT_EXPIRATION
= 10 * MINUTE_IN_SECONDS
Tags
TRANSIENT_KEY
The admin notice transient key.
public
string
TRANSIENT_KEY
= 'setupdev_message'
Tags
Functions
activate_plugin()
Setup development site on plugin activation.
activate_plugin() : void
Tags
hide_default_notice()
Hide the default admin notice shown on plugin activation.
hide_default_notice() : void
Intentional direct loading of assets.
Tags
deactivate_plugin()
Deactivate plugin.
deactivate_plugin() : void
Tags
notify_admin()
(Maybe) show a message after activation and then delete the transient.
notify_admin() : void