Beispiel #1
0
<?php

namespace Wprsrv;

if (!$reservation && !empty($post)) {
    $reservation = $post;
}
if (!$reservation instanceof \Wprsrv\PostTypes\Objects\Reservation) {
    $reservation = new \Wprsrv\PostTypes\Objects\Reservation($reservation);
}
?>

<table summary="Reservation information">
    <tbody>
        <tr>
            <td>
                <h4><?php 
_ex('Submitted at', 'info metabox for reservation', 'wprsrv');
?>
</h4>
                <?php 
echo $reservation->post_date;
?>
            </td>
            <td>
                <h4><?php 
_ex('Status', 'info metabox for reservation, post status', 'wprsrv');
?>
</h4>
                <?php 
echo get_post_status_object($reservation->post_status)->label;
Beispiel #2
0
<?php

namespace Wprsrv;

if (!$reservation && !empty($post)) {
    $reservation = $post;
}
if (!$reservation instanceof \Wprsrv\PostTypes\Objects\Reservation) {
    $reservation = new \Wprsrv\PostTypes\Objects\Reservation($reservation);
}
$notes = $reservation->getNotes();
?>

<table summary="Reservation information">
    <tbody>
    <tr>
        <th scope="row">
            <h4><label for="new-note-field"><?php 
_e('Add a note', 'wprsrv');
?>
</label></h4>
        </th>
        <td>
            <textarea name="add-note-field" id="new-note-field"></textarea>
            <button id="new-note-button" class="button button-primary"><?php 
_e('Add', 'wprsrv');
?>
</button>
        </td>
    </tr>
    <?php