Plugin_Promo implements Registerable

Provides functions to add the plugin promo to the plugin settings section of the WooCommerce setting page.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

version
1.2

Interfaces, Classes and Traits

Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().

Table of Contents

$plugin  : Plugin
$plugin_promo  : string
$section  : string
$tab  : string
__construct()  : mixed
Constructor.
add_plugin_promo_field()  : mixed
barn2_promo_end_field()  : mixed
barn2_promo_start_field()  : mixed
get_plugin_promo()  : mixed
load_styles()  : mixed
register()  : void
Register this object with WordPress.

Properties

$plugin_promo

private string $plugin_promo = null

The content of the plugin promo.

$section

private string $section

The WooCommerce settings section to display the promo, e.g. inventory

$tab

private string $tab

The WooCommerce settings tab to display the promo, e.g. products

Methods

__construct()

Constructor.

public __construct(Plugin $plugin, string $settings_tab[, string $settings_section = '' ]) : mixed
Parameters
$plugin : Plugin

The plugin object

$settings_tab : string

The WooCommerce settings tab to display the promo, e.g. products

$settings_section : string = ''

The WooCommerce settings section to display the promo, e.g. inventory

Return values
mixed

add_plugin_promo_field()

public add_plugin_promo_field(mixed $settings, mixed $current_section) : mixed
Parameters
$settings : mixed
$current_section : mixed
Return values
mixed

barn2_promo_end_field()

public barn2_promo_end_field(mixed $field) : mixed
Parameters
$field : mixed
Return values
mixed

barn2_promo_start_field()

public barn2_promo_start_field(mixed $field) : mixed
Parameters
$field : mixed
Return values
mixed

get_plugin_promo()

public get_plugin_promo() : mixed
Return values
mixed

load_styles()

public load_styles() : mixed
Return values
mixed

register()

Register this object with WordPress.

public register() : void
Return values
void

Search results