Skip to content

Commit

Permalink
Added getter for appModel, solving bugs registering taxonomies
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopvilar committed Aug 29, 2014
1 parent 67bcf96 commit c1b2edf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public function registerTaxonomies(){

foreach($this->models as $model){

if($model->getTaxonomies() && in_array($tax['key'], $model->getTaxonomies())){
array_push($post_type, $model->getPostType());
if($model->getAppModel()->getTaxonomies() && in_array($tax['key'], $model->getAppModel()->getTaxonomies())){
array_push($post_type, $model->getAppModel()->getPostType());
}

}
Expand Down
4 changes: 4 additions & 0 deletions src/core/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,8 @@ private function from_camel_case($str) {
return preg_replace_callback('/([A-Z])/', $func, $str);
}

public function getAppModel(){
return $this->appModel;
}

}

0 comments on commit c1b2edf

Please sign in to comment.