Making WordPress.org


Ignore:
Timestamp:
02/26/2018 06:38:36 PM (6 years ago)
Author:
iandunn
Message:

CampTix Badge Generator: Apply coding standards.

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

    r4316 r6768  
    22
    33namespace CampTix\Badge_Generator\HTML;
     4use WP_Post;
     5
    46defined( 'WPINC' ) or die();
    57
    68/**
    7  * @global string   $template
    8  * @var    array    $attendees
    9  * @var    \WP_Post $attendee
     9 * @global string  $template
     10 * @var    array   $attendees
     11 * @var    WP_Post $attendee
    1012 */
    1113
     
    3032<body>
    3133    <?php
    32         if ( empty( $attendees ) ) :
    3334
    34             _e( 'No attendees were found. Please try again once tickets have been purchased.', 'wordcamporg' );
     35    if ( empty( $attendees ) ) :
    3536
    36         else :
     37        _e( 'No attendees were found. Please try again once tickets have been purchased.', 'wordcamporg' );
    3738
    38             foreach ( $attendees as $attendee ) :
    39                 ?>
     39    else :
    4040
    41                 <article class="attendee <?php echo esc_attr( $attendee->css_classes ); ?>">
    42                     <section class="badge badge-back">
    43                         <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
    44                     </section>
     41        foreach ( $attendees as $attendee ) : ?>
     42            <article class="attendee <?php echo esc_attr( $attendee->css_classes ); ?>">
     43                <section class="badge badge-back">
     44                    <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
     45                </section>
    4546
    46                     <section class="badge badge-front">
    47                         <div class="holepunch">&#9421;</div>
     47                <section class="badge badge-front">
     48                    <div class="holepunch">&#9421;</div>
    4849
    49                         <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
    50                     </section>
     50                    <?php require( __DIR__ . '/template-part-badge-contents.php' ); ?>
     51                </section>
    5152
    52                     <!-- These are arbitrary elements that you can use for any purpose -->
    53                     <div class="attendee-design-element-1"></div>
    54                     <div class="attendee-design-element-2"></div>
    55                     <div class="attendee-design-element-3"></div>
    56                     <div class="attendee-design-element-4"></div>
    57                     <div class="attendee-design-element-5"></div>
    58                 </article>
    59             <?php endforeach; ?>
    60         <?php endif; ?>
     53                <!-- These are arbitrary elements that you can use for any purpose -->
     54                <div class="attendee-design-element-1"></div>
     55                <div class="attendee-design-element-2"></div>
     56                <div class="attendee-design-element-3"></div>
     57                <div class="attendee-design-element-4"></div>
     58                <div class="attendee-design-element-5"></div>
     59            </article>
     60        <?php endforeach;
    6161
    62     <?php wp_footer(); ?>
     62    endif;
     63
     64    wp_footer();
     65
     66    ?>
    6367</body>
    6468</html>
Note: See TracChangeset for help on using the changeset viewer.