CoreFiles by mySites.guru
default_titles.php41 lines, 1,425 bytes, from Joomla_6.1.3-Stable-Full_Package.zip
Raw History Compare with 6.1.2
md5
dc94f185227abc6cb2b45855f2dfb44d
sha1
f4cbd0f31e321e67a754038056dcc47e712cf95e
sha256
f242995688eef8645b393fdfae02f14620405c1706cb614ae45e318e5c8cdc66
<?php

/**
 * @package     Joomla.Site
 * @subpackage  mod_articles
 *
 * @copyright   (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;

$currentDate = Factory::getDate()->format('Y-m-d H:i:s');

?>
<ul class="mod-articles mod-list">
    <?php foreach ($items as $item) : ?>
        <li itemscope itemtype="https://schema.org/Article">
            <a <?php echo $item->active ? 'class="' . $item->active . '" ' : ''; ?>href="<?php echo $item->link; ?>" itemprop="url">
                <span itemprop="name">
                    <?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
                </span>
            </a>

            <?php if ($item->state == 0) : ?>
                <span class="badge bg-warning"><?php echo Text::_('JUNPUBLISHED'); ?></span>
            <?php endif; ?>

            <?php if ($item->publish_up > $currentDate) : ?>
                <span class="badge bg-warning"><?php echo Text::_('JNOTPUBLISHEDYET'); ?></span>
            <?php endif; ?>

            <?php if ($item->publish_down !== null && $item->publish_down < $currentDate) : ?>
                <span class="badge bg-warning"><?php echo Text::_('JEXPIRED'); ?></span>
            <?php endif; ?>
        </li>
    <?php endforeach; ?>
</ul>

The same content is in 25 releases, Joomla 6.1.0-rc1 to 6.2.1-rc1. See them all, or every version of this file.