This commit is contained in:
dignajar 2015-11-28 20:21:04 -03:00
parent 78c2a85fd7
commit aaac775983
5 changed files with 18 additions and 15 deletions

View File

@ -34,16 +34,17 @@ foreach($themesPaths as $themePath)
{
$database = new dbJSON($langDefaultFile, false);
$databaseArray = $database->db;
$themeMetaData = $database->db['theme-data'];
// Check if exists locale language
if( Sanitize::pathFile($langLocaleFile) ) {
$database = new dbJSON($langLocaleFile, false);
$databaseArray['theme-data'] = array_merge($databaseArray['theme-data'], $database->db['theme-data']);
$themeMetaData = array_merge($themeMetaData, $database->db['theme-data']);
}
$databaseArray['theme-data']['dirname'] = basename($themePath);
$themeMetaData['dirname'] = basename($themePath);
// Theme data
array_push($themes, $databaseArray['theme-data']);
array_push($themes, $themeMetaData);
}
}

View File

@ -26,25 +26,27 @@ $langLocaleFile = PATH_THEME.'languages'.DS.$Site->locale().'.json';
$langDefaultFile = PATH_THEME.'languages'.DS.'en_US.json';
$database = false;
// Theme meta data from English
if( Sanitize::pathFile($langDefaultFile) ) {
$database = new dbJSON($langDefaultFile, false);
$themeMetaData = $database->db['theme-data'];
}
// Check if exists locale language
if( Sanitize::pathFile($langLocaleFile) ) {
$database = new dbJSON($langLocaleFile, false);
}
// Check if exists default language
elseif( Sanitize::pathFile($langDefaultFile) ) {
$database = new dbJSON($langDefaultFile, false);
}
if($database!==false)
{
$databaseArray = $database->db;
// Theme data
$theme = $databaseArray['theme-data'];
$theme = $themeMetaData;
// Remove theme data
// Remove theme meta data
unset($databaseArray['theme-data']);
// Add new words from language theme
// Add new words/phrase from language theme
$Language->add($databaseArray);
}

View File

@ -6,8 +6,8 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.6",
"releaseDate": "2015-11-13"
"version": "0.7",
"releaseDate": "2015-11-28"
},
"disqus-shortname": "Disqus shortname",
"enable-disqus-on-pages": "Enable Disqus on pages",

View File

@ -6,7 +6,7 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.6",
"releaseDate": "2015-11-13"
"version": "0.7",
"releaseDate": "2015-11-28"
}
}

View File

@ -32,7 +32,7 @@
?>
<!-- Custom Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext" rel="stylesheet" type="text/css">
<!-- Pure and Google Fonts -->
<style>