{eac}Doojigger Reference

file_system_extension extends abstract_extension

Extension: file_system - expands on the WordPress WP_filesystem - {eac}Doojigger for WordPress

Note: see eacDoojigger_ftp_credentials.php filters exist as part of the {eac}Doojigger autoloader to populate filesystem credentials when accessed (get/update) the 'ftp_credentials' option.

Tags
category

WordPress Plugin

author

Kevin Burkholder KBurkholder@EarthAsylum.com

copyright

Copyright (c) 2023 EarthAsylum Consulting <www.EarthAsylum.com>

version
1.x
link
https://eacDoojigger.earthasylum.com/
see
https://eacDoojigger.earthasylum.com/phpdoc/

Table of Contents

ALIAS  = 'fs'
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  = 0b1000000
DEFAULT_DISABLED  = 0b100000
ONLY_ADMIN  = 0b10
VERSION  = '24.0416.1'
$filesystem  : object
$filesystem_group  : object
$filesystem_method  : string
$filesystem_owner  : object
__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
admin_options_help()  : void
Add help tab on admin page
admin_options_settings()  : void
register options on options_settings_page
get_filesystem_method()  : string
get current filesystem_method (cached)
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
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
link_wp_filesystem()  : object|bool
Inform and link to connection information form (via load_wp_filesystem) Use when we don't want the form but to give user link to the form (if needed).
load_wp_filesystem()  : object|bool
Check for & use WP_Filesystem.

Constants

ALLOW_ALL

public mixed ALLOW_ALL = self::ALLOW_ADMIN | self::ALLOW_NETWORK | self::ALLOW_CRON | self::ALLOW_CLI

Properties

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

__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

admin_options_settings()

register options on options_settings_page

public admin_options_settings() : void
Return values
void

get_filesystem_method()

get current filesystem_method (cached)

public get_filesystem_method() : string
Return values
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

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

Inform and link to connection information form (via load_wp_filesystem) Use when we don't want the form but to give user link to the form (if needed).

public link_wp_filesystem([bool|mixed $useForm = true ][, string $notice = '' ][, array<string|int, mixed> $args = [] ]) : object|bool
Parameters
$useForm : bool|mixed = true

(true) when truthy, display notice with link

$notice : string = ''

('') display an 'admin notice' message before the form

$args : array<string|int, mixed> = []

([]) request_filesystem_credentials() arguments (override defaults)

Tags
example

if ($fs = $this->link_wp_filesystem('WordPress file access is required to...'));

Return values
object|bool

\WP_Filesystem or false

load_wp_filesystem()

Check for & use WP_Filesystem.

public load_wp_filesystem([bool|mixed $useForm = false ][, string $notice = '' ][, array<string|int, mixed> $args = [] ]) : object|bool

Use as part of a settings page (or not) to get WP_Filesystem credentials when needed.

Parameters
$useForm : bool|mixed = false

(false) when truthy, prompt for credentials if needed

$notice : string = ''

('') display an 'admin notice' message before the form

$args : array<string|int, mixed> = []

([]) request_filesystem_credentials() arguments (override defaults)

Tags
example

if ($fs = $this->load_wp_filesystem(true,'WordPress file access is required to...'));

example

if ($fs = $this->load_wp_filesystem());

Return values
object|bool

\WP_Filesystem or false

Search results