Make WordPress Core

Changeset 50133


Ignore:
Timestamp:
02/02/2021 12:41:55 AM (4 years ago)
Author:
iandunn
Message:

Community Events: Show organizer CTA when less than 3 events.

When no events are available in the Events Widget, people have always been shown a message encouraging them to help organize one (see tmpl-community-events-no-upcoming-events). Now that it's common for online WordCamps and Learn discussion groups to be pinned to the Events API, it's rare that there are no events in the widget, even if there are no _local_ events. Because of that, users are rarely encouraged to join their local community and help organize.

This commit adds an additional call-to-action message, which is shown when there are only 1 or 2 events available.

Props anyssa, sippis, AmethystAnswers.
Fixes #51664.

File:
1 edited

Legend:

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

    r50058 r50133  
    13991399            </li>
    14001400        <# } ) #>
     1401
     1402        <# if ( data.events.length <= 2 ) { #>
     1403            <li class="event-none">
     1404                <?php
     1405                printf(
     1406                    /* translators: 1: Localized meetup organization documentation URL. */
     1407                    __( 'Want more events? <a href="%1$s">Help organize the next one</a>!' ),
     1408                    __( 'https://make.wordpress.org/community/organize-event-landing-page/' )
     1409                );
     1410                ?>
     1411            </li>
     1412        <# } #>
     1413
    14011414    </script>
    14021415
Note: See TracChangeset for help on using the changeset viewer.