docs: update docblocks
This commit is contained in:
parent
418abc253b
commit
bfeb11d5ad
11 changed files with 363 additions and 306 deletions
|
@ -1,66 +1,69 @@
|
|||
<?php // phpcs:disable PEAR.Commenting.FileComment.Missing
|
||||
/**
|
||||
* The file that defines the core plugin class
|
||||
* File providing core `Footnotes` class.
|
||||
*
|
||||
* A class definition that includes attributes and functions used across both the
|
||||
* public-facing side of the site and the admin area.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @package footnotes
|
||||
* @package footnotes
|
||||
* @subpackage includes
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 2.8.0 Rename file from `init.php` to `class-footnotes.php`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The core plugin class.
|
||||
* Class providing core plugin functionality.
|
||||
*
|
||||
* This is used to define internationalization, admin-specific hooks, and
|
||||
* public-facing site hooks.
|
||||
*
|
||||
* Also maintains the unique identifier of this plugin as well as the current
|
||||
* version of the plugin.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @package footnotes
|
||||
|
||||
* @package footnotes
|
||||
* @subpackage includes
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 2.8.0
|
||||
*/
|
||||
class Footnotes {
|
||||
/**
|
||||
* The loader that's responsible for maintaining and registering all hooks that power
|
||||
* the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access protected
|
||||
* @var Footnotes_Loader $loader Maintains and registers all hooks for the plugin.
|
||||
* @access protected
|
||||
* @var Footnotes_Loader $loader Maintains and registers all hooks for the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
protected $loader;
|
||||
|
||||
/**
|
||||
* The unique identifier of this plugin
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access protected
|
||||
* @var string $plugin_name The string used to uniquely identify this plugin.
|
||||
* @since 2.8.0
|
||||
* @access protected
|
||||
* @var string $plugin_name The string used to uniquely identify this plugin.
|
||||
*/
|
||||
protected $plugin_name;
|
||||
|
||||
/**
|
||||
* The current version of the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access protected
|
||||
* @var string $version The current version of the plugin.
|
||||
* @since 2.8.0
|
||||
* @access protected
|
||||
* @var string $version The current version of the plugin.
|
||||
*/
|
||||
protected $version;
|
||||
|
||||
/**
|
||||
* Define the core functionality of the plugin.
|
||||
* Build the core of the plugin.
|
||||
*
|
||||
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
||||
* Load the dependencies, define the locale, and set the hooks for the admin area and
|
||||
* the public-facing side of the site.
|
||||
* Set the plugin name and the plugin version that can be used throughout the
|
||||
* plugin. Load the dependencies, define the locale, and set the hooks for
|
||||
* the admin area and the public-facing side of the site.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @uses PLUGIN_VERSION The plugin version constant.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct() {
|
||||
if ( defined( 'PLUGIN_VERSION' ) ) {
|
||||
|
@ -80,7 +83,7 @@ class Footnotes {
|
|||
/**
|
||||
* Load the required dependencies for this plugin.
|
||||
*
|
||||
* Include the following files that make up the plugin:
|
||||
* Includes the following files that make up the plugin:
|
||||
*
|
||||
* - `Footnotes_Loader`. Orchestrates the hooks of the plugin.
|
||||
* - `Footnotes_i18n`. Defines internationalization functionality.
|
||||
|
@ -91,11 +94,13 @@ class Footnotes {
|
|||
* - `Footnotes_Admin`. Defines all hooks for the admin area.
|
||||
* - `Footnotes_Public`. Defines all hooks for the public side of the site.
|
||||
*
|
||||
* Create an instance of the loader which will be used to register the hooks
|
||||
* Creates an instance of the loader which will be used to register the hooks
|
||||
* with WordPress.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @access private
|
||||
* @uses Footnotes_Loader Loads plugin dependencies.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
private function load_dependencies() {
|
||||
|
||||
|
@ -137,11 +142,13 @@ class Footnotes {
|
|||
/**
|
||||
* Define the locale for this plugin for internationalization.
|
||||
*
|
||||
* Uses the `Footnotes_i18n` class in order to set the domain and to register the hook
|
||||
* with WordPress.
|
||||
* Uses the {@see Footnotes_i18n} class in order to set the domain and to
|
||||
* register the hook with WordPress.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @access private
|
||||
* @uses Footnotes_i18n Handles initialization functions.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
private function set_locale() {
|
||||
|
||||
|
@ -152,12 +159,14 @@ class Footnotes {
|
|||
}
|
||||
|
||||
/**
|
||||
* Register all of the hooks related to the admin area functionality
|
||||
* of the plugin.
|
||||
* Register all of the hooks related to the admin area functionality of the
|
||||
* plugin.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 2.8.0 Moved registrating from various classes into `Footnotes_Admin`.
|
||||
* @access private
|
||||
* @access private
|
||||
* @uses Footnotes_Admin Defines admin functionality.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 2.8.0 Moved hook registrations from various classes into `Footnotes_Admin`.
|
||||
*/
|
||||
private function define_admin_hooks() {
|
||||
|
||||
|
@ -182,11 +191,13 @@ class Footnotes {
|
|||
}
|
||||
|
||||
/**
|
||||
* Register all of the hooks related to the public-facing functionality
|
||||
* of the plugin.
|
||||
* Register all of the hooks related to the public-facing functionality of
|
||||
* the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @uses Footnotes_Admin Defines public-facing functionality.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
private function define_public_hooks() {
|
||||
|
||||
|
@ -199,42 +210,43 @@ class Footnotes {
|
|||
}
|
||||
|
||||
/**
|
||||
* Run the loader to execute all of the hooks with WordPress.
|
||||
* Runs the loader to execute all of the hooks with WordPress.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @see self::initialize_widgets()
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public function run() {
|
||||
$this->loader->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the plugin used to uniquely identify it within the context of
|
||||
* WordPress and to define internationalization functionality.
|
||||
* Gets the name of the plugin used to uniquely identify it within the
|
||||
* context of WordPress and to define internationalization functionality.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return string The name of the plugin.
|
||||
* @return string The name of the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public function get_plugin_name() {
|
||||
return $this->plugin_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* The reference to the class that orchestrates the hooks with the plugin.
|
||||
* Returns a reference to the class that orchestrates the hooks with the plugin.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return Footnotes_Loader Orchestrates the hooks of the plugin.
|
||||
* @return Footnotes_Loader Orchestrates the hooks of the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public function get_loader() {
|
||||
return $this->loader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the version number of the plugin.
|
||||
* Gets the version number of the plugin.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return string The version number of the plugin.
|
||||
* @return string The version number of the plugin.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
public function get_version() {
|
||||
return $this->version;
|
||||
|
|
Reference in a new issue