maintenance_mode
extends abstract_extension
in package
Extension: maintenance_mode - put site in scheduled maintenance - {eac}Doojigger for WordPress
Tags
Table of Contents
- ALIAS = null
- ALLOW_ADMIN = 0b1
- ALLOW_ALL = self::ALLOW_ADMIN | self::ALLOW_NETWORK | self::ALLOW_CRON | self::ALLOW_CLI
- ALLOW_CLI = 0b10000
- ALLOW_CRON = 0b1000
- ALLOW_NETWORK = 0b100
- ALLOW_NON_PHP = 0b100000
- DEFAULT_DISABLED = 0b1000000
- DEFAULT_HTML = "[PageHeader]\n[PageContent]\n" . "<div style='background:#fff;color:#000;text-align:center;padding:3em;'>\n" . "\t<div class='scheduled-maintenance'>\n" . "\t\t<h1>[BlogName]<br>[BlogDescription]</h1>\n" . "\t\t<h2>This site is currently undergoing scheduled maintenance.</h2>\n" . "\t\t<h3>We're sorry for the inconvenience. Please check back soon.</h3>\n" . "\t</div>\n</div>\n" . "[/PageContent]\n[PageFooter]"
- ENABLE_OPTION = null
- ONLY_ADMIN = 0b10
- TAB_NAME = null
- VERSION = '24.0315.1'
- __call() : mixed
- magic method to call plugin or extension methods
- __construct() : void
- constructor method
- __destruct() : void
- Extension destructor
- __get() : mixed
- magic method to call parent plugin __get()
- addActionsAndFilters() : void
- Add filters and actions - called from main plugin
- addShortcodes() : void
- Add shortcodes- called from main plugin
- admin_options_help() : void
- Add help tab on admin page
- admin_options_settings() : void
- register options on options_settings_page
- getActiveUntil() : string
- get active (or not) until
- getAlias() : const
- get the extension alias
- getClassName() : bool
- getClassName - get the class/extension name without namespace
- getMaintenanceMessage() : string
- get maintenance mode html
- getVersion() : const
- get the extension version
- initialize() : void
- initialize method - called from main plugin
- is_network_enabled() : bool
- is_network_enabled - set or test extension enabled for use at the network level
- is_network_option() : bool|mixed
- is this class network enabled and does option match a value
- isEnabled() : bool
- isEnabled - set or test extension enabled for use
- network_check_enabled() : mixed
- filter for options_form_post_
Constants
ALIAS
public
string
ALIAS
= null
in child class for alias class name
ALLOW_ADMIN
public
constructor
ALLOW_ADMIN
= 0b1
flags (actual values subject to change)
ALLOW_ALL
public
mixed
ALLOW_ALL
= self::ALLOW_ADMIN | self::ALLOW_NETWORK | self::ALLOW_CRON | self::ALLOW_CLI
ALLOW_CLI
public
mixed
ALLOW_CLI
= 0b10000
ALLOW_CRON
public
mixed
ALLOW_CRON
= 0b1000
ALLOW_NETWORK
public
mixed
ALLOW_NETWORK
= 0b100
ALLOW_NON_PHP
public
mixed
ALLOW_NON_PHP
= 0b100000
DEFAULT_DISABLED
public
mixed
DEFAULT_DISABLED
= 0b1000000
DEFAULT_HTML
public
string
DEFAULT_HTML
= "[PageHeader]\n[PageContent]\n" . "<div style='background:#fff;color:#000;text-align:center;padding:3em;'>\n" . "\t<div class='scheduled-maintenance'>\n" . "\t\t<h1>[BlogName]<br>[BlogDescription]</h1>\n" . "\t\t<h2>This site is currently undergoing scheduled maintenance.</h2>\n" . "\t\t<h3>We're sorry for the inconvenience. Please check back soon.</h3>\n" . "\t</div>\n</div>\n" . "[/PageContent]\n[PageFooter]"
default maintenance_mode html
ENABLE_OPTION
public
string|array<string|int, mixed>|bool
ENABLE_OPTION
= null
to set (or disable) default group display/switch false disable the 'Enabled'' option for this group string the label for the 'Enabled' option array override options for the 'Enabled' option (label,help,title,info, etc.)
ONLY_ADMIN
public
mixed
ONLY_ADMIN
= 0b10
TAB_NAME
public
string
TAB_NAME
= null
to set default tab name
VERSION
public
string
VERSION
= '24.0315.1'
extension version
Methods
__call()
magic method to call plugin or extension methods
public
__call(mixed $method, mixed $arguments) : mixed
Parameters
- $method : mixed
-
the method name or [extension,method]
- $arguments : mixed
-
the arguments to method name
Return values
mixed —result of method called
__construct()
constructor method
public
__construct(object $plugin) : void
Parameters
- $plugin : object
-
main plugin object
Return values
void —__destruct()
Extension destructor
public
__destruct() : void
Return values
void —__get()
magic method to call parent plugin __get()
public
__get(string $property) : mixed
Parameters
- $property : string
-
the property name or extension name
Return values
mixed —result of plugin __get()
addActionsAndFilters()
Add filters and actions - called from main plugin
public
addActionsAndFilters() : void
Return values
void —addShortcodes()
Add shortcodes- called from main plugin
public
addShortcodes() : void
Return values
void —admin_options_help()
Add help tab on admin page
public
admin_options_help() : void
Return values
void —admin_options_settings()
register options on options_settings_page
public
admin_options_settings() : void
Tags
Return values
void —getActiveUntil()
get active (or not) until
public
getActiveUntil() : string
Return values
string —getAlias()
get the extension alias
public
getAlias() : const
Return values
const —ALIAS string
getClassName()
getClassName - get the class/extension name without namespace
public
getClassName([object $class = null ]) : bool
Parameters
- $class : object = null
-
optional class object
Return values
bool —getMaintenanceMessage()
get maintenance mode html
public
getMaintenanceMessage() : string
Return values
string —getVersion()
get the extension version
public
getVersion() : const
Return values
const —VERSION string
initialize()
initialize method - called from main plugin
public
initialize() : void
Return values
void —is_network_enabled()
is_network_enabled - set or test extension enabled for use at the network level
public
is_network_enabled() : bool
Return values
bool —is_network_option()
is this class network enabled and does option match a value
public
is_network_option(string $optionName[, mixed $value = null ]) : bool|mixed
Parameters
- $optionName : string
-
option name
- $value : mixed = null
-
check this value
Return values
bool|mixed —option is set and has value
isEnabled()
isEnabled - set or test extension enabled for use
public
isEnabled([bool|string $enabled = null ][, bool $perm = null ]) : bool
Parameters
- $enabled : bool|string = null
-
true|false or other extension name
- $perm : bool = null
-
optional, to permanently set enabled option
Return values
bool —network_check_enabled()
filter for options_form_post_
public
network_check_enabled( $value, $fieldName, $metaData, mixed $priorValue) : mixed
Parameters
- $value :
-
- the value POSTed
- $fieldName :
-
- the name of the field/option
- $metaData :
-
- the option metadata
- $priorValue : mixed