/** * Gets the HTML for a production input control of an event. * * The input control consists of: * 1. A hidden input with the production_id and * 2. A link to the admin page of the production. * * @since 0.11 * @param array $field The field. * @param int $event_id The event that is being edited. * @return string The HTML. */ public function get_control_production_html($field, $event_id) { $html = ''; $production_id = get_post_meta($event_id, $field['id'], true); if (!empty($production_id)) { $production = new WPT_Production($production_id); $html .= '<input type="hidden" id="wpt_event_editor_' . $field['id'] . '" name="wpt_event_editor_' . $field['id'] . '" value="' . $production->ID . '" />'; $html .= '<a href="' . get_edit_post_link($production->ID) . '">' . $production->title() . '</a>'; } return $html; }