CoreFiles by mySites.guru
render.php46 lines, 1,240 bytes, from Joomla_4.2.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta2
md5
663f96f637d248382bb64b6f6ecd19a6
sha1
fa09c55f6cbf01d3e9bb127e0d9f00d1ea5ec3d0
sha256
9ac26e8e1ec63ff9679f6931d9f98f322cd9ffe998243f0b59c40aefe1d5171a
<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_contact
 *
 * @copyright   (C) 2016 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\Language\Text;

if (!array_key_exists('field', $displayData)) {
    return;
}

$field     = $displayData['field'];
$label     = Text::_($field->label);
$value     = $field->value;
$class     = $field->params->get('render_class');
$showLabel = $field->params->get('showlabel');
$labelClass = $field->params->get('label_render_class');

if ($field->context == 'com_contact.mail') {
    // Prepare the value for the contact form mail
    $value = html_entity_decode($value);

    echo ($showLabel ? $label . ': ' : '') . $value . "\r\n";
    return;
}

if (!strlen($value)) {
    return;
}

?>
<dt class="contact-field-entry <?php echo $class; ?>">
    <?php if ($showLabel == 1) : ?>
        <span class="field-label <?php echo $labelClass; ?>"><?php echo htmlentities($label, ENT_QUOTES | ENT_IGNORE, 'UTF-8'); ?>: </span>
    <?php endif; ?>
</dt>
<dd class="contact-field-entry <?php echo $class; ?>">
    <span class="field-value"><?php echo $value; ?></span>
</dd>

The same content is in 20 releases, Joomla 4.2.0-beta3 to 4.3.0-alpha3. See them all, or every version of this file.