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.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  : mixed
$plugin_id  : mixed
__construct()  : mixed
Constructor.
get_sidebar_content()  : string
Retrieve the plugin promo content from the API.
load_styles()  : mixed
Load the plugin promo CSS.
register()  : void
Register this object with WordPress.
render_promo()  : mixed
Return the plugin promo HTML.
get_promo_content()  : string
Backward compatibility wrapper for get_sidebar_content.

Properties

Methods

__construct()

Constructor.

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

get_sidebar_content()

Retrieve the plugin promo content from the API.

public static get_sidebar_content(Plugin $plugin) : string
Parameters
$plugin : Plugin

The plugin object.

Return values
string

The promo sidebar content.

load_styles()

Load the plugin promo CSS.

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

register()

Register this object with WordPress.

public register() : void
Return values
void

render_promo()

Return the plugin promo HTML.

public render_promo(int $plugin_id) : mixed
Parameters
$plugin_id : int
Return values
mixed

get_promo_content()

Backward compatibility wrapper for get_sidebar_content.

private get_promo_content() : string
Return values
string

Search results