CoreFiles by mySites.guru
radio.php32 lines, 625 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
a002cad1d6ed59e11bec71f10172e956
sha1
8afc29e35723c8f744e939c8089db8d9e802843c
sha256
772e4d35e5ce980ef9bd89acf298adb144c71503bcb67e336e79e8de5be0d841
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Radio
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

$value = $field->value;

if ($value == '')
{
	return;
}

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

foreach ($options as $optionValue => $optionText)
{
	if (in_array((string) $optionValue, $value))
	{
		$texts[] = Text::_($optionText);
	}
}

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

The same content is in 49 releases, Joomla 4.0.0-rc1 to 4.2.0-beta2. See them all, or every version of this file.