wpmu_installer
extends abstract_extension
in package
Extension: wpmu_installer - install scripts/files using WP_Filesystem
Tags
Table of Contents
- ALIAS = 'installer'
- 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
- DEFAULT_DISABLED = 0b100000
- INSTALLER_TRANSIENT = 'wpmu_installer'
- ONLY_ADMIN = 0b10
- VERSION = '23.1103.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 extension actions and filter
- addShortcodes() : void
- Add extension shortcodes
- delete() : bool
- delete - installer invoke('delete',...) shortcut
- dequeue() : object
- dequeue (remove) an installer action
- enqueue() : object
- enqueue (append) an installer action
- getAlias() : const
- get the extension alias
- getClassName() : bool
- getClassName - get the class/extension name without namespace
- getVersion() : const
- get the extension version
- initialize() : bool
- Extension initialization
- install() : bool
- install - installer invoke('install',...) shortcut
- invoke() : bool
- invoke - with no arguments, start de-spooling the queue, with arguments, invoke installer
- 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
- isQueue() : bool
- isQueued is an installer action queued
- uninstall() : bool
- uninstall - installer invoke('uninstall',...) shortcut
- update() : bool
- update - installer invoke('update',...) shortcut
- wpmu_despool() : bool
- check transient for queued installer action and run (all_admin_notices action and invoke() method)
Constants
ALIAS
public
string
ALIAS
= 'installer'
extension alias
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
DEFAULT_DISABLED
public
mixed
DEFAULT_DISABLED
= 0b100000
INSTALLER_TRANSIENT
public
string
INSTALLER_TRANSIENT
= 'wpmu_installer'
installer transient name
ONLY_ADMIN
public
mixed
ONLY_ADMIN
= 0b10
VERSION
public
string
VERSION
= '23.1103.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 extension actions and filter
public
addActionsAndFilters() : void
Called after loading, instantiating, and initializing all extensions
Return values
void —addShortcodes()
Add extension shortcodes
public
addShortcodes() : void
Called after loading, instantiating, and initializing all extensions
Return values
void —delete()
delete - installer invoke('delete',...) shortcut
public
delete(string|array<string|int, mixed> $installMethod, array<string|int, mixed> $installOptions[, object|null $onSuccess = null ]) : bool
Parameters
- $installMethod : string|array<string|int, mixed>
-
- calling method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed>
-
- (un)install options
- $onSuccess : object|null = null
-
- callback on successful install,
Return values
bool —success/failure
dequeue()
dequeue (remove) an installer action
public
dequeue(string $installAction, string|array<string|int, mixed> $installMethod[, array<string|int, mixed> $installOptions = [] ]) : object
Parameters
- $installAction : string
-
- install/uninstall
- $installMethod : string|array<string|int, mixed>
-
- installer method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed> = []
-
- (un)install options (not used)
Return values
object —$this
enqueue()
enqueue (append) an installer action
public
enqueue(string $installAction, string|array<string|int, mixed> $installMethod[, array<string|int, mixed> $installOptions = [] ]) : object
Parameters
- $installAction : string
-
- install/uninstall
- $installMethod : string|array<string|int, mixed>
-
- installer method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed> = []
-
- (un)install options
Return values
object —$this
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 —getVersion()
get the extension version
public
getVersion() : const
Return values
const —VERSION string
initialize()
Extension initialization
public
initialize() : bool
Called after loading and instantiating all extensions
Return values
bool —is enabled
install()
install - installer invoke('install',...) shortcut
public
install(string|array<string|int, mixed> $installMethod, array<string|int, mixed> $installOptions[, object|null $onSuccess = null ]) : bool
Parameters
- $installMethod : string|array<string|int, mixed>
-
- calling method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed>
-
- (un)install options
- $onSuccess : object|null = null
-
- callback on successful install,
Return values
bool —success/failure
invoke()
invoke - with no arguments, start de-spooling the queue, with arguments, invoke installer
public
invoke() : bool
Tags
Return values
bool —success/failure
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 —isQueue()
isQueued is an installer action queued
public
isQueue(string $installAction, string|array<string|int, mixed> $installMethod[, array<string|int, mixed> $installOptions = [] ]) : bool
Parameters
- $installAction : string
-
- install/uninstall
- $installMethod : string|array<string|int, mixed>
-
- installer method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed> = []
-
- (un)install options (not used)
Return values
bool —uninstall()
uninstall - installer invoke('uninstall',...) shortcut
public
uninstall(string|array<string|int, mixed> $installMethod, array<string|int, mixed> $installOptions[, object|null $onSuccess = null ]) : bool
Parameters
- $installMethod : string|array<string|int, mixed>
-
- calling method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed>
-
- (un)install options
- $onSuccess : object|null = null
-
- callback on successful install,
Return values
bool —success/failure
update()
update - installer invoke('update',...) shortcut
public
update(string|array<string|int, mixed> $installMethod, array<string|int, mixed> $installOptions[, object|null $onSuccess = null ]) : bool
Parameters
- $installMethod : string|array<string|int, mixed>
-
- calling method name (METHOD, or [CLASS,FUNCTION])
- $installOptions : array<string|int, mixed>
-
- (un)install options
- $onSuccess : object|null = null
-
- callback on successful install,
Return values
bool —success/failure
wpmu_despool()
check transient for queued installer action and run (all_admin_notices action and invoke() method)
public
wpmu_despool() : bool