PHP Class EP_Module

Exibir arquivo Open project: 10up/elasticpress

Public Properties

Property Type Description
$active boolean True if the module is active
$dependencies_met_cb callback Contains registered callback to determine if a modules dependencies are met
$module_box_long_cb callback Contains registered callback to output module long description in module box
$module_box_summary_cb callback Contains registered callback to output module summary in module box
$post_activation_cb callback Contains registered callback to execute after activation
$requires_install_reindex [type] True if the module requires content reindexing after activating
$setup_cb callback Contains registered callback to execute after setup
$slug string Module slug
$title string Module pretty title

Public Methods

Method Description
__construct ( $args ) Initiate the module, setting all relevant instance variables
dependencies_met ( ) : boolean | WP_Error Ran to see if dependencies are met. Returns true or a WP_Error containing an error message to display
is_active ( ) : boolean Returns true if the module is active
output_module_box ( ) Outputs module box
output_module_box_full ( ) Outputs module box long description
post_activation ( ) Ran after a module is activated
setup ( ) Ran after a function is activated

Method Details

__construct() public method

Initiate the module, setting all relevant instance variables
Since: 2.1
public __construct ( $args )

dependencies_met() public method

Ran to see if dependencies are met. Returns true or a WP_Error containing an error message to display
Since: 2.1
public dependencies_met ( ) : boolean | WP_Error
return boolean | WP_Error

is_active() public method

Returns true if the module is active
Since: 2.1
public is_active ( ) : boolean
return boolean

output_module_box() public method

Outputs module box
Since: 2.1
public output_module_box ( )

output_module_box_full() public method

Outputs module box long description
Since: 2.1

post_activation() public method

Ran after a module is activated
Since: 2.1
public post_activation ( )

setup() public method

Ran after a function is activated
Since: 2.1
public setup ( )

Property Details

$active public_oe property

True if the module is active
Since: 2.1
public bool $active
return boolean

$dependencies_met_cb public_oe property

Contains registered callback to determine if a modules dependencies are met
Since: 2.1
public callback $dependencies_met_cb
return callback

$module_box_long_cb public_oe property

Contains registered callback to output module long description in module box
Since: 2.1
public callback $module_box_long_cb
return callback

$module_box_summary_cb public_oe property

Contains registered callback to output module summary in module box
Since: 2.1
public callback $module_box_summary_cb
return callback

$post_activation_cb public_oe property

Contains registered callback to execute after activation
Since: 2.1
public callback $post_activation_cb
return callback

$requires_install_reindex public_oe property

True if the module requires content reindexing after activating
Since: 2.1
public [type] $requires_install_reindex
return [type]

$setup_cb public_oe property

Contains registered callback to execute after setup
Since: 2.1
public callback $setup_cb
return callback

$slug public_oe property

Module slug
Since: 2.1
public string $slug
return string

$title public_oe property

Module pretty title
Since: 2.1
public string $title
return string