Version 1.0.2

* New setting to collapse the reference container by default
* Added link behind the footnotes to automatically jump to the reference container
* New function to easy output input fields for the settings page
* Updated translation for the new setting

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@917811 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-05-20 11:38:36 +00:00
parent 2e8614908f
commit ab368ba787
16 changed files with 655 additions and 60 deletions

View file

@ -4,7 +4,7 @@
* User: Stefan
* Date: 15.05.14
* Time: 16:21
* Version: 1.0
* Version: 1.0-beta
* Since: 1.0
*/
@ -33,7 +33,7 @@ function footnotes_plugin_settings_link( $links, $file )
* @param string $p_str_OptionsField
* @return array
*/
function footnote_filter_options( $p_str_OptionsField )
function footnotes_filter_options( $p_str_OptionsField )
{
$l_arr_Options = get_option( $p_str_OptionsField );
/* loop through all keys in the array and filters them */
@ -42,4 +42,26 @@ function footnote_filter_options( $p_str_OptionsField )
}
/* returns the filtered array */
return $l_arr_Options;
}
/**
* converts a string depending on its value to a boolean
* @since 1.0-beta
* @param string $p_str_Value
* @return bool
*/
function footnotes_ConvertToBool($p_str_Value) {
/* convert string to lower-case to make it easier */
$p_str_Value = strtolower($p_str_Value);
/* check if string seems to contain a "true" value */
switch($p_str_Value) {
case "checked":
case "yes":
case "true":
case "on":
case "1":
return true;
}
/* nothing found that says "true", so we return false */
return false;
}