pfeifferNet

pSite.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
since
1.0.0
since
5.9.0

Provided plugin info function rather than global constants.

since
6.0.0

Use namespaced constant to store plugin data values.

since
6.3.0

Add get_plugin_metadata() function to retrieve metadata values. Deprecate namespace constant.

copyright

2024 Keith Pfeiffer

wordpress-plugin

Plugin Name: pfeifferNet Site Description: Functionality for the Pfeiffer website. Version: 6.8.0 Author URI: https://pfeiffer.net.au/keith/ Author: Keith Pfeiffer License URI: https://www.gnu.org/licenses/gpl-3.0 License: GNU General Public License v3 or later Plugin URI: https://krpfeiffer.github.io/pSite Requires at least: 7.0 Requires DB: 6.0.0 Requires PHP: 8.3 Tested up to: 7.0 Text Domain: psite Domain Path: /languages Update URI: https://api.github.com/repos/krpfeiffer/pSite/releases/latest

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

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
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 mtime. Use for scripts and styles.

Parameters
$asset : string

The 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

        
On this page

Search results