/** * Metabox with meta key and meta values */ public function metabox_attributes() { global $wpdb; // View (Contributions table) $contribution = new API_Contribution(get_the_ID()); $campaign_name = $wpdb->get_var("SELECT post_title FROM " . $wpdb->prefix . "posts WHERE ID = " . $contribution->id_campaign . ";"); $campaign_link = get_edit_post_link($contribution->id_campaign); $volunteer_name = $contribution->data['author_name']; $volunteer_link = get_edit_post_link($contribution->data['author_id']); $tracking_link = Tracking::get_url(intval($contribution->data['tracking'])); $maps = 1; include CINDA_DIR . 'assets/views/contribution/attributes_table.php'; }
/** * Load welcome view */ function tracking_page() { if (Tracking::exists($_GET['id'])) { $tracking = new Tracking($_GET['id']); } else { return; } $campaign_name = (new API_Campaign($tracking->get_idCampaign()))->title; $author_name = (new API_Volunteer($tracking->get_idVolunteer()))->nickname; include CINDA_DIR . 'assets/views/cinda/page_tracking.php'; }