WordPress.org

Make WordPress Core

Ticket #50338: 50338-testing-only.diff

File 50338-testing-only.diff, 3.3 KB (added by samful, 16 months ago)

This will always show that there are no events in your area, for testing

  • js/_enqueues/wp/dashboard.js

    diff --git js/_enqueues/wp/dashboard.js js/_enqueues/wp/dashboard.js
    index bcdc783..e65a844 100644
    jQuery( function( $ ) { 
    496496                                 */
    497497                                $locationMessage.text( communityEventsData.l10n.attend_event_near_generic );
    498498
    499                                 if ( templateParams.events.length ) {
     499                                //TEMPORARILY COMMENTED OUT TO MAKE SURE THERE ARE NO CURRENT EVENTS
     500                                /*if ( templateParams.events.length ) {
    500501                                        template = wp.template( 'community-events-event-list' );
    501502                                        $results.html( template( templateParams ) );
    502                                 } else {
     503                                } else {*/
    503504                                        template = wp.template( 'community-events-no-upcoming-events' );
    504505                                        $results.html( template( templateParams ) );
    505                                 }
     506                                //}
    506507
    507508                                elementVisibility['#community-events-location-message'] = true;
    508509                                elementVisibility['.community-events-toggle-location']  = true;
    jQuery( function( $ ) { 
    512513                                template = wp.template( 'community-events-attend-event-near' );
    513514                                $locationMessage.html( template( templateParams ) );
    514515
    515                                 if ( templateParams.events.length ) {
     516                                //TEMPORARILY COMMENTED OUT TO MAKE SURE THERE ARE NO CURRENT EVENTS
     517                                /*if ( templateParams.events.length ) {
    516518                                        template = wp.template( 'community-events-event-list' );
    517519                                        $results.html( template( templateParams ) );
    518                                 } else {
     520                                } else {*/
    519521                                        template = wp.template( 'community-events-no-upcoming-events' );
    520522                                        $results.html( template( templateParams ) );
    521                                 }
     523                                //}
    522524
    523525                                if ( 'user' === initiatedBy ) {
    524526                                        wp.a11y.speak( communityEventsData.l10n.city_updated.replace( l10nPlaceholder, templateParams.location.description ), 'assertive' );
  • wp-admin/css/dashboard.css

    diff --git wp-admin/css/dashboard.css wp-admin/css/dashboard.css
    index e341c61..c9d5fba 100644
     
    348348        border-left: 4px solid #00a0d2;
    349349}
    350350
     351#dashboard-widgets .event-none a {
     352        text-decoration: underline;
     353}
     354
    351355.community-events-form label {
    352356        display: inline-block;
    353357        vertical-align: top;
  • wp-admin/includes/dashboard.php

    diff --git wp-admin/includes/dashboard.php wp-admin/includes/dashboard.php
    index 7435ec7..28859aa 100644
    function wp_print_community_events_templates() { 
    13911391                                <?php
    13921392                                printf(
    13931393                                        /* translators: 1: The city the user searched for, 2: Meetup organization documentation URL. */
    1394                                         __( 'There aren&#8217;t any events scheduled near %1$s at the moment. Would you like to <a href="%2$s">organize one</a>?' ),
     1394                                        __( 'There aren&#8217;t any events scheduled near %1$s at the moment. Would you like to <a href="%2$s">organize a WordPress event</a>?' ),
    13951395                                        '{{ data.location.description }}',
    13961396                                        __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' )
    13971397                                );
    function wp_print_community_events_templates() { 
    14011401                                <?php
    14021402                                printf(
    14031403                                        /* translators: %s: Meetup organization documentation URL. */
    1404                                         __( 'There aren&#8217;t any events scheduled near you at the moment. Would you like to <a href="%s">organize one</a>?' ),
     1404                                        __( 'There aren&#8217;t any events scheduled near you at the moment. Would you like to <a href="%s">organize a WordPress event</a>?' ),
    14051405                                        __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' )
    14061406                                );
    14071407                                ?>