CoreFiles by mySites.guru
media.php39 lines, 677 bytes, from Joomla_3.8.2-Stable-Full_Package.zip
Raw History Compare with 3.8.1
md5
80f5c1defd7ff22eb227613561f50e5f
sha1
a17229fafb8ab57a3aa9ff090efbc8b203922f04
sha256
26724bb3eae1744e5bc735899d28880d524d4d940ed936e7d08898a29a3ad9da
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @copyright   Copyright (C) 2005 - 2017 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 21 releases, Joomla 3.7.3-beta1 to 4.0.0-alpha2. See them all, or every version of this file.