\RedactorView

Summary

Methods
Properties
Constants
get_instance()
is_script_debug()
is_wordpress_debug()
redactStringToHTML()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
_createURLs()
__clone()
$_instance
$_version
$_file
$_dir
$_assets_url
$_assets_dir
$_languages_dir
$_className
N/A

Properties

$_instance

$_instance : object

Plugin singleton

Type

object

$_version

$_version : string

Plugin version

Type

string

$_file

$_file : string

Plugin's file path

Type

string

$_dir

$_dir : string

Plugin directory

Type

string

$_assets_url

$_assets_url : string

Plugin assets web path

Type

string

$_assets_dir

$_assets_dir : string

Plugin assets file path

Type

string

$_languages_dir

$_languages_dir : string

Plugin languages path

Type

string

$_className

$_className : string

A string of the class name

Type

string

Methods

get_instance()

get_instance( $file,  $version) : \plugin

Gets a singleton of this plugin

Retrieves or creates the plugin singleton.

Parameters

$file
$version

Returns

\plugin —

singleton

is_script_debug()

is_script_debug() : boolean

Helper function on whether SCRIPT_DEBUG is set

Returns whether or not SCRIPT_DEBUG is set or not

Returns

boolean

is_wordpress_debug()

is_wordpress_debug() : boolean

Helper function on whether WP_DEBUG is set

Returns whether or not WP_DEBUG is set.

Returns

boolean

redactStringToHTML()

redactStringToHTML(string $style, string $who, string $when, string $str) : string

Wraps the redacted string in to a <span> that formats it correctly for displaying to the user.

Parameters

string $style
string $who
string $when
string $str

Returns

string

__construct()

__construct( $file,  $version) : void

Create and initializes the plugin

The plugin is a singleton so the constructor remains private

Parameters

$file
$version

_createURLs()

_createURLs( $file) : void

Create and initializes paths for the plugin

Stores all of the paths that the plugin will use to access the world

Parameters

$file

__clone()

__clone() : void

Not allowed

The plugin is a singleton so don't allow cloning.