Exemplo n.º 1
0
 public function save($postId)
 {
     $eventEntity = new PostEntity($postId);
     if ($eventEntity->getType() == EventHelper::POST_TYPE) {
         $eventEntity->setPaymentUrl($_POST["payment_url"]);
     }
 }
Exemplo n.º 2
0
 /**
  * This populates the post entity
  */
 private function populatePostEntity()
 {
     $this->postEntity = new PostEntity($this->getId());
     if ($this->postEntity->getType() === "revision") {
         $this->postEntity = new PostEntity(get_the_ID());
     }
 }
Exemplo n.º 3
0
<?php

use Member\Helper\MemberHelper;
use INUtils\Entity\PostEntity;
use Staff\Helper\StaffHelper;
use Director\Helper\DirectorHelper;
$p = new PostEntity(get_the_ID());
if ($p->getType() == StaffHelper::STAFF_POST_TYPE) {
    header('location: /about/staff');
} elseif ($p->getType() == "post") {
    require_once __DIR__ . '/single-blog.php';
    exit;
} elseif ($p->getType() == "issue" || $p->getType() == "resource") {
    header('location: /advocacy');
} elseif ($p->getType() == "job") {
    header('location: /job-bank');
} elseif ($p->getType() == "sponsor") {
    header('location: /sponsors');
} elseif ($p->getType() == "board_member") {
    header('location: /about/board');
} elseif (!MemberHelper::isCurrentAccountActive()) {
    header('location: /renewal');
}
get_header();
the_content();
get_footer();