CoreFiles by mySites.guru
media.php39 lines, 677 bytes, from Joomla_3.9.2-Stable-Full_Package.zip
Raw History Compare with 3.9.1
md5
7b108df1bcf91178fab73165fce1216f
sha1
3a59b93c68e429b500a1f06958e976afa417ef1d
sha256
ed54856a4f983a13f3cb13fab0230b237b8911857d413fb403322c50cb67df53
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

if ($field->value == '')
{
	return;
}

$class = $fieldParams->get('image_class');

if ($class)
{
	$class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"';
}

$value  = (array) $field->value;
$buffer = '';

foreach ($value as $path)
{
	if (!$path)
	{
		continue;
	}

	$buffer .= sprintf('<img src="%s"%s>',
		htmlentities($path, ENT_COMPAT, 'UTF-8', true),
		$class
	);
}

echo $buffer;

The same content is in 32 releases, Joomla 3.9.2-rc to 4.0.0-alpha12. See them all, or every version of this file.