CoreFiles by mySites.guru
media.php39 lines, 664 bytes, from Joomla_3.10.4-Stable-Full_Package.zip
Raw History Compare with 3.10.3
md5
0ada4e0480a79b57956e18fd6a74a985
sha1
f38a5e78e7d15bacf575d537b5b161cec98e8a29
sha256
958ee92bb9b0faf3ef49b34264050ab521c3ce179e24460f3e76fb5d1bfad76c
<?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;

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 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.