setupDev
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
- create_devmaster() : int
- Create the devmaster user as an administrator.
- move_content() : void
- Move webmaster content to devmaster
- set_site_options() : void
- Set the dev values in wp_options
- get_site_title() : string
- Get the new site title.
- get_site_description() : string
- Get the new site description.
- get_logo_id() : int
- Get the development site logo ID.
- set_retina_logo() : void
- Set the apple touch icon.
- set_site_settings() : void
- Set the development pNet settings.
- delete_subscribers() : void
- Delete subscribers.
- get_allowed_subscribers() : array<string|int, mixed>
- Get allowed susbribers.
- set_activation_timestamp() : void
- Store activation timestamp.
- 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
create_devmaster()
Create the devmaster user as an administrator.
create_devmaster() : int
Tags
Return values
int —The devmaster user id.
move_content()
Move webmaster content to devmaster
move_content([int $devmaster_id = 0 ]) : void
Parameters
- $devmaster_id : int = 0
-
The id of the devmaster account.
Tags
set_site_options()
Set the dev values in wp_options
set_site_options() : void
Tags
get_site_title()
Get the new site title.
get_site_title() : string
Tags
Return values
string —The modified site title.
get_site_description()
Get the new site description.
get_site_description() : string
Tags
Return values
string —The modified site description.
get_logo_id()
Get the development site logo ID.
get_logo_id() : int
Tags
Return values
int —The id of the dev site logo.
set_retina_logo()
Set the apple touch icon.
set_retina_logo([int $logo_id = 0 ]) : void
Parameters
- $logo_id : int = 0
-
The ID of the site logo image.
Tags
set_site_settings()
Set the development pNet settings.
set_site_settings() : void
Tags
delete_subscribers()
Delete subscribers.
delete_subscribers() : void
Tags
get_allowed_subscribers()
Get allowed susbribers.
get_allowed_subscribers() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —An array of allowed subscriber ids.
set_activation_timestamp()
Store activation timestamp.
set_activation_timestamp() : void
Tags
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