</header><!-- .entry-header -->
		
		<div class="entry-content">
			<div id="wats_single_ticket_metas">
			<?php 
            if ($wats_settings['ticket_priority_key_enabled'] == 1) {
                echo '<div id="wats_single_ticket_priority" class="wats_priority_' . get_post_meta($post->ID, 'wats_ticket_priority', true) . '"><label class="wats_label">' . __("Current priority : ", 'WATS') . '</label>' . wats_ticket_get_priority($post) . '</div>';
            }
            if ($wats_settings['ticket_status_key_enabled'] == 1) {
                echo '<div id="wats_single_ticket_status" class="wats_status_' . get_post_meta($post->ID, 'wats_ticket_status', true) . '"><label class="wats_label">' . __("Current status : ", 'WATS') . '</label>' . wats_ticket_get_status($post) . '</div>';
            }
            if ($wats_settings['ticket_type_key_enabled'] == 1) {
                echo '<div id="wats_single_ticket_type" class="wats_type_' . get_post_meta($post->ID, 'wats_ticket_type', true) . '"><label class="wats_label">' . __("Ticket type : ", 'WATS') . '</label>' . wats_ticket_get_type($post) . '</div>';
            }
            if ($wats_settings['ticket_product_key_enabled'] == 1) {
                echo '<div id="wats_single_ticket_product" class="wats_product_' . get_post_meta($post->ID, 'wats_ticket_product', true) . '"><label class="wats_label">' . __("Ticket product : ", 'WATS') . '</label>' . wats_ticket_get_product($post) . '</div>';
            }
            echo '<div id="wats_single_ticket_originator"><label class="wats_label">' . __("Ticket originator : ", 'WATS') . '</label>';
            the_author();
            echo '</div>';
            if (current_user_can('administrator')) {
                $ticket_author_name = get_post_meta($post->ID, 'wats_ticket_author_name', true);
                if ($ticket_author_name) {
                    echo '<div id="wats_single_ticket_author_name"><label class="wats_label">' . __('Ticket author name : ', 'WATS') . '</label>' . $ticket_author_name . '</div>';
                }
                $ticket_author_email = get_post_meta($post->ID, 'wats_ticket_author_email', true);
                if ($ticket_author_email) {
                    echo '<div id="wats_single_ticket_author_email"><label class="wats_label">' . __('Ticket author email : ', 'WATS') . '</label>' . '<a href="mailto:' . $ticket_author_email . '">' . $ticket_author_email . '</a></div>';
                }
                $ticket_author_url = get_post_meta($post->ID, 'wats_ticket_author_url', true);
                if ($ticket_author_url) {
function wats_single_ticket_content_filter($content)
{
    global $wats_settings, $post;
    $output = '';
    if (wats_check_visibility_rights()) {
        $output .= '<div id="wats_single_ticket_metas">';
        if ($wats_settings['ticket_priority_key_enabled'] == 1) {
            $output .= '<div id="wats_single_ticket_priority" class="wats_priority_' . get_post_meta($post->ID, 'wats_ticket_priority', true) . '"><label class="wats_label">' . __("Current priority : ", 'WATS') . '</label>' . wats_ticket_get_priority($post) . '</div>';
        }
        if ($wats_settings['ticket_status_key_enabled'] == 1) {
            $output .= '<div id="wats_single_ticket_status" class="wats_status_' . get_post_meta($post->ID, 'wats_ticket_status', true) . '"><label class="wats_label">' . __("Current status : ", 'WATS') . '</label>' . wats_ticket_get_status($post) . '</div>';
        }
        if ($wats_settings['ticket_type_key_enabled'] == 1) {
            $output .= '<div id="wats_single_ticket_type" class="wats_type_' . get_post_meta($post->ID, 'wats_ticket_type', true) . '"><label class="wats_label">' . __("Ticket type : ", 'WATS') . '</label>' . wats_ticket_get_type($post) . '</div>';
        }
        if ($wats_settings['ticket_product_key_enabled'] == 1) {
            $output .= '<div id="wats_single_ticket_product" class="wats_product_' . get_post_meta($post->ID, 'wats_ticket_product', true) . '"><label class="wats_label">' . __("Ticket product : ", 'WATS') . '</label>' . wats_ticket_get_product($post) . '</div>';
        }
        $output .= '<div id="wats_single_ticket_originator"><label class="wats_label">' . __("Ticket originator : ", 'WATS') . '</label>' . get_the_author() . '</div>';
        if (current_user_can('administrator')) {
            $ticket_author_name = get_post_meta($post->ID, 'wats_ticket_author_name', true);
            if ($ticket_author_name) {
                $output .= '<div id="wats_single_ticket_author_name"><label class="wats_label">' . __('Ticket author name : ', 'WATS') . '</label>' . $ticket_author_name . '</div>';
            }
            $ticket_author_email = get_post_meta($post->ID, 'wats_ticket_author_email', true);
            if ($ticket_author_email) {
                $output .= '<div id="wats_single_ticket_author_email"><label class="wats_label">' . __('Ticket author email : ', 'WATS') . '</label>' . '<a href="mailto:' . $ticket_author_email . '">' . $ticket_author_email . '</a></div>';
            }
            $ticket_author_url = get_post_meta($post->ID, 'wats_ticket_author_url', true);
            if ($ticket_author_url) {
                $output .= '<div id="wats_single_ticket_author_url"><label class="wats_label">' . __('Ticket author url : ', 'WATS') . '</label>' . '<a href="' . $ticket_author_url . '">' . $ticket_author_url . '</a></div>';
            }
        }
        $output .= '</div>';
        $output = apply_filters('wats_single_ticket_content_metas_output_filter', $output);
        $content = $output . $content;
        remove_filter('the_content', 'wats_single_ticket_content_filter');
    } else {
        wp_die(__('You are not allowed to view this ticket.', 'WATS'));
    }
    return $content;
}