CoreFiles by mySites.guru
media.php39 lines, 703 bytes, from Joomla_3.10.0-rc2-Release_Candidate-Full_Package.zip
Raw History Compare with 3.10.0-rc1
md5
c2f998953fb5ea112e1808bb2ecabcc5
sha1
c740ef3f603237f441ebbb460b8ed1366d975beb
sha256
fb4ec2b76e2db99c5a265c6e345f977d2e8920f68d4effd42be62dfe50c0cf5d
<?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 8 releases, Joomla 3.10.0-alpha4 to 3.10.0-rc2. See them all, or every version of this file.