Make WordPress Core


Ignore:
Timestamp:
05/19/2017 05:48:01 AM (8 years ago)
Author:
azaozz
Message:

Dashboard: Improve the handling of locations determined by geolocating the IP address and by entering a city name. Fix couple of edge cases, and some names.

Props iandunn coreymckrill.
Fixes #40702.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r40789 r40790  
    12351235    <script id="tmpl-community-events-no-upcoming-events" type="text/template">
    12361236        <li class="event-none">
    1237             <?php printf(
    1238                 /* translators: 1: the city the user searched for, 2: meetup organization documentation URL */
    1239                 __( 'There aren&#8217;t any events scheduled near %1$s at the moment. Would you like to <a href="%2$s">organize one</a>?' ),
    1240                 '{{ data.location.description }}',
    1241                 __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' )
    1242             ); ?>
     1237            <# if ( data.location.description ) { #>
     1238                <?php printf(
     1239                    /* translators: 1: the city the user searched for, 2: meetup organization documentation URL */
     1240                    __( 'There aren&#8217;t any events scheduled near %1$s at the moment. Would you like to <a href="%2$s">organize one</a>?' ),
     1241                    '{{ data.location.description }}',
     1242                    __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' )
     1243                ); ?>
     1244
     1245            <# } else { #>
     1246                <?php printf(
     1247                    /* translators: meetup organization documentation URL. */
     1248                    __( 'There aren&#8217;t any events scheduled near you at the moment. Would you like to <a href="%s">organize one</a>?' ),
     1249                    __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' )
     1250                ); ?>
     1251            <# } #>
    12431252        </li>
    12441253    </script>
    1245 
    12461254    <?php
    12471255}
Note: See TracChangeset for help on using the changeset viewer.