Skip to content

Commit

Permalink
Aeria Post Raw Fix extends
Browse files Browse the repository at this point in the history
Signed-off-by: Graziano Vincini <graziano.vincini@caffeinalab.com>
  • Loading branch information
vincio87 committed Feb 25, 2015
1 parent aa31932 commit cb529d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/AeriaPostRaw.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if( false === defined('AERIA') ) exit;

class AeriaPostRaw {
class AeriaPostRaw extends AeriaPost {
public function __construct($id,$type=null){
if($id){
if(is_a($id,'WP_Post')){
Expand All @@ -25,15 +25,15 @@ public function __construct($id,$type=null){
$this->parent = ($t_post->post_parent)?new self($t_post->post_parent):null;
}
}

public function loadAsPage($id){
if($id){
if(is_a($id,'WP_Post')){
$t_post = $id;
} else {
$t_post = is_numeric($id)?get_page($id):get_page_by_path($id);
}

$this->id = $t_post->ID;
$this->title = $t_post->post_title;
$this->content = $t_post->post_content;
Expand Down

0 comments on commit cb529d4

Please sign in to comment.