Making WordPress.org

Changeset 6627


Ignore:
Timestamp:
02/13/2018 08:14:11 PM (7 years ago)
Author:
iandunn
Message:

Multi Event Sponsors: Hide old back-compat regions when they're not assigned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/multi-event-sponsors/views/metabox-regional-sponsorships.php

    r623 r6627  
    1313    <tbody>
    1414        <?php foreach ( $regions as $region ) : ?>
    15             <tr>
     15            <?php
     16                // Some old regions are deprecated, but must remain in the system for back-compat. This prevents them from cluttering the UI when they're not needed.
     17                $row_class = false !== stripos( $region->name, 'deprecated' ) && 'null' === $regional_sponsorships[ $region->term_id ] ? 'hidden' : '';
     18            ?>
     19
     20            <tr class="<?php echo esc_attr( $row_class ); ?>">
    1621                <td>
    1722                    <label for="mes_regional_sponsorships-<?php echo esc_attr( $region->term_id ); ?>">
Note: See TracChangeset for help on using the changeset viewer.