Making WordPress.org

Changeset 2794


Ignore:
Timestamp:
03/24/2016 10:13:03 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Handle case where no log entries exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/views/common/metabox-log.php

    r2785 r2794  
    1212
    1313    <tbody>
    14         <?php foreach ( $entries as $entry ) : ?>
     14        <?php if ( $entries ) : ?>
     15
     16            <?php foreach ( $entries as $entry ) : ?>
     17                <tr>
     18                    <th><?php echo esc_html( date( 'Y-m-d h:ia', $entry['timestamp'] ) );          ?></th>
     19                    <th><?php echo esc_html( ucwords( str_replace( '_', ' ', $entry['type'] ) ) ); ?></th>
     20                    <th><?php echo esc_html( $entry['user_display_name'] );                        ?></th>
     21                    <th><?php echo esc_html( $entry['message'] );                                  ?></th>
     22                </tr>
     23            <?php endforeach; ?>
     24
     25        <?php else : ?>
     26
    1527            <tr>
    16                 <th><?php echo esc_html( date( 'Y-m-d h:ia', $entry['timestamp'] ) ); ?></th>
    17                 <th><?php echo esc_html( ucwords( str_replace( '_', ' ', $entry['type'] ) ) ); ?></th>
    18                 <th><?php echo esc_html( $entry['user_display_name'] ); ?></th>
    19                 <th><?php echo esc_html( $entry['message'] ); ?></th>
     28                <td colspan="4">
     29                    There aren't any log entries yet.
     30                </td>
    2031            </tr>
    21         <?php endforeach; ?>
     32
     33        <?php endif; ?>
    2234    </tbody>
    2335</table>
Note: See TracChangeset for help on using the changeset viewer.