pfeifferNet

pGallery

Table of Contents

Classes

Tax_Meta
Taxonomy extended meta data functionality.
Albums
Define album taxonomy for attachments.
Activator
Fired by the plugin activation process.
Deactivator
Fired by the plugin deactivation process.
Loader
Register all actions and filters for the plugin.
pGallery
The core plugin class.
Updater
Plugin updater.
Album
Album functionality.
Assets
Enqueue the stylesheet and JavaScript to support plugin specific functionality.
Gallery
Display an album gallery as a grid of images.
Image
Functionality for image display.
Gallery
Display images in a gallery, selected by album.

Functions

autoloader()  : void
Dynamically load the referenced class.
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.
delete_terms()  : void
Delete taxonomy terms added by this plugin.
delete_options()  : void
Delete wp_options entries.

Functions

autoloader()

Dynamically load the referenced class.

autoloader(string $required_class) : void

This is the recommended WordPress approach, so if/else is OK.

Parameters
$required_class : string

The fully-qualified name of the class to load.

Tags
SuppressWarnings

(PHPMD.ElseExpression)

since
5.4.0
uses
get_plugin_metadata()

get_plugin_metadata()

Return a metadata value.

get_plugin_metadata(string $field) : string
Parameters
$field : string

The field to search for.

Tags
since
6.3.0
used-by
autoloader()
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 last modified time.
  • Use for scripts and styles.
Parameters
$asset : string

The fully qualified file path of the target asset.

Tags
since
5.10.0
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
since
6.3.0
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
since
6.3.0
Return values
string

The asset URL.

run_plugin()

Plugin execution.

run_plugin() : void
Tags
since
1.0.0

delete_terms()

Delete taxonomy terms added by this plugin.

delete_terms() : void
  • SQL manipulation of the tables is used because the taxonomies are not registered when uninstall is called.
  • Most WordPress core taxonomy functions will NOT work.
Tags
since
6.1.0

delete_options()

Delete wp_options entries.

delete_options() : void
Tags
since
6.1.0

        
On this page

Search results