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:
Peter Wilson 2023-09-26 03:54:20 +00:00
parent 7fd4a45fca
commit 109f531fbf
6 changed files with 20 additions and 3 deletions

View File

@ -559,6 +559,10 @@
display: block;
}
.community-events .ce-separator::before {
content: "\2022";
}
.event-icon {
height: 18px;
padding-left: 10px;

File diff suppressed because one or more lines are too long

View File

@ -558,6 +558,10 @@
display: block;
}
.community-events .ce-separator::before {
content: "\2022";
}
.event-icon {
height: 18px;
padding-right: 10px;

File diff suppressed because one or more lines are too long

View File

@ -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>

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56696';
$wp_version = '6.4-alpha-56697';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.