Prepare for release version 1.5.2
- Add: Setting to enable/disable the mouse-over box - Add: Current WordPress Theme to the Diagnostics sub page - Add: ManFisher note in the "other Plugins" sub page - Update: Removed unnecessary hidden inputs from the Settings page - Update: Merged public CSS files to reduce the output and improve the performance - Update: Translations (EN and DE) - Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting - Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) - Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@1000036 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
a0d945d44c
commit
58b3dd27f6
26 changed files with 345 additions and 241 deletions
|
@ -216,6 +216,8 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
$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();
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +241,7 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
|
||||
// form to submit the active section
|
||||
echo '<!--suppress HtmlUnknownTarget --><form method="post" action="">';
|
||||
settings_fields($l_arr_ActiveSection["container"]);
|
||||
//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"]);
|
||||
|
@ -270,19 +272,12 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
* @return bool
|
||||
*/
|
||||
private function saveSettings() {
|
||||
// get only Footnotes settings
|
||||
$l_arr_Settings = array();
|
||||
foreach($_POST as $l_str_SettingsName => $l_str_Value) {
|
||||
if (substr($l_str_SettingsName, 0, 8) == "footnote") {
|
||||
$l_arr_Settings[$l_str_SettingsName] = $l_str_Value;
|
||||
}
|
||||
}
|
||||
// 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];
|
||||
// update settings
|
||||
return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_Settings);
|
||||
return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $_POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue