Stable Bugfix Release 2.1.2 to roll out immediately in compensation of previous overdue, as a goodwill gesture

git-svn-id: https://plugins.svn.wordpress.org/footnotes/tags/2.1.2@2422035 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-11-20 05:40:03 +00:00
commit 1eb1ddb6aa
13 changed files with 525 additions and 492 deletions

View file

@ -90,7 +90,6 @@ class MCI_Footnotes_Layout_Init {
*
* @author Stefan Herndler
* @since 1.5.0
* Claimed it was added for 2.0.2 while already present since 1.5.0 2020-11-19T1201+0100
* @see http://codex.wordpress.org/Function_Reference/add_menu_page
*/
public function registerMainMenu() {

View file

@ -5,10 +5,10 @@
* @filesource
* @author Stefan Herndler
* @since 1.5.0 12.09.14 10:56
*
* Updated for 2.1.2 added version # of settings.css for cache busting
* ############ update line 200 after changes to settings.css
* Last modified 2020-11-19T1456+0100
*
* 2.1.2 added version # of settings.css for cache busting 2020-11-19T1456+0100
*
* ############ Please update line 210 after changes to settings.css ###############
*/
@ -20,106 +20,106 @@
*/
abstract class MCI_Footnotes_LayoutEngine {
/**
* Stores the Hook connection string for the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @var null|string
*/
protected $a_str_SubPageHook = null;
/**
* Stores the Hook connection string for the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @var null|string
*/
protected $a_str_SubPageHook = null;
/**
* Stores all Sections for the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @var array
*/
protected $a_arr_Sections = array();
/**
* Stores all Sections for the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @var array
*/
protected $a_arr_Sections = array();
/**
* Returns a Priority index. Lower numbers have a higher Priority.
*
* @author Stefan Herndler
* @since 1.5.0
* @return int
*/
abstract public function getPriority();
/**
* Returns a Priority index. Lower numbers have a higher Priority.
*
* @author Stefan Herndler
* @since 1.5.0
* @return int
*/
abstract public function getPriority();
/**
* Returns the unique slug of the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
abstract protected function getSubPageSlug();
/**
* Returns the unique slug of the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
abstract protected function getSubPageSlug();
/**
* Returns the title of the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
abstract protected function getSubPageTitle();
/**
* Returns the title of the child sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
abstract protected function getSubPageTitle();
/**
* Returns an array of all registered sections for a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @return array
*/
abstract protected function getSections();
/**
* Returns an array of all registered sections for a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @return array
*/
abstract protected function getSections();
/**
* Returns an array of all registered meta boxes.
*
* @author Stefan Herndler
* @since 1.5.0
* @return array
*/
abstract protected function getMetaBoxes();
/**
* Returns an array of all registered meta boxes.
*
* @author Stefan Herndler
* @since 1.5.0
* @return array
*/
abstract protected function getMetaBoxes();
/**
* Returns an array describing a sub page section.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_ID Unique ID suffix.
* @param string $p_str_Title Title of the section.
* @param int $p_int_SettingsContainerIndex Settings Container Index.
* @param bool $p_bool_hasSubmitButton Should a Submit Button be displayed for this section, default: true.
* @return array Array describing the section.
*/
protected function addSection($p_str_ID, $p_str_Title, $p_int_SettingsContainerIndex, $p_bool_hasSubmitButton = true) {
return array("id" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex);
}
/**
* Returns an array describing a sub page section.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_ID Unique ID suffix.
* @param string $p_str_Title Title of the section.
* @param int $p_int_SettingsContainerIndex Settings Container Index.
* @param bool $p_bool_hasSubmitButton Should a Submit Button be displayed for this section, default: true.
* @return array Array describing the section.
*/
protected function addSection($p_str_ID, $p_str_Title, $p_int_SettingsContainerIndex, $p_bool_hasSubmitButton = true) {
return array("id" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex);
}
/**
* Returns an array describing a meta box.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SectionID Parent Section ID.
* @param string $p_str_ID Unique ID suffix.
* @param string $p_str_Title Title for the meta box.
* @param string $p_str_CallbackFunctionName Class method name for callback.
* @return array meta box description to be able to append a meta box to the output.
*/
protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) {
return array("parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, "id" => $p_str_ID, "title" => $p_str_Title, "callback" => $p_str_CallbackFunctionName);
}
/**
* Returns an array describing a meta box.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SectionID Parent Section ID.
* @param string $p_str_ID Unique ID suffix.
* @param string $p_str_Title Title for the meta box.
* @param string $p_str_CallbackFunctionName Class method name for callback.
* @return array meta box description to be able to append a meta box to the output.
*/
protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) {
return array("parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, "id" => $p_str_ID, "title" => $p_str_Title, "callback" => $p_str_CallbackFunctionName);
}
/**
* Registers a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function registerSubPage() {
/**
* Registers a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function registerSubPage() {
global $submenu;
// any sub menu for our main menu exists
if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) {
@ -132,169 +132,169 @@ abstract class MCI_Footnotes_LayoutEngine {
}
}
$this->a_str_SubPageHook = add_submenu_page(
MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug
$this->getSubPageTitle(), // page title
$this->getSubPageTitle(), // menu title
'manage_options', // capability
MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug
array($this, 'displayContent') // function
);
}
$this->a_str_SubPageHook = add_submenu_page(
MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug
$this->getSubPageTitle(), // page title
$this->getSubPageTitle(), // menu title
'manage_options', // capability
MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug
array($this, 'displayContent') // function
);
}
/**
* Registers all sections for a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function registerSections() {
// iterate through each section
foreach($this->getSections() as $l_arr_Section) {
// append tab to the tab-array
$this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section;
add_settings_section(
$l_arr_Section["id"], // unique id
"", //$l_arr_Section["title"], // title
array($this, 'Description'), // callback function for the description
$l_arr_Section["id"] // parent sub page slug
);
$this->registerMetaBoxes($l_arr_Section["id"]);
}
}
/**
* Registers all sections for a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function registerSections() {
// iterate through each section
foreach($this->getSections() as $l_arr_Section) {
// append tab to the tab-array
$this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section;
add_settings_section(
$l_arr_Section["id"], // unique id
"", //$l_arr_Section["title"], // title
array($this, 'Description'), // callback function for the description
$l_arr_Section["id"] // parent sub page slug
);
$this->registerMetaBoxes($l_arr_Section["id"]);
}
}
/**
* Registers all Meta boxes for a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_ParentID Parent section unique id.
*/
private function registerMetaBoxes($p_str_ParentID) {
// iterate through each meta box
foreach($this->getMetaBoxes() as $l_arr_MetaBox) {
if ($l_arr_MetaBox["parent"] != $p_str_ParentID) {
continue;
}
add_meta_box(
$p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id
$l_arr_MetaBox["title"], // meta box title
array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content
$p_str_ParentID, // post type = parent section id
'main' // context
);
}
}
/**
* Registers all Meta boxes for a sub page.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_ParentID Parent section unique id.
*/
private function registerMetaBoxes($p_str_ParentID) {
// iterate through each meta box
foreach($this->getMetaBoxes() as $l_arr_MetaBox) {
if ($l_arr_MetaBox["parent"] != $p_str_ParentID) {
continue;
}
add_meta_box(
$p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id
$l_arr_MetaBox["title"], // meta box title
array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content
$p_str_ParentID, // post type = parent section id
'main' // context
);
}
}
/**
* Append javascript and css files for specific sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
private function appendScripts() {
// enable meta boxes layout and close functionality
wp_enqueue_script('postbox');
/**
* Append javascript and css files for specific sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
private function appendScripts() {
// enable meta boxes layout and close functionality
wp_enqueue_script('postbox');
// add WordPress color picker layout
wp_enqueue_style('wp-color-picker');
// add WordPress color picker function
wp_enqueue_script('wp-color-picker');
// register stylesheet
// added version after changes started to settings.css from 2.1.2 on:
wp_register_style(
'mci-footnotes-admin-styles',
plugins_url('../../css/settings.css', __FILE__),
'',
'2.1.2'
);
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING
// add stylesheet to the output
wp_enqueue_style('mci-footnotes-admin-styles');
}
wp_enqueue_script('wp-color-picker');
/**
* Displays the content of specific sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function displayContent() {
// register and enqueue scripts and styling
$this->appendScripts();
// get current section
reset($this->a_arr_Sections);
$l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections);
$l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID];
// store settings
$l_bool_SettingsUpdated = false;
if (array_key_exists("save-settings", $_POST)) {
if ($_POST["save-settings"] == "save") {
unset($_POST["save-settings"]);
unset($_POST["submit"]);
$l_bool_SettingsUpdated = $this->saveSettings();
}
}
// display all sections and highlight the active section
echo '<div class="wrap">';
echo '<h2 class="nav-tab-wrapper">';
// iterate through all register sections
foreach ($this->a_arr_Sections as $l_str_ID => $l_arr_Description) {
echo sprintf(
'<a class="nav-tab%s" href="?page=%s&t=%s">%s</a>',
$l_arr_ActiveSection["id"] == $l_str_ID ? ' nav-tab-active' : '',
MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), $l_str_ID, $l_arr_Description["title"]
);
}
echo '</h2><br/>';
// register stylesheet
// added version # after changes started to settings.css from 2.1.2 on:
wp_register_style(
'mci-footnotes-admin-styles',
plugins_url('../../css/settings.css', __FILE__),
'',
'2.1.2'
);
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING
if ($l_bool_SettingsUpdated) {
echo sprintf('<div id="message" class="updated">%s</div>', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
}
// form to submit the active section
echo '<!--suppress HtmlUnknownTarget --><form method="post" action="">';
//settings_fields($l_arr_ActiveSection["container"]);
echo '<input type="hidden" name="save-settings" value="save" />';
// outputs the settings field of the active section
do_settings_sections($l_arr_ActiveSection["id"]);
do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL);
// add stylesheet to the output
wp_enqueue_style('mci-footnotes-admin-styles');
}
// add submit button to active section if defined
if ($l_arr_ActiveSection["submit"]) {
submit_button();
}
// close the form to submit data
echo '</form>';
// close container for the settings page
echo '</div>';
// output special javascript for the expand/collapse function of the meta boxes
echo '<script type="text/javascript">';
echo "jQuery(document).ready(function ($) {";
/**
* Displays the content of specific sub page.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function displayContent() {
// register and enqueue scripts and styling
$this->appendScripts();
// get current section
reset($this->a_arr_Sections);
$l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections);
$l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID];
// store settings
$l_bool_SettingsUpdated = false;
if (array_key_exists("save-settings", $_POST)) {
if ($_POST["save-settings"] == "save") {
unset($_POST["save-settings"]);
unset($_POST["submit"]);
$l_bool_SettingsUpdated = $this->saveSettings();
}
}
// display all sections and highlight the active section
echo '<div class="wrap">';
echo '<h2 class="nav-tab-wrapper">';
// iterate through all register sections
foreach ($this->a_arr_Sections as $l_str_ID => $l_arr_Description) {
echo sprintf(
'<a class="nav-tab%s" href="?page=%s&t=%s">%s</a>',
$l_arr_ActiveSection["id"] == $l_str_ID ? ' nav-tab-active' : '',
MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), $l_str_ID, $l_arr_Description["title"]
);
}
echo '</h2><br/>';
if ($l_bool_SettingsUpdated) {
echo sprintf('<div id="message" class="updated">%s</div>', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
}
// form to submit the active section
echo '<!--suppress HtmlUnknownTarget --><form method="post" action="">';
//settings_fields($l_arr_ActiveSection["container"]);
echo '<input type="hidden" name="save-settings" value="save" />';
// outputs the settings field of the active section
do_settings_sections($l_arr_ActiveSection["id"]);
do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL);
// add submit button to active section if defined
if ($l_arr_ActiveSection["submit"]) {
submit_button();
}
// close the form to submit data
echo '</form>';
// close container for the settings page
echo '</div>';
// output special javascript for the expand/collapse function of the meta boxes
echo '<script type="text/javascript">';
echo "jQuery(document).ready(function ($) {";
echo 'jQuery(".mfmmf-color-picker").wpColorPicker();';
echo "jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');";
echo "postboxes.add_postbox_toggles('" . $this->a_str_SubPageHook . "');";
echo "});";
echo '</script>';
}
echo "jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');";
echo "postboxes.add_postbox_toggles('" . $this->a_str_SubPageHook . "');";
echo "});";
echo '</script>';
}
/**
* Save all Plugin settings.
*
* @author Stefan Herndler
* @since 1.5.0
* @return bool
*/
private function saveSettings() {
/**
* Save all Plugin settings.
*
* @author Stefan Herndler
* @since 1.5.0
* @return bool
*/
private function saveSettings() {
$l_arr_newSettings = array();
// get current section
reset($this->a_arr_Sections);
$l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections);
$l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID];
// get current section
reset($this->a_arr_Sections);
$l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections);
$l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID];
// iterate through each value that has to be in the specific contaienr
foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) {
@ -306,166 +306,166 @@ abstract class MCI_Footnotes_LayoutEngine {
$l_arr_newSettings[$l_str_Key] = "";
}
}
// update settings
return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings);
}
// update settings
return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings);
}
/**
* Output the Description of a section. May be overwritten in any section.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function Description() {
// default no description will be displayed
}
/**
* Output the Description of a section. May be overwritten in any section.
*
* @author Stefan Herndler
* @since 1.5.0
*/
public function Description() {
// default no description will be displayed
}
/**
* Loads specific setting and returns an array with the keys [id, name, value].
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingKeyName Settings Array key name.
* @return array Contains Settings ID, Settings Name and Settings Value.
*/
protected function LoadSetting($p_str_SettingKeyName) {
// get current section
reset($this->a_arr_Sections);
$p_arr_Return = array();
$p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName);
$p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName);
$p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName));
return $p_arr_Return;
}
/**
* Loads specific setting and returns an array with the keys [id, name, value].
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingKeyName Settings Array key name.
* @return array Contains Settings ID, Settings Name and Settings Value.
*/
protected function LoadSetting($p_str_SettingKeyName) {
// get current section
reset($this->a_arr_Sections);
$p_arr_Return = array();
$p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName);
$p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName);
$p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName));
return $p_arr_Return;
}
/**
* Returns a line break to start a new line.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
protected function addNewline() {
return '<br/>';
}
/**
* Returns a line break to start a new line.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
protected function addNewline() {
return '<br/>';
}
/**
* Returns a line break to have a space between two lines.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
protected function addLineSpace() {
return '<br/><br/>';
}
/**
* Returns a line break to have a space between two lines.
*
* @author Stefan Herndler
* @since 1.5.0
* @return string
*/
protected function addLineSpace() {
return '<br/><br/>';
}
/**
* Returns a simple text inside html <span> text.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_Text Message to be surrounded with simple html tag (span).
* @return string
*/
protected function addText($p_str_Text) {
return sprintf('<span>%s</span>', $p_str_Text);
}
/**
* Returns a simple text inside html <span> text.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_Text Message to be surrounded with simple html tag (span).
* @return string
*/
protected function addText($p_str_Text) {
return sprintf('<span>%s</span>', $p_str_Text);
}
/**
* Returns the html tag for an input/select label.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field.
* @param string $p_str_Caption Label caption.
* @return string
*/
protected function addLabel($p_str_SettingName, $p_str_Caption) {
if (empty($p_str_Caption)) {
return "";
}
return sprintf('<label for="%s">%s:</label>', $p_str_SettingName, $p_str_Caption);
}
/**
* Returns the html tag for an input/select label.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field.
* @param string $p_str_Caption Label caption.
* @return string
*/
protected function addLabel($p_str_SettingName, $p_str_Caption) {
if (empty($p_str_Caption)) {
return "";
}
return sprintf('<label for="%s">%s:</label>', $p_str_SettingName, $p_str_Caption);
}
/**
* Returns the html tag for an input [type = text].
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre load the input field.
* @param int $p_str_MaxLength Maximum length of the input, default 999 characters.
* @param bool $p_bool_Readonly Set the input to be read only, default false.
* @param bool $p_bool_Hidden Set the input to be hidden, default false.
* @return string
*/
protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) {
$l_str_Style = "";
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
if ($p_bool_Hidden) {
$l_str_Style .= 'display:none;';
}
return sprintf('<input type="text" name="%s" id="%s" maxlength="%d" style="%s" value="%s" %s/>',
$l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength,
$l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : '');
}
/**
* Returns the html tag for an input [type = text].
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre load the input field.
* @param int $p_str_MaxLength Maximum length of the input, default 999 characters.
* @param bool $p_bool_Readonly Set the input to be read only, default false.
* @param bool $p_bool_Hidden Set the input to be hidden, default false.
* @return string
*/
protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) {
$l_str_Style = "";
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
if ($p_bool_Hidden) {
$l_str_Style .= 'display:none;';
}
return sprintf('<input type="text" name="%s" id="%s" maxlength="%d" style="%s" value="%s" %s/>',
$l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength,
$l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : '');
}
/**
* Returns the html tag for an input [type = checkbox].
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre load the input field.
* @return string
*/
protected function addCheckbox($p_str_SettingName) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
return sprintf('<input type="checkbox" name="%s" id="%s" %s/>',
$l_arr_Data["name"], $l_arr_Data["id"],
MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : '');
}
/**
* Returns the html tag for an input [type = checkbox].
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre load the input field.
* @return string
*/
protected function addCheckbox($p_str_SettingName) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
return sprintf('<input type="checkbox" name="%s" id="%s" %s/>',
$l_arr_Data["name"], $l_arr_Data["id"],
MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : '');
}
/**
* Returns the html tag for a select box.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre select the current value.
* @param array $p_arr_Options Possible options to be selected.
* @return string
*/
protected function addSelectBox($p_str_SettingName, $p_arr_Options) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
$l_str_Options = "";
/**
* Returns the html tag for a select box.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre select the current value.
* @param array $p_arr_Options Possible options to be selected.
* @return string
*/
protected function addSelectBox($p_str_SettingName, $p_arr_Options) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
$l_str_Options = "";
/* loop through all array keys */
foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) {
$l_str_Options .= sprintf('<option value="%s" %s>%s</option>',
$l_str_Value,
$l_arr_Data["value"] == $l_str_Value ? "selected" : "",
$l_str_Caption);
}
return sprintf('<select name="%s" id="%s">%s</select>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options);
}
/* loop through all array keys */
foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) {
$l_str_Options .= sprintf('<option value="%s" %s>%s</option>',
$l_str_Value,
$l_arr_Data["value"] == $l_str_Value ? "selected" : "",
$l_str_Caption);
}
return sprintf('<select name="%s" id="%s">%s</select>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options);
}
/**
* Returns the html tag for a text area.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre fill the text area.
* @return string
*/
protected function addTextArea($p_str_SettingName) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
return sprintf('<textarea name="%s" id="%s">%s</textarea>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]);
}
/**
* Returns the html tag for a text area.
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre fill the text area.
* @return string
*/
protected function addTextArea($p_str_SettingName) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
return sprintf('<textarea name="%s" id="%s">%s</textarea>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]);
}
/**
* Returns the html tag for an input [type = text] with color selection class.

View file

@ -5,12 +5,12 @@
* @filesource
* @author Stefan Herndler
* @since 1.5.0 14.09.14 14:47
*
*
* Edited for:
* 2.0.4 2020-11-01T0509+0100
* 2.1.0 2020-11-08T2148+0100
* 2.1.1 2020-11-16T2152+0100
*
*
* Last modified: 2020-11-16T2152+0100
*/
@ -79,7 +79,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* @author Stefan Herndler
* @since 1.5.0
* @return array
*
*
* Edited for v2.0.4 to reflect changes in display since WPv5.5
* Details in class/config.php
*/
@ -409,9 +409,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
*
* @author Stefan Herndler
* @since 1.5.0
*
*
* Edited heading for v2.0.4
*
*
* The former 'hyperlink arrow', incompatible with combined identical footnotes,
* became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics
* of the footnote number.
@ -473,27 +473,32 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
*
* @author Stefan Herndler
* @since 1.5.5
*
* Edited for:
* 2.1.1 add priority level setting for the_content 2020-11-16T2152+0100
* 2.2.0 add priority level settings for the other hooks 2020-11-19T1421+0100
*
* Edited for:
* 2.1.1 add priority level setting for the_content 2020-11-16T2152+0100
* 2.2.0 add priority level settings for the other hooks 2020-11-19T1421+0100
*/
public function lookupHooks() {
// load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup");
// replace all placeholders
// priority level was initially hard-coded default
// shows "9223372036854775807" in the numbox
// empty should be interpreted as PHP_INT_MAX,
// empty should be interpreted as PHP_INT_MAX,
// but a numbox cannot be set to empty: <https://github.com/Modernizr/Modernizr/issues/171>
// define -1 as PHP_INT_MAX instead
$l_obj_Template->replace(
array(
"description" => __("The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features. Default 9223372036854775807 or -1 is lowest priority, 0 is highest. For the reference container to sit above related posts, the priority level of the_content hook may need to be at most 1200. For Footnotes to work when a glossary plugin is active, a higher priority of 1000 may be needed. Another priority level for the_content with proven efficiency is 10.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-1" => __("The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-2" => __("Default 9223372036854775807 is lowest priority, 0 is highest.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-3" => __("To restore default priority, set to -1, interpreted as 9223372036854775807, the constant PHP_INT_MAX.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-4" => __("For the reference container to sit above related posts, the priority level of the_content hook may need to be at most 1200.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-5" => __("For Footnotes to work when a glossary plugin is active, a higher priority of 1000 may be needed.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-6" => __("For the_content, another good pick with proven efficiency is priority level 10.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
@ -508,17 +513,17 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT),
"priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX),
"url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/",
"label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"),
"the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT),
"priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX),
"url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/",
"label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"),
"widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE),
"priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX),
"url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title",
"label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"),
"widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT),
"priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX),

View file

@ -134,7 +134,7 @@ class MCI_Footnotes {
wp_enqueue_script( 'jquery-ui-position' );
wp_enqueue_script( 'jquery-ui-tooltip' );
// enqueue jQuery Tools: redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100
// enqueue jQuery Tools: redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), '', '2.1.1');

View file

@ -425,17 +425,14 @@ class MCI_Footnotes_Settings {
"footnotes_storage" => array(
self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => '',
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no',
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
// Identical footnotes should not be combined by default
// as long as the feature raises criticism for malfunctioning:
// <https://wordpress.org/support/topic/too-many-errors-18/>
self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => '',
self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => '',
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => '',
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
@ -444,7 +441,11 @@ class MCI_Footnotes_Settings {
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
self::C_STR_FOOTNOTES_LOVE => 'no',
self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'yes',
self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'no'
// since removal of the_post hook, expert mode is no danger zone
// not for experts only; raising awareness about relative positioning
// changed default to 'yes':
self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes'
),
@ -455,14 +456,18 @@ class MCI_Footnotes_Settings {
self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
// The default footnote referrer surroundings should be square brackets:
// * as in English typesetting;
// * with respect to baseline footnote referrers new option;
// * as in English or US American typesetting;
// * for better UX thanks to a more button-like appearance;
// * for stylistic consistency with the expand-collapse button
// * for stylistic consistency with the expand-collapse button;
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => '',
// alternative, low-script tooltips using CSS for transitions
// in response to user demand for website with jQuery UI outage
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
// The mouse over content truncation should be enabled by default
// to raise awareness of the functionality and to prevent the screen

View file

@ -16,8 +16,8 @@
* 2.1.1: combining identical footnotes: fixed dead links 2020-11-14T2233+0100
* 2.1.1: options fixing ref container layout and referrer vertical alignment 2020-11-16T2024+0100
* 2.1.1: option fixing ref container relative position 2020-11-17T0254+0100
*
* Last modified 2020-11-18T0138+0100
* 2.1.2: options for the other hooks 2020-11-19T1849+0100
* 2.1.2: support for Elementor accordion toggle section names 2020-11-20T0617+0100
*/
// If called directly, abort:
@ -65,35 +65,36 @@ class MCI_Footnotes_Task {
* @since 1.5.0
*
* Edited for:
* 2.0.5 through v2.0.7 changes to priority 2020-11-02T0330+0100..2020-11-06T1344+0100
* 2.2.0 add settings for all hooks 2020-11-19T1248+0100
* 2.0.5 through v2.0.7 changes to priority 2020-11-02T0330+0100..2020-11-06T1344+0100
* 2.2.0 add settings for all hooks 2020-11-19T1248+0100
*
* Explicitly setting the_content priority to "10" instead of lowest "PHP_INT_MAX",
* makes the footnotes reference container display beneath the post and above other
* features added by other plugins, e.g. related post lists and social buttons.
* makes the footnotes reference container display beneath the post and above other
* features added by other plugins, e.g. related post lists and social buttons.
* Requested by users: <https://wordpress.org/support/topic/change-the-position-5/>
* Documentation: <https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter>
*
* Default remains PHP_INT_MAX.
* PHP_INT_MAX can be reset by leaving the number box empty.
*
* Default remains PHP_INT_MAX.
* PHP_INT_MAX cannot be reset by leaving the number box empty. because browsers
* (WebKit) dont allow it, so we must resort to -1.
*/
public function registerHooks() {
// get values from settings:
$p_int_TheTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL));
$p_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL));
$p_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL));
$p_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL));
$p_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL));
// PHP_INT_MAX can be set leaving the input field empty:
$p_int_TheTitlePriority = !empty($p_int_TheTitlePriority ) ? $p_int_TheTitlePriority : PHP_INT_MAX;
$p_int_TheContentPriority = !empty($p_int_TheContentPriority ) ? $p_int_TheContentPriority : PHP_INT_MAX;
$p_int_TheExcerptPriority = !empty($p_int_TheExcerptPriority ) ? $p_int_TheExcerptPriority : PHP_INT_MAX;
$p_int_WidgetTitlePriority = !empty($p_int_WidgetTitlePriority) ? $p_int_WidgetTitlePriority : PHP_INT_MAX;
$p_int_WidgetTextPriority = !empty($p_int_WidgetTextPriority ) ? $p_int_WidgetTextPriority : PHP_INT_MAX;
// get values from settings:
$p_int_TheTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL));
$p_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL));
$p_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL));
$p_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL));
$p_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL));
// PHP_INT_MAX can be set by -1:
$p_int_TheTitlePriority = ($p_int_TheTitlePriority == -1) ? PHP_INT_MAX : $p_int_TheTitlePriority ;
$p_int_TheContentPriority = ($p_int_TheContentPriority == -1) ? PHP_INT_MAX : $p_int_TheContentPriority ;
$p_int_TheExcerptPriority = ($p_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $p_int_TheExcerptPriority ;
$p_int_WidgetTitlePriority = ($p_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $p_int_WidgetTitlePriority;
$p_int_WidgetTextPriority = ($p_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $p_int_WidgetTextPriority ;
// append custom css to the header
add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX);
@ -102,13 +103,13 @@ class MCI_Footnotes_Task {
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) {
add_filter('the_title', array($this, "the_title"), $p_int_TheTitlePriority);
}
// custom priority level for reference container relative positioning; default PHP_INT_MAX:
}
// custom priority level for reference container relative positioning; default PHP_INT_MAX:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) {
add_filter('the_content', array($this, "the_content"), $p_int_TheContentPriority);
}
}
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) {
add_filter('the_excerpt', array($this, "the_excerpt"), $p_int_TheExcerptPriority);
}
@ -117,14 +118,14 @@ class MCI_Footnotes_Task {
}
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) {
add_filter('widget_text', array($this, "widget_text"), $p_int_WidgetTextPriority);
}
}
// REMOVED the_post HOOK 2020-11-08T1839+0100
//
//
//
// reset stored footnotes when displaying the header
self::$a_arr_Footnotes = array();
self::$a_bool_AllowLoveMe = true;
@ -375,7 +376,15 @@ class MCI_Footnotes_Task {
// post ID to make everything unique wrt infinite scroll and archive view
global $l_int_PostId;
$l_int_PostId = get_the_id();
// add support for Elementor section names:
// Element_Section::get_name()
// see <https://code.elementor.com/?s=section>
if (function_exists('Element_Section::get_name')) {
$l_int_PostId = Element_Section::get_name();
} else {
// work in WordPress mode:
$l_int_PostId = get_the_id();
}
// contains the index for the next footnote on this page
$l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1;
@ -538,7 +547,15 @@ class MCI_Footnotes_Task {
// post ID to make everything unique wrt infinite scroll and archive view:
global $l_int_PostId;
$l_int_PostId = get_the_id();
// add support for Elementor section names: 2020-11-20T0615+0100
// Element_Section::get_name()
// see <https://code.elementor.com/?s=section>
if (function_exists('Element_Section::get_name')) {
$l_int_PostId = Element_Section::get_name();
} else {
// work in WordPress mode:
$l_int_PostId = get_the_id();
}
// no footnotes has been replaced on this page
if (empty(self::$a_arr_Footnotes)) {

View file

@ -6,10 +6,10 @@
* Since: 1.0
* Version: 2.1.2
*
* Last modified: 2020-11-19T1444+0100
* Last modified: 2020-11-20T0620+0100
*/
/*
MCI Footnotes logo
The classes with 'heading' fix display in dashboard
@ -54,8 +54,8 @@ templates/public/footnote-alternative.html
.main-content .footnote_referrer a:link,
.footnote_plugin_tooltip_text {
text-decoration: none !important;
border-bottom: none !important;
line-height: 0;
border-bottom: none !important;
line-height: 0;
cursor: pointer;
}
.footnote_referrer:hover,
@ -218,10 +218,9 @@ when hovered in some themes, not in others:
.footnote_plugin_index.pointer:hover,
*/
.footnote_backlink:hover,
.footnote_plugin_index_combi:hover,
.footnote_plugin_link:hover,
.footnote_plugin_text a:hover {
text-decoration: unset;
text-decoration: unset;
text-decoration: underline !important;
}
.footnote_plugin_index {

View file

@ -6,7 +6,7 @@
* Since: 1.0
* Version: 2.1.2
*
* Last modified: 2020-11-19T1445+0100
* Last modified: 2020-11-20T0620+0100
*/
@ -106,27 +106,28 @@ IE doesnt support nth child, but these are not critical
*/
.expert-lookup tr th:first-child,
.expert-lookup tr td:first-child {
width: 170px !important;
width: 170px !important;
}
.expert-lookup tr th:nth-child(2),
.expert-lookup tr td:nth-child(2) {
width: 65px !important;
width: 65px !important;
}
.expert-lookup tr th:nth-child(3),
.expert-lookup tr td:nth-child(3) {
width: 200px !important;
width: 200px !important;
}
.expert-lookup tr td:nth-child(3) input {
width: 190px;
width: 190px;
}
.expert-lookup tr th:last-child,
.expert-lookup tr td:last-child {
white-space: nowrap;
white-space: nowrap;
}
.footnotes-description {
padding: 0 10px;
padding: 0 10%;
}
.footnotes-description p {
font-size: 1.4em;
font-size: 1.4em;
font-style: italic;
}

View file

@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
Requires at least: 3.9
Tested up to: 5.5
Requires PHP: 5.6
Stable Tag: 2.1.1
Stable Tag: 2.1.2
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -81,9 +81,11 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.1.2 =
- Bugfix: Dashboard: priority level settings for all other hooks, preventing them from being zeroed at save
- Bugfix: Layout: Reference container: Backlinks: no underline on hover cell when combining identicals is on
- Bugfix: Elementor: add experimental support for section name function
- Bugfix: Dashboard: priority level settings for all other hooks
- Update: Dashboard: WordPress documentation URLs of the hooks
- Update: Dashboard: feature description for the hooks priority level settings
- Update: Dashboard: feature description for the hooks priority level settings (not yet localized)
= 2.1.1 =
- Bugfix: Combining identical footnotes: fix dead links, ensure referrer-backlink bijectivity

View file

@ -1,5 +1,10 @@
<div class="expert-lookup footnotes-description">
<p>[[description]]</p>
<p>[[description-1]]</p>
<p>[[description-2]]</p>
<p>[[description-3]]</p>
<p>[[description-4]]</p>
<p>[[description-5]]</p>
<p>[[description-6]]</p>
</div>
<table class="expert-lookup widefat fixed">
<thead>

View file

@ -1,7 +1,7 @@
<span
class="footnote_referrer relative"
onmouseover="footnoteTooltipShow('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
onmouseover="footnoteTooltipShow('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
><a><[[element]]
id="footnote_plugin_tooltip_[[post_id]]_[[id]]"
class="footnote_plugin_tooltip_text"

View file

@ -1,7 +1,7 @@
<tr>
<td
class="footnote_plugin_index_combi"
>[[backlinks]]</td>
>[[backlinks]]</td>
<td
class="footnote_plugin_text"
>[[text]]</td>

View file

@ -4,10 +4,10 @@
<div
class="footnote_container_prepare"
><p
><span
class="footnote_reference_container_label"
onclick="footnote_expand_reference_container_[[post_id]]();"
>[[label]]</span
><span
class="footnote_reference_container_label"
onclick="footnote_expand_reference_container_[[post_id]]();"
>[[label]]</span
><span
class="footnote_reference_container_collapse_button"
style="[[button-style]]"
@ -17,8 +17,8 @@
>+</a
>]</span
></p
></div
>
></div
>
<div
id="footnote_references_container_[[post_id]]"
style="[[style]]"
@ -55,7 +55,7 @@
jQuery('html, body').animate({
scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.20
},
380);/*speed*/
380);/*duration*/
}
}
}
</script>