public function ch_manage_project_task_posts_custom_column($column_name, $post_id)
 {
     if ($column_name == 'ch_project') {
         $arr_ids = get_post_meta($post_id, '_ch_task_project_ids');
         foreach (array_unique($arr_ids) as $id) {
             $fund = PN_Project::getById($id);
             echo $fund->post->post_title . '<br>';
         }
     }
 }
Exemplo n.º 2
0
 function meta_box_save($post_id)
 {
     if (in_array(get_post_type($post_id), $this->post_types)) {
         $project = PN_Project::getById($post_id);
         if (isset($_POST['_ch_project_url']) && !empty($_POST['_ch_project_url'])) {
             $project->set_project_url($_POST['_ch_project_url']);
             $project->save();
         } else {
             $project->set_project_url('');
             $project->save();
         }
     }
 }