Release version 1.3.1

- Bugfix: Allow settings to be empty
- Bugfix: Removed space between the hyperlink and superscript in the footnotes index

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@967729 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-08-18 15:06:06 +00:00
parent 68351cbbaa
commit a138340491
6 changed files with 19 additions and 11 deletions

View file

@ -36,8 +36,8 @@ class MCI_Footnotes_Tab_Custom extends MCI_Footnotes_Admin {
// styling // styling
add_meta_box( add_meta_box(
'MCI_Footnotes_Tab_Custom_Styling', 'MCI_Footnotes_Tab_Custom_Styling',
__("Layout", FOOTNOTES_PLUGIN_NAME), __("Superscript layout", FOOTNOTES_PLUGIN_NAME),
array($this, 'Styling'), array($this, 'Superscript'),
FOOTNOTES_SETTINGS_TAB_CUSTOM, FOOTNOTES_SETTINGS_TAB_CUSTOM,
'main' 'main'
); );
@ -63,13 +63,13 @@ class MCI_Footnotes_Tab_Custom extends MCI_Footnotes_Admin {
* footnotes layout before and after the index in text * footnotes layout before and after the index in text
* @since 1.3.1 * @since 1.3.1
*/ */
public function Styling() { public function Superscript() {
// setting for 'before footnotes' // setting for 'before footnotes'
$this->AddLabel(FOOTNOTES_INPUT_CUSTOM_STYLING_BEFORE, __("Before Footnotes:", FOOTNOTES_PLUGIN_NAME)); $this->AddLabel(FOOTNOTES_INPUT_CUSTOM_STYLING_BEFORE, __("Before Footnotes index:", FOOTNOTES_PLUGIN_NAME));
$this->AddTextbox(FOOTNOTES_INPUT_CUSTOM_STYLING_BEFORE, "footnote_plugin_50"); $this->AddTextbox(FOOTNOTES_INPUT_CUSTOM_STYLING_BEFORE, "footnote_plugin_50");
$this->AddNewline(); $this->AddNewline();
// setting for 'after footnotes' // setting for 'after footnotes'
$this->AddLabel(FOOTNOTES_INPUT_CUSTOM_STYLING_AFTER, __("After Footnotes:", FOOTNOTES_PLUGIN_NAME)); $this->AddLabel(FOOTNOTES_INPUT_CUSTOM_STYLING_AFTER, __("After Footnotes index:", FOOTNOTES_PLUGIN_NAME));
$this->AddTextbox(FOOTNOTES_INPUT_CUSTOM_STYLING_AFTER, "footnote_plugin_50"); $this->AddTextbox(FOOTNOTES_INPUT_CUSTOM_STYLING_AFTER, "footnote_plugin_50");
$this->AddNewline(); $this->AddNewline();
} }

View file

@ -66,7 +66,7 @@ class MCI_Footnotes_Tab_HowTo extends MCI_Footnotes_Admin {
$l_arr_Footnote_StartingTag = $this->LoadSetting(FOOTNOTES_INPUT_PLACEHOLDER_START_USERDEFINED); $l_arr_Footnote_StartingTag = $this->LoadSetting(FOOTNOTES_INPUT_PLACEHOLDER_START_USERDEFINED);
$l_arr_Footnote_EndingTag = $this->LoadSetting(FOOTNOTES_INPUT_PLACEHOLDER_END_USERDEFINED); $l_arr_Footnote_EndingTag = $this->LoadSetting(FOOTNOTES_INPUT_PLACEHOLDER_END_USERDEFINED);
} }
$l_str_Example = $l_arr_Footnote_StartingTag["value"] . __("example string", FOOTNOTES_PLUGIN_NAME) . $l_arr_Footnote_EndingTag["value"]; $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . __("example string", FOOTNOTES_PLUGIN_NAME) . $l_arr_Footnote_EndingTag["value"] . " World!";
?> ?>
<div style="text-align:center;"> <div style="text-align:center;">
<div class="footnote_placeholder_box_container"> <div class="footnote_placeholder_box_container">

View file

@ -218,6 +218,10 @@ class MCI_Footnotes_Task {
$l_str_StartingTag = htmlspecialchars($l_str_StartingTag); $l_str_StartingTag = htmlspecialchars($l_str_StartingTag);
$l_str_EndingTag = htmlspecialchars($l_str_EndingTag); $l_str_EndingTag = htmlspecialchars($l_str_EndingTag);
} }
// if footnotes short code is empty, return the content without changes
if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) {
return $p_str_Content;
}
// check for a footnote placeholder in the current page // check for a footnote placeholder in the current page
do { do {

View file

@ -93,8 +93,8 @@ function MCI_Footnotes_ValidateOptions($p_arr_Options, $p_arr_Default, $p_bool_C
if (!empty($l_str_Value)) { if (!empty($l_str_Value)) {
$p_arr_Options[$l_str_Key] = $l_str_Value; $p_arr_Options[$l_str_Key] = $l_str_Value;
// check if default value is defined // check if default value is defined
} else if (array_key_exists($l_str_Key, $p_arr_Default)) { //} else if (array_key_exists($l_str_Key, $p_arr_Default)) {
$p_arr_Options[$l_str_Key] = $p_arr_Default[$l_str_Key]; // $p_arr_Options[$l_str_Key] = $p_arr_Default[$l_str_Key];
} else { } else {
$p_arr_Options[$l_str_Key] = ""; $p_arr_Options[$l_str_Key] = "";
} }

View file

@ -5,7 +5,7 @@ Requires at least: 3.9
Tested up to: 3.9.1 Tested up to: 3.9.1
License: GPLv3 or later License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable Tag: 1.3.0 Stable Tag: 1.3.1
== Description == == Description ==
@ -64,6 +64,11 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho
== Changelog == == Changelog ==
= 1.3.1 =
- Bugfix: Allow settings to be empty
- Bugfix: Removed space between the hyperlink and superscript in the footnotes index
- Added: Setting to customize the text before and after the footnotes index in superscript
= 1.3.0 = = 1.3.0 =
- Bugfix: Changed tooltip class to be unique - Bugfix: Changed tooltip class to be unique
- Bugfix: Changed superscript styling to not manipulate the line height - Bugfix: Changed superscript styling to not manipulate the line height

View file

@ -2,8 +2,7 @@
name="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]" name="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]"
id="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]" id="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]"
class="footnote_plugin_tooltip_text" class="footnote_plugin_tooltip_text"
onclick="footnote_expand_reference_container('#footnote_plugin_reference_[[FOOTNOTE INDEX]]');"> onclick="footnote_expand_reference_container('#footnote_plugin_reference_[[FOOTNOTE INDEX]]');"><sup>[[FOOTNOTE BEFORE]][[FOOTNOTE INDEX]][[FOOTNOTE AFTER]]</sup>
<sup>[[FOOTNOTE BEFORE]][[FOOTNOTE INDEX]][[FOOTNOTE AFTER]]</sup>
</a> </a>
<span class="footnote_tooltip" id="footnote_plugin_tooltip_text_[[FOOTNOTE INDEX]]"> <span class="footnote_tooltip" id="footnote_plugin_tooltip_text_[[FOOTNOTE INDEX]]">
[[FOOTNOTE TEXT]] [[FOOTNOTE TEXT]]