CoreFiles by mySites.guru
checkboxes.php30 lines, 643 bytes, from Joomla_3.9.6-Stable-Full_Package.zip
Raw History Compare with 3.9.5
md5
ba5cc846c7590ead67c43dc1748f3180
sha1
853e2e7aa08f5cbdb10119af28ec85e3f264ed56
sha256
1a15f41011f5d15e4db9ca2e215cafaa592556ffccf1ba49f9a32483228ab0d5
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @copyright   Copyright (C) 2005 - 2019 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 26 releases, Joomla 3.9.2-rc to 3.9.14. See them all, or every version of this file.