This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
footnotes/class/widgets/reference-container.php
pewgeuges dfcbdc6adc Undo last two commits affecting trunk/ but not the Stable Tag.
= Stable Tag value =
2.5.10 (unchanged)
= Commits undone =
- 2484038 (2021-03-02 05:29:18 +0000 (Tue, 02 Mar 2021)) committer: pewgeuges
-2484015 (2021-03-02 04:22:20 +0000 (Tue, 02 Mar 2021)) committer: pewgeuges
= Rationale =
By renaming a folder (and 3 out of 4 included files), the WordPress Coding Standards compliance upgrade (see changeset 2484015) has broken the traceability of the changes made to the following files:
- footnotes/trunk/class/dashboard/init.php
- footnotes/trunk/class/dashboard/layout.php
- footnotes/trunk/class/dashboard/subpage-diagnostics.php
- footnotes/trunk/class/dashboard/subpage-main.php

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2485882 b8457f37-d9ea-0310-8a92-e5e31aec5664
2021-03-03 15:15:55 +00:00

85 lines
2.1 KiB
PHP

<?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();
}
}
}