docs: update docblocks

This commit is contained in:
Ben Goldsworthy 2021-04-30 18:03:15 +01:00
parent bfeb11d5ad
commit 7ad975c389
16 changed files with 1168 additions and 1924 deletions

View file

@ -1,11 +1,13 @@
<?php // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
/**
* Includes the Plugin Widget to put the Reference Container to the Widget area.
* Widgets: Footnotes_Widget_Reference_Container class
*
* @since 1.5.0
* The Widget subpackage is composed of the {@see Footnotes_Widget_Base}
* abstract class, which is extended by the {@see Footnotes_Widget_Reference_Container}
* sub-class.
*
* @package footnotes
* @subpackage public_widget
* @package footnotes\public\widget
* @since 1.5.0
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'widget/class-footnotes-widget-base.php';
@ -13,27 +15,29 @@ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'widget/class-footnotes-wi
/**
* Registers a Widget to put the Reference Container to the widget area.
*
* @since 1.5.0
*
* @package footnotes
* @subpackage public_widget
* @package footnotes\public\widget
* @since 1.5.0
* @see Footnotes_Widget_Base
* @todo Review implemenation of Widgets API.
*/
class Footnotes_Widget_Reference_Container extends Footnotes_Widget_Base {
/**
* The ID of this plugin.
*
* @since 2.8.0
* @access private
* @var string $plugin_name The ID of this plugin.
* @access private
* @since 2.8.0
* @see Footnotes::$plugin_name
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* Initialize the class and set its properties.
*
* @since 2.8.0
* @param string $plugin_name The name of this plugin.
* @since 2.8.0
*
* @param string $plugin_name The name of this plugin.
*/
public function __construct( $plugin_name ) {
parent::__construct();
@ -43,8 +47,10 @@ class Footnotes_Widget_Reference_Container extends Footnotes_Widget_Base {
/**
* Returns an unique ID as string used for the Widget Base ID.
*
* @since 1.5.0
* @return string
* @see Footnotes_Widget_Base::get_id()
* @since 1.5.0
*
* @return string
*/
protected function get_id() {
return 'footnotes_widget';
@ -53,8 +59,10 @@ class Footnotes_Widget_Reference_Container extends Footnotes_Widget_Base {
/**
* Returns the Public name of the Widget to be displayed in the Configuration page.
*
* @since 1.5.0
* @return string
* @see Footnotes_Widget_Base::get_name()
* @since 1.5.0
*
* @return string
*/
protected function get_name() {
return $this->plugin_name;
@ -63,34 +71,35 @@ class Footnotes_Widget_Reference_Container extends Footnotes_Widget_Base {
/**
* Returns the Description of the child widget.
*
* @since 1.5.0
* @return string
* @see Footnotes_Widget_Base::get_description()
* @since 1.5.0
*
* Edit: curly quotes 2.2.0
* @return string
*/
protected function get_description() {
return __( 'The widget defines the position of the reference container if set to “widget area”.', 'footnotes' );
return __( 'The widget defines the position of the reference container if set to &ldquo;widget area&rdquo;.', 'footnotes' );
}
/**
* Outputs the Settings of the Widget.
*
* @since 1.5.0
* @param mixed $instance The instance of the widget.
* @return void
* @link https://developer.wordpress.org/reference/classes/wp_widget/form/ `WP_Widget::form()`
* @since 1.5.0
*
* Edit: curly quotes 2.2.0
* @param mixed $instance The instance of the widget.
*/
public function form( $instance ) {
echo __( 'The widget defines the position of the reference container if set to “widget area”.', 'footnotes' );
echo __( 'The widget defines the position of the reference container if set to &ldquo;widget area&rdquo;.', 'footnotes' );
}
/**
* Outputs the Content of the Widget.
*
* @since 1.5.0
* @param mixed $args The widget's arguments.
* @param mixed $instance The instance of the widget.
* @link https://developer.wordpress.org/reference/classes/wp_widget/widget/ `WP_Widget::widget()`
* @since 1.5.0
*
* @param mixed $args The widget's arguments.
* @param mixed $instance The instance of the widget.
*/
public function widget( $args, $instance ) {
global $footnotes;