[$categories, $folders] = $this->item->determineCategoriesTerms($item, local_user());
- if (!empty($item['content-warning']) && $this->pConfig->get(local_user(), 'system', 'disable_cw', false)) {
- $title = ucfirst($item['content-warning']);
- } else {
+ if (!empty($item['title'])) {
$title = $item['title'];
+ } elseif (!empty($item['content-warning']) && $this->pConfig->get(local_user(), 'system', 'disable_cw', false)) {
+ $title = ucfirst($item['content-warning']);
}
$tmp_item = [
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item, local_user());
- if (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
- $title = ucfirst($item['content-warning']);
- } else {
+ if (!empty($item['title'])) {
$title = $item['title'];
+ } elseif (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
+ $title = ucfirst($item['content-warning']);
}
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {