Apologies for the delay in my reply! I had to create a working code snippet that you can add using the Code Snippets plugin.
Here’s the code snippet.
add_filter(
'cn_output_date',
static function ( $html, $date, $entry, $atts ) {
if ( 'birthday' !== $date->type ) {
return $html;
}
$atts['date_format'] = 'F j';
$search = array( '%label%', '%date%', '%separator%' );
$replace = array();
$classNames = array(
'vevent',
'cn-date',
);
if ( $date->preferred ) {
$classNames[] = 'cn-preferred';
$classNames[] = 'cn-date-preferred';
}
$row = '<span class="' . Connections_Directory\Utility\_escape::classNames( $classNames ) . '">';
// Hidden elements are to maintain hCalendar spec compatibility.
$replace[] = empty( $date->name ) ? '' : '<span class="date-name">' . esc_html( $date->name ) . '</span>';
$replace[] = empty( $date->date ) ? '' : '<abbr class="dtstart" title="' . esc_attr( $date->date->format( 'Ymd' ) ) . '">' . date_i18n( $atts['date_format'], $date->date->getTimestamp(), false ) . '</abbr>
<span class="summary" style="display:none">' . esc_html( $date->name ) . ' - ' . $entry->getName( array( 'format' => $atts['name_format'] ) ) . '</span>
<span class="uid" style="display:none">' . esc_html( $date->date->format( 'YmdHis' ) ) . '</span>';
$replace[] = '<span class="cn-separator">' . esc_html( $atts['separator'] ) . '</span>';
$row .= str_ireplace(
$search,
$replace,
empty( $atts['format'] ) ? ( empty( $defaults['format'] ) ? '%label%%separator% %date%' : $defaults['format'] ) : $atts['format']
);
return $row .= '</span>';
},
10,
4
);
I hope this helps; please let me know.