/** * * Manage Columns for List View * * @param $column * @param $post_id */ function manage_post_table_columns($column, $post_id) { switch ($column) { case 'contact_phone': $val = self::get_meta($post_id, 'contact_phone'); if (!empty($val)) { echo implode(' , ', $val); } break; case 'contact_email': $val = self::get_meta($post_id, self::$primary_email_key); if (!empty($val)) { $emails = array(); foreach ($val as $e) { $emails[] = '<a href="mailto:' . $e . '">' . $e . '</a>'; } echo implode(' , ', $emails); } break; case 'contact_Assignee': $val = self::get_meta($post_id, 'assgin_to'); foreach ($val as $e) { $user_id = $e; } if (!empty($user_id)) { $user_info = get_userdata($user_id); $url = esc_url(add_query_arg(array('post_type' => $this->post_type, 'created_by' => $user_id), 'edit.php')); printf("<a href='%s'>%s</a>", $url, $user_info->display_name); } break; } parent::manage_post_table_columns($column, $post_id); }
/** * Managing post table columns * * @param $column * @param $post_id */ public function manage_post_table_columns($column, $post_id) { parent::manage_post_table_columns($column, $post_id); }