CoreFiles by mySites.guru
media.php39 lines, 677 bytes, from Joomla_3.8.13-Stable-Full_Package.zip
Raw History Compare with 3.8.12
md5
ca6841e02753825e38657f08e66023c7
sha1
6970766fca08dd87304caf99367301708bc00eb3
sha256
f09af6addfeeb2356ce0b59decb4475479bec86c72e948b1f875ba38cf7661ad
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @copyright   Copyright (C) 2005 - 2018 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.8.4-rc to 4.0.0-alpha6. See them all, or every version of this file.