Skip to content

Commit

Permalink
Allow Parent Config Access
Browse files Browse the repository at this point in the history
VanilleConfig : Allow Use of  Parent Namespace
  • Loading branch information
Jakiboy committed May 18, 2020
1 parent c449db8 commit beca935
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jakiboy/vanilleplugin",
"version" : "0.0.7",
"version" : "0.0.8",
"type": "library",
"description": "Framwork for VanillePlugin",
"keywords": ["VanillePlugin","WordPress","WordPress-Plugin","WordPress-Plugin-Framework","jakiboy"],
Expand Down
11 changes: 4 additions & 7 deletions src/VanilleConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,19 @@ public static function getStatic()

/**
* Set Config Json File
* Allow Parent Config Access
*
* @param PluginNameSpaceInterface $plugin
* @return void
*/
protected function initConfig(PluginNameSpaceInterface $plugin)
{
// Define Internal Namespace
if (!$this->namespace) {
$this->namespace = $plugin->getNameSpace();
}
$this->namespace = $plugin->getNameSpace();

// Parse VanillePLugin Config file
if (!$this->global) {
$json = new Json("{$this->getRoot()}{$this->path}");
$this->global = $json->parse();
}
$json = new Json("{$this->getRoot()}{$this->path}");
$this->global = $json->parse();
}

/**
Expand Down

0 comments on commit beca935

Please sign in to comment.