diff --git a/_admin.php b/_admin.php index 4c18b71..48dbd84 100644 --- a/_admin.php +++ b/_admin.php @@ -37,13 +37,13 @@ dcCore::app()->addBehaviors([ ]); }, 'adminSimpleMenuAddType' => function (ArrayObject $items) { - $items[basename(__DIR__)] = new ArrayObject([__('Comments list'), false]); + $items[basename(__DIR__)] = new ArrayObject([__('Comments list'), false]); }, 'adminSimpleMenuBeforeEdit' => function ($type, $select, &$item) { - if (basename(__DIR__) == $type) { + if (basename(__DIR__) == $type) { $item[0] = __('Comments list'); - $item[1] = __('Comments list'); + $item[1] = dcCore::app()->blog->settings->get(basename(__DIR__))->get('page_title') ?? __('Comments list'); $item[2] = dcCore::app()->admin->blog_url . dcCore::app()->url->getURLFor(basename(__DIR__)); } - } + }, ]); diff --git a/_widgets.php b/_widgets.php index 13d4827..28a2d94 100644 --- a/_widgets.php +++ b/_widgets.php @@ -25,12 +25,12 @@ class comListeWidget __('Comments list'), ['comListeWidget','publicWidget'], null, - __('Comments list') + __('Link to comments list public page') ) ->addTitle(__('Comments list')) ->setting( 'link_title', - __('Link title:'), + __('Link title: (leave empty to use page title'), __('Comments list') ) ->addHomeOnly() @@ -56,7 +56,7 @@ class comListeWidget sprintf( '

%s

', dcCore::app()->blog->url . dcCore::app()->url->getBase('comListe'), - $w->link_title ? html::escapeHTML($w->link_title) : __('Comments list') + $w->link_title ? html::escapeHTML($w->link_title) : (dcCore::app()->blog->settings->get(basename(__DIR__))->get('page_title') ?? __('Comments list')) ) ); }