Convert EOL from CRLF to LF.
to make footnotes/trunk/ diffable against the standardised codebase on GitHub markcheret/footnotes/. Stable Tag remains 2.5.10. git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2483994 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
ba9d9bc535
commit
caf3e1136c
59 changed files with 10624 additions and 10624 deletions
|
@ -1,88 +1,88 @@
|
|||
<?php
|
||||
/**
|
||||
* Widget base.
|
||||
*
|
||||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @date 14.09.14 14:30
|
||||
*
|
||||
* @lastmodified 2021-02-18T0306+0100
|
||||
* @date 2021-02-18T0240+0100
|
||||
* @since 1.6.4 Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base Class for all Plugin Widgets. Registers each Widget to WordPress.
|
||||
* The following Methods MUST be overwritten in each sub class:
|
||||
* **public function widget($args, $instance)** -> echo the Widget Content
|
||||
* **public function form($instance)** -> echo the Settings of the Widget
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
abstract class MCI_Footnotes_WidgetBase extends WP_Widget {
|
||||
|
||||
/**
|
||||
* Returns an unique ID as string used for the Widget Base ID.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getID();
|
||||
|
||||
/**
|
||||
* Returns the Public name of child Widget to be displayed in the Configuration page.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getName();
|
||||
|
||||
/**
|
||||
* Returns the Description of the child widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getDescription();
|
||||
|
||||
/**
|
||||
* Returns the width of the Widget. Default width is 250 pixel.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return int
|
||||
*/
|
||||
protected function getWidgetWidth() {
|
||||
return 250;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Constructor. Registers the child Widget to WordPress.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* - Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
|
||||
*
|
||||
* @since 1.6.4
|
||||
* @contributor @dartiss
|
||||
* @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/widgets/base.php?rev=1445720
|
||||
* “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”
|
||||
*/
|
||||
public function __construct() {
|
||||
$l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription());
|
||||
$l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth());
|
||||
// registers the Widget
|
||||
parent::__construct(
|
||||
strtolower($this->getID()), // unique ID for the widget, has to be lowercase
|
||||
$this->getName(), // Plugin name to be displayed
|
||||
$l_arr_WidgetOptions, // Optional Widget Options
|
||||
$l_arr_ControlOptions // Optional Widget Control Options
|
||||
);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Widget base.
|
||||
*
|
||||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @date 14.09.14 14:30
|
||||
*
|
||||
* @lastmodified 2021-02-18T0306+0100
|
||||
* @date 2021-02-18T0240+0100
|
||||
* @since 1.6.4 Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base Class for all Plugin Widgets. Registers each Widget to WordPress.
|
||||
* The following Methods MUST be overwritten in each sub class:
|
||||
* **public function widget($args, $instance)** -> echo the Widget Content
|
||||
* **public function form($instance)** -> echo the Settings of the Widget
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
abstract class MCI_Footnotes_WidgetBase extends WP_Widget {
|
||||
|
||||
/**
|
||||
* Returns an unique ID as string used for the Widget Base ID.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getID();
|
||||
|
||||
/**
|
||||
* Returns the Public name of child Widget to be displayed in the Configuration page.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getName();
|
||||
|
||||
/**
|
||||
* Returns the Description of the child widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function getDescription();
|
||||
|
||||
/**
|
||||
* Returns the width of the Widget. Default width is 250 pixel.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return int
|
||||
*/
|
||||
protected function getWidgetWidth() {
|
||||
return 250;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Constructor. Registers the child Widget to WordPress.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* - Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
|
||||
*
|
||||
* @since 1.6.4
|
||||
* @contributor @dartiss
|
||||
* @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/widgets/base.php?rev=1445720
|
||||
* “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”
|
||||
*/
|
||||
public function __construct() {
|
||||
$l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription());
|
||||
$l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth());
|
||||
// registers the Widget
|
||||
parent::__construct(
|
||||
strtolower($this->getID()), // unique ID for the widget, has to be lowercase
|
||||
$this->getName(), // Plugin name to be displayed
|
||||
$l_arr_WidgetOptions, // Optional Widget Options
|
||||
$l_arr_ControlOptions // Optional Widget Control Options
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,85 +1,85 @@
|
|||
<?php
|
||||
/**
|
||||
* Includes the Plugin Widget to put the Reference Container to the Widget area.
|
||||
*
|
||||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 14:26
|
||||
*
|
||||
* Edited 2.2.0 2020-12-12T2131+0100
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Registers a Widget to put the Reference Container to the widget area.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class MCI_Footnotes_Widget_ReferenceContainer extends MCI_Footnotes_WidgetBase {
|
||||
|
||||
/**
|
||||
* Returns an unique ID as string used for the Widget Base ID.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
protected function getID() {
|
||||
return "footnotes_widget";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Public name of the Widget to be displayed in the Configuration page.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
protected function getName() {
|
||||
return MCI_Footnotes_Config::C_STR_PLUGIN_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Description of the child widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*
|
||||
* Edit: curly quotes 2.2.0 2020-12-12T2130+0100
|
||||
*/
|
||||
protected function getDescription() {
|
||||
return __('The widget defines the position of the reference container if set to “widget area”.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the Settings of the Widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @param mixed $instance
|
||||
* @return void
|
||||
*
|
||||
* Edit: curly quotes 2.2.0 2020-12-12T2130+0100
|
||||
*/
|
||||
public function form($instance) {
|
||||
echo __('The widget defines the position of the reference container if set to “widget area”.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the Content of the Widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @param mixed $args
|
||||
* @param mixed $instance
|
||||
*/
|
||||
public function widget($args, $instance) {
|
||||
global $g_obj_MCI_Footnotes;
|
||||
// reference container positioning is set to "widget area"
|
||||
if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") {
|
||||
echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer();
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Includes the Plugin Widget to put the Reference Container to the Widget area.
|
||||
*
|
||||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 14:26
|
||||
*
|
||||
* Edited 2.2.0 2020-12-12T2131+0100
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Registers a Widget to put the Reference Container to the widget area.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class MCI_Footnotes_Widget_ReferenceContainer extends MCI_Footnotes_WidgetBase {
|
||||
|
||||
/**
|
||||
* Returns an unique ID as string used for the Widget Base ID.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
protected function getID() {
|
||||
return "footnotes_widget";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Public name of the Widget to be displayed in the Configuration page.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*/
|
||||
protected function getName() {
|
||||
return MCI_Footnotes_Config::C_STR_PLUGIN_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Description of the child widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*
|
||||
* Edit: curly quotes 2.2.0 2020-12-12T2130+0100
|
||||
*/
|
||||
protected function getDescription() {
|
||||
return __('The widget defines the position of the reference container if set to “widget area”.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the Settings of the Widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @param mixed $instance
|
||||
* @return void
|
||||
*
|
||||
* Edit: curly quotes 2.2.0 2020-12-12T2130+0100
|
||||
*/
|
||||
public function form($instance) {
|
||||
echo __('The widget defines the position of the reference container if set to “widget area”.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the Content of the Widget.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @param mixed $args
|
||||
* @param mixed $instance
|
||||
*/
|
||||
public function widget($args, $instance) {
|
||||
global $g_obj_MCI_Footnotes;
|
||||
// reference container positioning is set to "widget area"
|
||||
if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") {
|
||||
echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue