public static function savePost($post_id, $post, $update)
 {
     if ($customPostType = CustomPostTypes::Find($post->post_type)) {
         return $customPostType->saveMetaBoxes($post_id, $post, $update);
     }
     return null;
 }
Beispiel #2
0
 public function __construct($id, $title, $postType = 'page', $template = array())
 {
     $this->id = $id;
     $this->title = $title;
     $this->postType = $postType;
     $this->template = (array) $template;
     if ($customPostType = CustomPostTypes::Find($postType)) {
         $customPostType->addMetaBox($this);
     }
     add_action('admin_enqueue_scripts', array($this, 'insertScripts'));
 }