Making WordPress.org

Changeset 6768


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

CampTix Badge Generator: Apply coding standards.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/common.php

    r4576 r6768  
    6666 * Get the attendees
    6767 *
    68  * @param string|array $ticket_ids        Reduce fetched attendees by the ticket they purchased. The string 'all'
    69  *                                        will result in all attendees being fetched, regardless of their
    70  *                                        ticket. An array of ticket IDs will result in only the attendees for
    71  *                                        those tickets being fetched.
    72  * @param string $registered_after        Reduce fetched attendees by their registration date. Any value parseable
    73  *                                        by strtotime().
     68 * @param string|array $ticket_ids       Reduce fetched attendees by the ticket they purchased. The string 'all'
     69 *                                       will result in all attendees being fetched, regardless of their
     70 *                                       ticket. An array of ticket IDs will result in only the attendees for
     71 *                                       those tickets being fetched.
     72 * @param string       $registered_after Reduce fetched attendees by their registration date. Any value parseable
     73 *                                       by strtotime().
    7474 *
    7575 * @todo Maybe optimize this by looking at post_date rather than tix_timestamp
     
    143143                    'size'    => 1024,
    144144                    'default' => 'blank',
    145                     'rating'  => 'g'
     145                    'rating'  => 'g',
    146146                )
    147147            );
     
    188188    $classes = array(
    189189        'attendee-' . $attendee->post_name,
    190         'ticket-'   . $attendee->ticket
     190        'ticket-'   . $attendee->ticket,
    191191    );
    192192
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/html-badges.php

    r6014 r6768  
    223223    }
    224224
    225     foreach( $wp_styles->queue as $stylesheet ) {
     225    foreach ( $wp_styles->queue as $stylesheet ) {
    226226        wp_dequeue_style( $stylesheet );
    227227    }
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/indesign-badges.php

    r6600 r6768  
    3333        array(
    3434            'ticket_ids'       => 'all',
    35             'registered_after' => ''
     35            'registered_after' => '',
    3636        ),
    3737        $options
     
    256256 */
    257257function get_header_row( $admin_flags, $questions ) {
    258     $header_row   = array( 'First Name', 'Last Name', 'Email Address', 'Ticket', 'Coupon', 'Twitter', );
     258    $header_row   = array( 'First Name', 'Last Name', 'Email Address', 'Ticket', 'Coupon', 'Twitter' );
    259259    $header_row   = array_merge( $header_row, array_values( $admin_flags ) );
    260260    $header_row   = array_merge( $header_row, wp_list_pluck( $questions, 'post_title' ) );
     
    433433        array(
    434434            'add_path'        => $zip_local_folder . '/gravatars/',
    435             'remove_all_path' => true
     435            'remove_all_path' => true,
    436436        )
    437437    );
  • 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>
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/html-badges/template-part-badge-contents.php

    r4315 r6768  
    22
    33namespace CampTix\Badge_Generator\HTML;
     4use WP_Post;
     5
    46defined( 'WPINC' ) or die();
    57
    68/**
    7  * @var \WP_Post $attendee
    8  * @var array    $allowed_html
     9 * @var WP_Post $attendee
     10 * @var array   $allowed_html
    911 */
    1012
     
    2527<figure>
    2628    <img
    27         class="attendee-avatar"
     29        class="attendee-avatar"
    2830        src="<?php echo esc_url( $attendee->avatar_url ); ?>"
    2931        alt="<?php echo esc_attr( strip_tags( $attendee->formatted_name ) ); ?>"
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/views/indesign-badges/page-indesign-badges.php

    r5819 r6768  
    2424    <?php printf(
    2525        __(
    26             'Full instructions are <a href="%s">available in the WordCamp Organizer Handbook</a>. If you\'d prefer an easier way, <a href="%s">the HTML/CSS method</a> is much more automated at this time.',
     26            'Full instructions are <a href="%1$s">available in the WordCamp Organizer Handbook</a>. If you\'d prefer an easier way, <a href="%2$s">the HTML/CSS method</a> is much more automated at this time.',
    2727            'wordcamporg'
    2828        ),
Note: See TracChangeset for help on using the changeset viewer.