Administration: Add event type to Events and News widget.
Add the event type (WordCamp, Meetup, etc) to the nearby events listing within the Dashboard's Events and News widget. Props renyot, audrasjb, ankit-k-gupta, oglekler, devmuhib, dhruvishah2203, JeffPaul, anveshika, sarahwilliams889, ajakaroth. Fixes #58947. Built from https://develop.svn.wordpress.org/trunk@56697 git-svn-id: http://core.svn.wordpress.org/trunk@56209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1454,6 +1454,15 @@ function wp_print_community_events_templates() {
|
||||
<div class="dashicons event-icon" aria-hidden="true"></div>
|
||||
<div class="event-info-inner">
|
||||
<a class="event-title" href="{{ event.url }}">{{ event.title }}</a>
|
||||
<# if ( event.type ) {
|
||||
const titleCaseEventType = event.type.replace(
|
||||
/\w\S*/g,
|
||||
function ( type ) { return type.charAt(0).toUpperCase() + type.substr(1).toLowerCase(); }
|
||||
);
|
||||
#>
|
||||
{{ 'wordcamp' === event.type ? 'WordCamp' : titleCaseEventType }}
|
||||
<span class="ce-separator"></span>
|
||||
<# } #>
|
||||
<span class="event-city">{{ event.location.location }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user