WordPress.org

Making WordPress.org


Ignore:
Timestamp:
12/18/2017 05:42:35 PM (3 years ago)
Author:
obenland
Message:

Plugins: Conform to WPCS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin.php

    r6027 r6284  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
    1112use WordPressdotorg\Plugin_Directory\Template;
    1213
    13 
    14 ?><article id="post-<?php the_ID(); ?>" <?php post_class( 'plugin-card' ); ?>>
     14$tested_up_to = (string) get_post_meta( $post->ID, 'tested', true );
     15?>
     16<article id="post-<?php the_ID(); ?>" <?php post_class( 'plugin-card' ); ?>>
    1517    <div class="entry-thumbnail">
    1618        <a href="<?php the_permalink(); ?>" rel="bookmark">
    17             <?php echo Template::get_plugin_icon( get_post(), 'html' ); ?>
     19            <?php
     20            // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     21            echo Template::get_plugin_icon( get_post(), 'html' );
     22            ?>
    1823        </a>
    1924    </div><div class="entry">
     
    2227        </header><!-- .entry-header -->
    2328
    24         <?php echo Template::get_star_rating(); ?>
     29        <?php echo wp_kses_post( Template::get_star_rating() ); ?>
    2530
    2631        <div class="entry-excerpt">
     
    3439        </span>
    3540        <span class="active-installs">
    36             <i class="dashicons dashicons-chart-area"></i> <?php printf( __( '%s active installations', 'wporg-plugins' ), Template::active_installs(false) ); ?>
     41            <i class="dashicons dashicons-chart-area"></i>
     42            <?php echo esc_html( Template::active_installs() ); ?>
    3743        </span>
    38         <span class="tested-with">
    39             <?php if ( $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ) ) { ?>
    40                 <i class="dashicons dashicons-wordpress-alt"></i> <?php printf( __( 'Tested with %s', 'wporg-plugins' ), $tested_up_to ); ?></span>
    41             <?php } ?>
    42         </span>
     44        <?php if ( $tested_up_to ) : ?>
     45            <span class="tested-with">
     46                <i class="dashicons dashicons-wordpress-alt"></i>
     47                <?php
     48                /* translators: WordPress version. */
     49                printf( esc_html__( 'Tested with %s', 'wporg-plugins' ), esc_html( $tested_up_to ) );
     50                ?>
     51            </span>
     52        <?php endif; ?>
    4353        <span class="last-updated">
    44             <i class="dashicons dashicons-calendar"></i> <?php
    45                 /* Translators: Plugin modified time. */
    46                 printf( __( 'Updated %s ago', 'wporg-plugins' ), human_time_diff( get_post_modified_time() ) ); ?>
     54            <i class="dashicons dashicons-calendar"></i>
     55            <?php
     56            /* Translators: Plugin modified time. */
     57            printf( esc_html__( 'Updated %s ago', 'wporg-plugins' ), esc_html( human_time_diff( get_post_modified_time() ) ) );
     58            ?>
    4759        </span>
    4860        </span>
Note: See TracChangeset for help on using the changeset viewer.