mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-11 08:04:32 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56697 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -558,6 +558,10 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.community-events .ce-separator::before {
|
||||
content: "\2022";
|
||||
}
|
||||
|
||||
.event-icon {
|
||||
height: 18px;
|
||||
padding-right: 10px;
|
||||
|
||||
@@ -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