Making WordPress.org


Ignore:
Timestamp:
12/19/2017 04:22:37 PM (7 years ago)
Author:
obenland
Message:

PLugins: Clean up formatting with phpcbf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-ratings.php

    r5457 r6287  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\Widgets;
     3
    34use WordPressdotorg\Plugin_Directory\Template;
    45
     
    3637        echo $args['before_widget'];
    3738        echo $args['before_title'] . $title . $args['after_title'];
     39
     40        if ( $rating ) :
    3841        ?>
    39 
    40         <?php if ( $rating ) : ?>
    4142            <a class="reviews-link" href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name . '/reviews/' ); ?>"><?php _ex( 'See all', 'reviews', 'wporg-plugins' ); ?></a>
    4243
     
    4647
    4748            <ul class="ratings-list">
    48                 <?php foreach ( range( 5, 1 ) as $stars ) :
     49                <?php
     50                foreach ( range( 5, 1 ) as $stars ) :
    4951                    $rating_bar_width = $num_ratings ? 100 * $ratings[ $stars ] / $num_ratings : 0;
    5052                    ?>
     
    6769            </div>
    6870
    69         <?php endif; // $rating
     71        <?php endif; // $rating ?>
    7072
    71         if ( is_user_logged_in() ) : ?>
     73        <?php if ( is_user_logged_in() ) : ?>
    7274            <div class="user-rating">
    7375                <a class="button button-secondary" href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name . '/reviews/#new-post' ); ?>"><?php _e( 'Add my review', 'wporg-plugins' ); ?></a>
    7476            </div>
    75             <?php
     77        <?php
    7678        endif;
    7779
Note: See TracChangeset for help on using the changeset viewer.