Add entry_before_display hook

See https://github.com/FreshRSS/FreshRSS/issues/252
This commit is contained in:
Marien Fressinaud committed 2014-12-07 14:31:50 +01:00
1 parent 08546af75f
commit 5932c3427b
3 files changed
+16 -6

No files matched your search

+5
View File
@@ -35,6 +35,11 @@ if (!empty($this->entries)) {
<a href="<?php echo Minz_Url::display(Minz_Request::currentRequest()); ?>"><?php echo _t('new_article'); ?></a>
</div><?php
foreach ($this->entries as $item) {
$item = Minz_ExtensionManager::callHook('entry_before_display', $item);
if (is_null($item)) {
continue;
}
if ($display_today && $item->isDay(FreshRSS_Days::TODAY, $today)) {
?><div class="day" id="day_today"><?php
echo _t('today');
+7 -4
View File
@@ -6,10 +6,13 @@ if (!empty($this->entries)) {
$content_width = FreshRSS_Context::$conf->content_width;
?>
<div id="stream" class="reader">
<?php foreach ($this->entries as $item) { ?>
<div class="flux<?php echo !$item->isRead() ? ' not_read' : ''; ?><?php echo $item->isFavorite() ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id(); ?>">
<div id="stream" class="reader"><?php
foreach ($this->entries as $item) {
$item = Minz_ExtensionManager::callHook('entry_before_display', $item);
if (is_null($item)) {
continue;
}
?><div class="flux<?php echo !$item->isRead() ? ' not_read' : ''; ?><?php echo $item->isFavorite() ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id(); ?>">
<div class="flux_content">
<div class="content <?php echo $content_width; ?>">
<?php