Making WordPress.org


Ignore:
Timestamp:
11/01/2016 08:58:38 PM (7 years ago)
Author:
iandunn
Message:

CampTix Badge Generator: Acesss post meta through WP_Post's magic getter

This is much cleaner and more readable than manually calling get_post_meta().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-badges.php

    r3153 r4315  
    3030        else :
    3131
    32             foreach ( $attendees as $attendee_id ) :
    33                 $attendee_data = get_attendee_data( $attendee_id );
    34                
     32            foreach ( $attendees as $attendee ) :
    3533                ?>
    3634
    37                 <article class="attendee <?php echo esc_attr( $attendee_data['css_classes'] ); ?>">
     35                <article class="attendee <?php echo esc_attr( $attendee->css_classes ); ?>">
    3836                    <section class="badge badge-back">
    3937                        <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
Note: See TracChangeset for help on using the changeset viewer.