Abstract_Plugin_Promo
Abstract class to handle the plugin promo sidebar used in most Barn2 plugins.
Tags
Table of Contents
- $plugin : Plugin
- $promo_content : string
- __construct() : mixed
- Constructor.
- load_styles() : void
- Load the plugin promo stylesheet.
- 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
$plugin
protected
Plugin
$plugin
The plugin object.
$promo_content
private
string
$promo_content
= null
The content of the plugin promo.
Methods
__construct()
Constructor.
public
__construct(Plugin $plugin) : mixed
Parameters
- $plugin : Plugin
-
The plugin object.
Return values
mixed —load_styles()
Load the plugin promo stylesheet.
public
load_styles() : void
Return values
void —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.