Plugin_Setup implements Registerable, Standard_Service, Plugin_Activation_Listener

Hook into the plugin activation process.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Standard_Service
Plugin_Activation_Listener

Table of Contents

$starter  : Starter
The starter instance to handle the setup wizard.
__construct()  : mixed
Constructs and initalizes the activation class.
after_plugin_activation()  : void
Detect the transient and redirect to wizard.
do_silent_index()  : void
Trigger silent indexing.
install_tables()  : void
Install the database tables.
on_activate()  : void
On plugin activation determine if the setup wizard should run.
on_deactivate()  : void
Do nothing.
register()  : void
Register the service
install_default_data()  : void
Install default data.
install_filter()  : void
Install a filter.

Properties

$starter

The starter instance to handle the setup wizard.

private Starter $starter

Methods

__construct()

Constructs and initalizes the activation class.

public __construct(Plugin $plugin) : mixed
Parameters
$plugin : Plugin

The main plugin class.

Return values
mixed

after_plugin_activation()

Detect the transient and redirect to wizard.

public after_plugin_activation() : void
Return values
void

do_silent_index()

Trigger silent indexing.

public do_silent_index() : void
Return values
void

install_tables()

Install the database tables.

public static install_tables() : void

Marked as static to allow for easier testing.

Return values
void

on_activate()

On plugin activation determine if the setup wizard should run.

public on_activate(bool $network_wide) : void
Parameters
$network_wide : bool

Whether the plugin is network activated.

Return values
void

on_deactivate()

Do nothing.

public on_deactivate(bool $network_wide) : void
Parameters
$network_wide : bool

Whether the plugin is network activated.

Return values
void

register()

Register the service

public register() : void
Return values
void

install_default_data()

Install default data.

private install_default_data() : void
Return values
void

install_filter()

Install a filter.

private install_filter(array<string|int, mixed> $args, int $group_id) : void
Parameters
$args : array<string|int, mixed>

The filter arguments.

$group_id : int

The group ID.

Return values
void

Search results