CoreFiles by mySites.guru
media.php29 lines, 693 bytes, from Joomla_4.2.3-Stable-Full_Package.zip
Raw History Compare with 4.2.2
md5
490879e1ff9e2e9d6429e2ed3daee976
sha1
ff05149761596594c892b9d48198b14f6bd7938c
sha256
7f87a919ac0b56d8a957968242afc68c08175121229145a051a364ae91eddb0c
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @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\Layout\LayoutHelper;

if (empty($field->value) || empty($field->value['imagefile']))
{
	return;
}

$class   = $fieldParams->get('image_class');
$options = [
	'src' => $field->value['imagefile'],
	'alt' => empty($field->value['alt_text']) && empty($field->value['alt_empty']) ? false : $field->value['alt_text'],
];

if ($class)
{
	$options['class'] = $class;
}

echo LayoutHelper::render('joomla.html.image', $options);

The same content is in 27 releases, Joomla 4.1.1-rc1 to 4.2.5-rc1. See them all, or every version of this file.