ID)) return;
$notes = User_Notes_Repo::get_for_user($wp_user->ID);
$can_delete = user_notes_current_user_can_delete($wp_user->ID);
?>
updated_at && $note->updated_at !== $note->created_at);
?>
body)); ?>
body); ?>
'
. ''
. esc_html__('Add Note', 'user-notes') . '';
}
$starred = User_Notes_Repo::count_starred_for_user($user_id);
// Latest note as a hover tooltip — detail without cluttering the cell.
$latest = User_Notes_Repo::latest_for_user($user_id);
$excerpt = '';
if ($latest) {
$plain = trim(preg_replace('/\s+/', ' ', wp_strip_all_tags($latest->body)));
$excerpt = function_exists('mb_substr') ? mb_substr($plain, 0, 120) : substr($plain, 0, 120);
if (mb_strlen($plain) > 120) $excerpt .= '…';
}
$html = '';
/* translators: %s: number of notes */
$count_label = sprintf(_n('%s note', '%s notes', $count, 'user-notes'), number_format_i18n($count));
$html .= ''
. ''
. '' . esc_html(number_format_i18n($count)) . ''
. '';
if ($starred > 0) {
/* translators: %s: number of starred notes */
$star_label = sprintf(_n('%s starred', '%s starred', $starred, 'user-notes'), number_format_i18n($starred));
$html .= ''
. ''
. '' . esc_html(number_format_i18n($starred)) . ''
. '';
}
$html .= '';
return $html;
}