WordPress.org

Making WordPress.org

Changeset 3462


Ignore:
Timestamp:
06/19/2016 11:19:04 AM (5 years ago)
Author:
samuelsidler
Message:

Plugin Directory Theme: Add and update text for "no favorite" cases.

Props obenland.
See #1719.

File:
1 edited

Legend:

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

    r3407 r3462  
    2828                get_search_form();
    2929
    30         elseif ( is_tax( 'plugin_section', 'favorites' ) ) : ?>
    31 
    32             <p><?php esc_html_e( 'Seems like you do not like plugins. Boo!', 'wporg-plugins' ); ?></p>
     30        elseif ( is_tax( 'plugin_section', 'favorites' ) ) :
     31          if ( is_user_logged_in() ) :
     32            $current_user = wp_get_current_user();
     33        ?>
     34       
     35            <p><?php esc_html_e( 'No favorites have been added, yet.', 'wporg-plugins' ); ?></p>
     36           
     37            <?php if ( get_query_var( 'favorites_user' ) === $current_user->user_nicename ) : ?>
     38            <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://profile.wordpress.org/' . $current_user->user_nicename ) ); ?></p>
     40            <?php endif; ?>
    3341
    3442        <?php else : ?>
     43       
     44            <p><?php printf( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ), esc_url( 'https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fplugins%2Fbrowse%2Ffavorites%2F' ) ); ?></p>
    3545
    36             <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'wporg-plugins' ); ?></p>
     46        <?php
     47          endif; // is_user_logged_in()
     48        else :
     49    ?>
     50
     51            <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>
    3752            <?php
    3853                get_search_form();
Note: See TracChangeset for help on using the changeset viewer.