Updates
This commit is contained in:
parent
78c2a85fd7
commit
aaac775983
|
@ -34,16 +34,17 @@ foreach($themesPaths as $themePath)
|
||||||
{
|
{
|
||||||
$database = new dbJSON($langDefaultFile, false);
|
$database = new dbJSON($langDefaultFile, false);
|
||||||
$databaseArray = $database->db;
|
$databaseArray = $database->db;
|
||||||
|
$themeMetaData = $database->db['theme-data'];
|
||||||
|
|
||||||
// Check if exists locale language
|
// Check if exists locale language
|
||||||
if( Sanitize::pathFile($langLocaleFile) ) {
|
if( Sanitize::pathFile($langLocaleFile) ) {
|
||||||
$database = new dbJSON($langLocaleFile, false);
|
$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
|
// Theme data
|
||||||
array_push($themes, $databaseArray['theme-data']);
|
array_push($themes, $themeMetaData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,25 +26,27 @@ $langLocaleFile = PATH_THEME.'languages'.DS.$Site->locale().'.json';
|
||||||
$langDefaultFile = PATH_THEME.'languages'.DS.'en_US.json';
|
$langDefaultFile = PATH_THEME.'languages'.DS.'en_US.json';
|
||||||
$database = false;
|
$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
|
// Check if exists locale language
|
||||||
if( Sanitize::pathFile($langLocaleFile) ) {
|
if( Sanitize::pathFile($langLocaleFile) ) {
|
||||||
$database = new dbJSON($langLocaleFile, false);
|
$database = new dbJSON($langLocaleFile, false);
|
||||||
}
|
}
|
||||||
// Check if exists default language
|
|
||||||
elseif( Sanitize::pathFile($langDefaultFile) ) {
|
|
||||||
$database = new dbJSON($langDefaultFile, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($database!==false)
|
if($database!==false)
|
||||||
{
|
{
|
||||||
$databaseArray = $database->db;
|
$databaseArray = $database->db;
|
||||||
|
|
||||||
// Theme data
|
// Theme data
|
||||||
$theme = $databaseArray['theme-data'];
|
$theme = $themeMetaData;
|
||||||
|
|
||||||
// Remove theme data
|
// Remove theme meta data
|
||||||
unset($databaseArray['theme-data']);
|
unset($databaseArray['theme-data']);
|
||||||
|
|
||||||
// Add new words from language theme
|
// Add new words/phrase from language theme
|
||||||
$Language->add($databaseArray);
|
$Language->add($databaseArray);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://github.com/dignajar/bludit-plugins",
|
"website": "https://github.com/dignajar/bludit-plugins",
|
||||||
"version": "0.6",
|
"version": "0.7",
|
||||||
"releaseDate": "2015-11-13"
|
"releaseDate": "2015-11-28"
|
||||||
},
|
},
|
||||||
"disqus-shortname": "Disqus shortname",
|
"disqus-shortname": "Disqus shortname",
|
||||||
"enable-disqus-on-pages": "Enable Disqus on pages",
|
"enable-disqus-on-pages": "Enable Disqus on pages",
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://github.com/dignajar/bludit-plugins",
|
"website": "https://github.com/dignajar/bludit-plugins",
|
||||||
"version": "0.6",
|
"version": "0.7",
|
||||||
"releaseDate": "2015-11-13"
|
"releaseDate": "2015-11-28"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -32,7 +32,7 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Custom Fonts -->
|
<!-- 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 -->
|
<!-- Pure and Google Fonts -->
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in New Issue