development 2.2.0d2 tooltip durations settings

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2432531 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-12-06 12:46:45 +00:00
parent 3e8d312969
commit ec116d10a2
17 changed files with 284 additions and 94 deletions

View file

@ -13,9 +13,9 @@
*
*
* ########## fix punctuation-related localization issue in dashboard labels 2020-12-01T0211+0100
* ########## this fix reverted for now; restore when updating strings and translations
* ########## this fix reverted for now; restore when updating strings and translations, line 400
*
* Last modified: 2020-12-05T0540+0100
* Last modified: 2020-12-05T2008+0100
*/
@ -395,8 +395,8 @@ abstract class MCI_Footnotes_LayoutEngine {
// e.g. Greek using a raised dot.
// In French, colon is preceded by a space, forcibly non-breaking,
// and narrow per new school.
// Eventually add colon to label strings for inclusion in localization.
// Else drop colons after labels.
// Add colon to label strings for inclusion in localization.
// Colon after label is widely preferred best practice, mandatory per style guides.
return sprintf('<label for="%s">%s:</label>', $p_str_SettingName, $p_str_Caption);
// ^ here deleted colon 2020-12-01T0156+0100
// ########## this fix reverted for now; restore when updating strings and translations
@ -502,20 +502,22 @@ abstract class MCI_Footnotes_LayoutEngine {
* @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_in_Min Minimum value.
* @param int $p_int_Max Maximum value.
* @param int $p_in_Min Minimum value.
* @param int $p_int_Max Maximum value.
* @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default)
* @return string
*
* Edited:
* @since 2.2.0 step argument and %f to allow decimals 2020-12-03T0631+0100..2020-12-05T0506+0100
* @since 2.2.0 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-05T2006+0100
*/
protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) {
// collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
if ($p_bool_Deci) {
return sprintf('<input type="number" name="%s" id="%s" value="%f" step="0.1" min="%d" max="%d"/>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max);
$l_str_Value = number_format($l_arr_Data["value"], 1);
return sprintf('<input type="number" name="%s" id="%s" value="%s" step="0.1" min="%d" max="%d"/>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max);
} else {
return sprintf('<input type="number" name="%s" id="%s" value="%d" min="%d" max="%d"/>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max);