Plugin_Promo extends Abstract_Plugin_Promo implements Registerable

Provides functions to add the plugin promo to the plugin settings page in the WordPress admin.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

version
1.3

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
The plugin object.
$promo_content  : string
The content of the plugin promo.
__construct()  : mixed
Constructor.
load_styles()  : void
Load the plugin promo stylesheet.
maybe_load_styles()  : mixed
Load the plugin promo CSS.
register()  : void
Register this object with WordPress.
render_settings_end()  : mixed
render_settings_start()  : mixed
get_promo_content()  : string
Retrieve the plugin promo content from the API.
get_promo_sidebar()  : string
Retrieve the complete promo sidebar to insert into the settings page.

Properties

Methods

load_styles()

Load the plugin promo stylesheet.

public load_styles() : void
Return values
void

maybe_load_styles()

Load the plugin promo CSS.

public maybe_load_styles(string $hook) : mixed
Parameters
$hook : string
Return values
mixed

register()

Register this object with WordPress.

public register() : void
Return values
void

render_settings_end()

public render_settings_end(mixed $plugin_id) : mixed
Parameters
$plugin_id : mixed
Return values
mixed

render_settings_start()

public render_settings_start(mixed $plugin_id) : mixed
Parameters
$plugin_id : mixed
Return values
mixed

get_promo_content()

Retrieve the plugin promo content from the API.

protected get_promo_content() : string
Return values
string

The promo sidebar content.

get_promo_sidebar()

Retrieve the complete promo sidebar to insert into the settings page.

protected get_promo_sidebar() : string
Return values
string

The promo sidebar.

Search results