Making WordPress.org


Ignore:
Timestamp:
12/18/2017 05:42:35 PM (7 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/content-none.php

    r6024 r6284  
    1616
    1717    <div class="page-content">
    18         <?php
    19         if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
     18        <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    2019
    21             <p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg-plugins' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
     20            <p>
     21                <?php
     22                /* translators: URL to post edit screen. */
     23                printf( wp_kses_post( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg-plugins' ) ), esc_url( admin_url( 'post-new.php' ) ) );
     24                ?>
     25            </p>
    2226
    2327        <?php elseif ( is_search() ) : ?>
     
    2933
    3034        elseif ( is_tax( 'plugin_section', 'favorites' ) ) :
    31           if ( is_user_logged_in() ) :
    32             $current_user = wp_get_current_user();
    33         ?>
    34        
     35            if ( is_user_logged_in() ) :
     36                $current_user = wp_get_current_user();
     37            ?>
     38
    3539            <p><?php esc_html_e( 'No favorites have been added, yet.', 'wporg-plugins' ); ?></p>
    36            
     40
    3741            <?php if ( get_query_var( 'favorites_user' ) === $current_user->user_nicename ) : ?>
    3842            <p><?php esc_html_e( 'Find a plugin and mark it as a favorite to see it here.', 'wporg-plugins' ); ?></p>
    39             <p><?php printf( __( 'Your favorite plugins are also shared on <a href="%s">your profile</a>.', 'wporg-plugins' ), esc_url( 'https://profiles.wordpress.org/' . $current_user->user_nicename ) ); ?></p>
     43            <p>
     44                <?php
     45                /* translators: Link to user profile. */
     46                printf( wp_kses_post( __( 'Your favorite plugins are also shared on <a href="%s">your profile</a>.', 'wporg-plugins' ) ), esc_url( 'https://profiles.wordpress.org/' . $current_user->user_nicename ) );
     47                ?>
     48            </p>
    4049            <?php endif; ?>
    4150
    42         <?php else : ?>
    43        
    44             <p><?php printf( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ), esc_url( wp_login_url( 'https://wordpress.org/plugins/browse/favorites/' ) ) ); ?></p>
     51            <?php else : ?>
     52
     53            <p>
     54                <?php
     55                /* translators: URL to login scren. */
     56                printf( wp_kses_post( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ) ), esc_url( wp_login_url( 'https://wordpress.org/plugins/browse/favorites/' ) ) );
     57                ?>
     58            </p>
    4559
    4660        <?php
    47           endif; // is_user_logged_in()
    48         else :
    49     ?>
     61            endif; // is_user_logged_in.
     62        else :
     63        ?>
    5064
    5165            <p><?php esc_html_e( 'It seems we can&#8217;t find what you&#8217;re looking for. Perhaps searching can help.', 'wporg-plugins' ); ?></p>
    52             <?php
    53                 get_search_form();
     66            <?php get_search_form(); ?>
    5467
    55         endif; ?>
     68        <?php endif; ?>
    5669    </div><!-- .page-content -->
    5770</section><!-- .no-results -->
Note: See TracChangeset for help on using the changeset viewer.