Making WordPress.org


Ignore:
Timestamp:
12/04/2016 07:28:28 PM (8 years ago)
Author:
jmdodd
Message:

Support Forums: Remove rating filter message from flexbox div.

Prevents squashing effect in new forums theme without breaking the current forums theme.

Once the forum theme is switched for all users, this can be altered to display the filter message and ratings in the plugin support forum's header and sidebar, respectively.

See #2196.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php

    r4231 r4476  
    212212        </div>
    213213    </div>
    214     <?php
    215     // If current listing is filtered by rating, display message indicating this,
    216     // along with an explicit link to return them to the unfiltered view.
    217     $filter = isset( $_GET['filter'] ) ? absint( $_GET['filter'] ) : 0;
    218     if ( $filter > 0 && $filter < 6 ) {
    219         echo '<div class="col-9 reviews-filtered-msg" style="font-style:italic;margin-top:24px;">';
    220         printf(
    221             /* translators: %d: number of stars */
    222             _n( 'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>.',
    223                 'You are currently viewing the reviews that provided a rating of <strong>%d stars</strong>.',
    224                 $filter,
    225                 'wporg-forums' ) . ' ',
    226             $filter
    227         );
    228         printf(
    229             /* translators: %s: plugin/theme reviews URL */
    230             __( '<a href="%s">Click here</a> to see all reviews.', 'wporg-forums' ),
    231             esc_url( sprintf( '//wordpress.org/support/%s/%s/reviews/', $this->compat, $this->slug ) )
    232         );
    233         echo "</div>\n";
    234     }
    235     ?>
    236214</div>
    237     <?php
     215        <?php
     216        // If current listing is filtered by rating, display message indicating this,
     217        // along with an explicit link to return them to the unfiltered view.
     218        $filter = isset( $_GET['filter'] ) ? absint( $_GET['filter'] ) : 0;
     219        if ( $filter > 0 && $filter < 6 ) {
     220            echo '<p class="reviews-filtered-msg" style="margin-top:12px;font-size:0.8rem;">';
     221            printf(
     222                /* translators: %d: number of stars */
     223                _n( 'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>.',
     224                    'You are currently viewing the reviews that provided a rating of <strong>%d stars</strong>.',
     225                    $filter,
     226                        'wporg-forums' ) . ' ',
     227                $filter
     228            );
     229            printf(
     230                /* translators: %s: plugin/theme reviews URL */
     231                __( '<a href="%s">Click here</a> to see all reviews.', 'wporg-forums' ),
     232                esc_url( sprintf( '//wordpress.org/support/%s/%s/reviews/', $this->compat, $this->slug ) )
     233            );
     234            echo "</p>\n";
     235        }
    238236    }
    239237
Note: See TracChangeset for help on using the changeset viewer.