- Update: Global styling for the public plugin name

- Update: Easier usage of the public plugin name in translations
- Update: New Layout for the settings page to group similar settings to get a better overview
- Update: Display settings submit button only if there is at least 1 editable setting in the current tab
- Add: setting where the reference container appears on public pages (needs some corrections!)
- Bugfix: displays only one reference container in front of the footer on category pages

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@918851 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-05-21 18:33:26 +00:00
parent 49c54b6a89
commit d25f770bc5
19 changed files with 1322 additions and 1096 deletions

View file

@ -16,21 +16,21 @@
*/
function footnotes_load_language()
{
/* read current wordpress langauge */
$l_str_locale = apply_filters( 'plugin_locale', get_locale(), FOOTNOTES_PLUGIN_NAME );
/* get only language code (removed localization code) */
$l_str_languageCode = footnotes_getLanguageCode();
/* read current wordpress langauge */
$l_str_locale = apply_filters('plugin_locale', get_locale(), FOOTNOTES_PLUGIN_NAME);
/* get only language code (removed localization code) */
$l_str_languageCode = footnotes_getLanguageCode();
/* language file with localization exists */
if ( $l_bool_loaded = load_textdomain( FOOTNOTES_PLUGIN_NAME, FOOTNOTES_LANGUAGE_DIR . FOOTNOTES_PLUGIN_NAME . '-' . $l_str_locale . '.mo' ) ) {
/* language file with localization exists */
if ($l_bool_loaded = load_textdomain(FOOTNOTES_PLUGIN_NAME, FOOTNOTES_LANGUAGE_DIR . FOOTNOTES_PLUGIN_NAME . '-' . $l_str_locale . '.mo')) {
/* language file without localization exists */
} else if ( $l_bool_loaded = load_textdomain( FOOTNOTES_PLUGIN_NAME, FOOTNOTES_LANGUAGE_DIR . FOOTNOTES_PLUGIN_NAME . '-' . $l_str_languageCode . '.mo' ) ) {
/* language file without localization exists */
} else if ($l_bool_loaded = load_textdomain(FOOTNOTES_PLUGIN_NAME, FOOTNOTES_LANGUAGE_DIR . FOOTNOTES_PLUGIN_NAME . '-' . $l_str_languageCode . '.mo')) {
/* load default language file, nothing will happen: default language will be used (=english) */
} else {
load_textdomain( FOOTNOTES_PLUGIN_NAME, FOOTNOTES_LANGUAGE_DIR . FOOTNOTES_PLUGIN_NAME . '-en.mo' );
}
/* load default language file, nothing will happen: default language will be used (=english) */
} else {
load_textdomain(FOOTNOTES_PLUGIN_NAME, FOOTNOTES_LANGUAGE_DIR . FOOTNOTES_PLUGIN_NAME . '-en.mo');
}
}
/**
@ -41,15 +41,15 @@ function footnotes_load_language()
*/
function footnotes_getLanguageCode()
{
/* read current wordpress langauge */
$l_str_locale = apply_filters( 'plugin_locale', get_locale(), FOOTNOTES_PLUGIN_NAME );
/* check if wordpress language has a localization (e.g. "en_US" or "de_AT") */
if ( strpos( $l_str_locale, "_" ) !== false ) {
/* remove localization code */
$l_arr_languageCode = explode( "_", $l_str_locale );
$l_str_languageCode = $l_arr_languageCode[ 0 ];
return $l_str_languageCode;
}
/* return language code lowercase */
return strtolower( $l_str_locale );
/* read current wordpress langauge */
$l_str_locale = apply_filters('plugin_locale', get_locale(), FOOTNOTES_PLUGIN_NAME);
/* check if wordpress language has a localization (e.g. "en_US" or "de_AT") */
if (strpos($l_str_locale, "_") !== false) {
/* remove localization code */
$l_arr_languageCode = explode("_", $l_str_locale);
$l_str_languageCode = $l_arr_languageCode[0];
return $l_str_languageCode;
}
/* return language code lowercase */
return strtolower($l_str_locale);
}