\Barn2\PTP_Lib\PluginSimple_Plugin

Basic implementation of the Plugin interface which stores core data about a WordPress plugin (ID, version number, etc). Data is passed as an array on construction.

Summary

Methods
Properties
Constants
__construct()
get_name()
get_version()
get_file()
get_slug()
get_basename()
get_dir_path()
get_dir_url()
is_woocommerce()
is_edd()
get_documentation_url()
get_support_url()
get_settings_page_url()
No public properties found
No constants found
No protected methods found
$file
$data
N/A
No private methods found
$basename
$dir_path
$dir_url
N/A

Properties

$file

$file :

Type

$data

$data :

Type

$basename

$basename :

Type

$dir_path

$dir_path :

Type

$dir_url

$dir_url :

Type

Methods

__construct()

__construct(array  $data)

Parameters

array $data

get_name()

get_name(): string

Gets the name of this plugin.

Returns

string —

The plugin name.

get_version()

get_version(): string

Gets the plugin version number (e.g. 1.3.2).

Returns

string —

The version number.

get_file()

get_file(): string

Gets the full path to the main plugin file.

Returns

string —

The plugin file.

get_slug()

get_slug(): string

Gets the slug for this plugin (e.g. my-plugin).

Returns

string —

The plugin slug.

get_basename()

get_basename(): string

Gets the 'basename' for the plugin (e.g. my-plugin/my-plugin.php).

Returns

string —

The plugin basename.

get_dir_path()

get_dir_path(): string

Get the full directory path to the plugin folder, with trailing slash (e.g. /wp-content/plugins/my-plugin/).

Returns

string —

The plugin directory path.

get_dir_url()

get_dir_url(): string

Get the URL to the plugin folder.

Returns

string —

(URL)

is_woocommerce()

is_woocommerce(): boolean

Is this plugin a WooCommerce extension?

Returns

boolean —

true if it's a WooCommerce extension.

is_edd()

is_edd(): boolean

Is this plugin an Easy Digital Downloads extension?

Returns

boolean —

true if it's an EDD extension.

get_documentation_url()

get_documentation_url(): string

Get the documentation URL for this plugin.

Returns

string —

(URL)

get_support_url()

get_support_url(): string

Get the support URL for this plugin.

Returns

string —

(URL)

get_settings_page_url()

get_settings_page_url(): string

Get the settings page URL in the WordPress admin.

Returns

string —

(URL)