pLogin.php
The plugin bootstrap file.
This file is read by WordPress to generate the plugin information in the plugin admin area. This file also includes all of the dependencies used by the plugin, registers the activation and deactivation functions, and defines a function that starts the plugin.
Tags
Table of Contents
Functions
- get_plugin_metadata() : string
- Return a metadata value.
- get_asset_version() : string
- Return the asset version.
- get_asset_path() : string
- Return the fully qualified path to an asset.
- get_asset_url() : string
- Return the asset URL.
- run_plugin() : void
- Plugin execution.
Functions
get_plugin_metadata()
Return a metadata value.
get_plugin_metadata(string $field) : string
Parameters
- $field : string
-
The field to search for.
Tags
Return values
string —The metadata value.
get_asset_version()
Return the asset version.
get_asset_version(string $asset) : string
Production uses plugin version. Non-production uses resource file mtime. Use for scripts and styles.
Parameters
- $asset : string
-
The file path of the target asset.
Tags
Return values
string —The asset version.
get_asset_path()
Return the fully qualified path to an asset.
get_asset_path([string $asset = '' ]) : string
An empty string returns the assets folder path.
Parameters
- $asset : string = ''
-
The partial path of the target asset. A leading slash is required.
Tags
Return values
string —The asset path.
get_asset_url()
Return the asset URL.
get_asset_url([string $asset = '' ]) : string
An empty string returns the assets folder URL.
Parameters
- $asset : string = ''
-
The partial path of the target asset. A leading slash is required.
Tags
Return values
string —The asset URL.
run_plugin()
Plugin execution.
run_plugin() : void