use anonymous function

This commit is contained in:
Jean-Christian Denis 2022-12-01 10:39:06 +01:00
parent 09131d5593
commit 9669c42338
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -14,26 +14,7 @@ if (!defined('DC_RC_PATH')) {
return null;
}
dcCore::app()->addBehavior(
'publicEntryAfterContent',
['facPublic', 'publicEntryAfterContent']
);
/**
* @ingroup DC_PLUGIN_FAC
* @brief Linked feed to entries - public methods.
* @since 2.6
*/
class facPublic
{
/**
* Add feed after entry
*
* @param dcCore $core dcCore instance
* @param context $_ctx context instance
*/
public static function publicEntryAfterContent(dcCore $core, context $_ctx)
{
dcCore::app()->addBehavior('publicEntryAfterContent', function (dcCore $core, context $_ctx) {
dcCore::app()->blog->settings->addNamespace('fac');
# Not active or not a post
@ -235,5 +216,4 @@ class facPublic
}
}
echo '</dl></div>';
}
}
});