CoreFiles by mySites.guru
checkboxes.php30 lines, 643 bytes, from Joomla_3.8.13-Stable-Full_Package.zip
Raw History Compare with 3.8.12
md5
9979481a66245312229f6c5f16809eb3
sha1
a2e15e6d8d20e041d8cc742a65eaa7e1b43e1181
sha256
9396e968894c2ff621884530bd1638a46697318b689628e8b632057a2700de86
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @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;

$fieldValue = $field->value;

if ($fieldValue === '' || $fieldValue === null)
{
	return;
}

$fieldValue = (array) $fieldValue;
$texts      = array();
$options    = $this->getOptionsFromField($field);

foreach ($options as $value => $name)
{
	if (in_array((string) $value, $fieldValue))
	{
		$texts[] = JText::_($name);
	}
}

echo htmlentities(implode(', ', $texts));

The same content is in 29 releases, Joomla 3.8.4-rc to 3.9.1. See them all, or every version of this file.