pfeifferNet

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
since
1.0.0
copyright

2024 Keith Pfeiffer

wordpress-plugin

Plugin Name: Setup development. Description: Transform a copied pfeifferNet site, or a clean site to a development site. Version: 1.9.0 Author URI: https://www.pfeiffer.net.au/keith/ Author: Keith Pfeiffer Requires at least: 7.0 Requires PHP: 8.3 Tested up to: 7.0 Text Domain: 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

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
since
1.0.0

ALLOWED_SUBSCRIBERS

The email addresses of subscribers to retain.

public array<string|int, mixed> ALLOWED_SUBSCRIBERS = array('anneother17@gmail.com')
Tags
since
1.0.0

DEVMASTER_EMAIL

The devmaster email address.

public string DEVMASTER_EMAIL = 'development@pfeiffer.net.au'
Tags
since
1.0.0

LOGO_SLUG

The development site logo slug.

public string LOGO_SLUG = 'dev-logo'
Tags
since
1.0.0

PNET_SETTINGS

The pNet settings name.

public string PNET_SETTINGS = 'pnet_settings'
Tags
since
1.0.0

TRANSIENT_EXPIRATION

The admin notice transient expiration.

public int TRANSIENT_EXPIRATION = 10 * MINUTE_IN_SECONDS
Tags
since
1.1.0

TRANSIENT_KEY

The admin notice transient key.

public string TRANSIENT_KEY = 'setupdev_message'
Tags
since
1.1.0

Functions

activate_plugin()

Setup development site on plugin activation.

activate_plugin() : void
Tags
since
1.0.0

hide_default_notice()

Hide the default admin notice shown on plugin activation.

hide_default_notice() : void

Intentional direct loading of assets.

Tags
since
1.1.0

deactivate_plugin()

Deactivate plugin.

deactivate_plugin() : void
Tags
since
1.1.0

notify_admin()

(Maybe) show a message after activation and then delete the transient.

notify_admin() : void
Tags
since
1.1.0

        
On this page

Search results