Releasing v2.0.6 only obvious and direly needed edits cannot wait with respect to users, cannot keep responding to users without providing this. May we please do the more extensive testing when bigger edits are at stake. Thank you. — For consistency, tags/2.0.5 is included as-is because it was actually delivered to our users only because the readme.txt was up-to-date too soon. So, that code is actually still on part of our users machines and I cannot hide away the priority level changes. See Changelog section. Sorry for that!

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413455 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-11-05 18:00:18 +00:00
parent 362d9e60c6
commit d7b36e27e9
10 changed files with 46 additions and 34 deletions

View file

@ -488,9 +488,14 @@ class MCI_Footnotes_Task {
if (empty($l_str_FootnoteText)) {
continue;
}
// get footnote index
$l_str_FirstFootnoteIndex = ($l_str_Index + 1);
$l_str_FootnoteIndex = MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
// generate content of footnote index cell
$l_str_FirstFootnoteIndex = ($l_str_Index + 1);
// wrap each index # in a white-space:nowrap span
$l_str_FootnoteIndex = '<span class="footnote_index_item">';
// wrap the arrow in a @media print { display:hidden } span
$l_str_FootnoteIndex .= '<span class="footnote_index_arrow">' . $l_str_Arrow . '&#x200A;</span>';
// get the index
$l_str_FootnoteIndex .= MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
// check if it isn't the last footnote in the array
if ($l_str_FirstFootnoteIndex < count(self::$a_arr_Footnotes) && MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
@ -501,16 +506,18 @@ class MCI_Footnotes_Task {
// set the further footnote as empty so it won't be displayed later
self::$a_arr_Footnotes[$l_str_CheckIndex] = "";
// add the footnote index to the actual index
$l_str_FootnoteIndex .= ", " . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
$l_str_FootnoteIndex .= ',</span> <span class="footnote_index_item">' . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
}
}
}
$l_str_FootnoteIndex .= '</span>';
// replace all placeholders in the template templates/public/reference-container-body.html
$l_obj_Template->replace(
array(
"post_id" => $l_int_PostID,
"id" => MCI_Footnotes_Convert::Index($l_str_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)),
"arrow" => $l_str_Arrow,
"index" => $l_str_FootnoteIndex,
"text" => $l_str_FootnoteText
)