예제 #1
0
 public function createColumnContent($columnName, $postId)
 {
     if ($columnName == 'board_media_category') {
         $p = new DirectorEntity($postId);
         $cat = $p->getCategory();
         if ($cat == "Media") {
             echo "<div style='background-color: rgb(145, 15, 15); color: #fff; padding: 5px; border-radius: 3px; width: 120px; text-align: center;'>" . $cat . "</div>";
         } else {
             echo "<div style='background-color: rgb(15, 130, 145); color: #fff; padding: 5px; border-radius: 3px; width: 120px; text-align: center;'>" . $cat . "</div>";
         }
     }
 }
예제 #2
0
<?php

use Director\Entity\DirectorEntity;
$p = new DirectorEntity(get_the_ID());
if ($p->getCategory() == "Media") {
    header('Location: /media');
} else {
    header('Location: /about/board');
}