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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50133 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ian Dunn 2021-02-02 00:41:55 +00:00
parent 553d618e4a
commit 0b93a26521

View File

@ -1398,6 +1398,19 @@ function wp_print_community_events_templates() {
</div>
</li>
<# } ) #>
<# if ( data.events.length <= 2 ) { #>
<li class="event-none">
<?php
printf(
/* translators: 1: Localized meetup organization documentation URL. */
__( 'Want more events? <a href="%1$s">Help organize the next one</a>!' ),
__( 'https://make.wordpress.org/community/organize-event-landing-page/' )
);
?>
</li>
<# } #>
</script>
<script id="tmpl-community-events-no-upcoming-events" type="text/template">