Plugin_Setup implements Plugin_Activation_Listener, Registerable
Hook into the plugin activation process.
Interfaces, Classes and Traits
- Plugin_Activation_Listener
- Registerable
Table of Contents
- $file : string
- Plugin's entry file
- $plugin : Licensed_Plugin
- Plugin instance
- $starter : Starter
- Wizard starter.
- __construct() : mixed
- Get things started
- after_plugin_activation() : void
- Detect the transient and redirect to wizard.
- delete_indexing_transient() : void
- Delete the transient used to indicate that data indexing is required.
- do_silent_index() : void
- Trigger silent indexing.
- on_activate() : void
- On plugin activation determine if the setup wizard should run.
- on_deactivate() : void
- Do nothing.
- register() : void
- Register the service
- set_indexing_transient() : void
- Set a temporary transient that indicates that default data should be installed.
- should_start_indexing() : bool
- Determines if data indexing should start.
- install_default_data() : void
- Create the default filters group and filters only when the groups database table is empty.
- install_filter() : void
- Generate a filter and assign it to a group.
Properties
$file
Plugin's entry file
private
string
$file
$plugin
Plugin instance
private
Licensed_Plugin
$plugin
$starter
Wizard starter.
private
Starter
$starter
Methods
__construct()
Get things started
public
__construct(string $file, Licensed_Plugin $plugin) : mixed
Parameters
- $file : string
- $plugin : Licensed_Plugin
Return values
mixed —after_plugin_activation()
Detect the transient and redirect to wizard.
public
after_plugin_activation() : void
Return values
void —delete_indexing_transient()
Delete the transient used to indicate that data indexing is required.
public
delete_indexing_transient() : void
Return values
void —do_silent_index()
Trigger silent indexing.
public
do_silent_index() : void
Return values
void —on_activate()
On plugin activation determine if the setup wizard should run.
public
on_activate() : void
Return values
void —on_deactivate()
Do nothing.
public
on_deactivate() : void
Return values
void —register()
Register the service
public
register() : void
Return values
void —set_indexing_transient()
Set a temporary transient that indicates that default data should be installed.
public
set_indexing_transient() : void
Return values
void —should_start_indexing()
Determines if data indexing should start.
public
should_start_indexing() : bool
Return values
bool —install_default_data()
Create the default filters group and filters only when the groups database table is empty.
private
install_default_data() : void
Return values
void —install_filter()
Generate a filter and assign it to a group.
private
install_filter(array<string|int, mixed> $args, string $group_id) : void
Parameters
- $args : array<string|int, mixed>
- $group_id : string