CoreFiles by mySites.guru
radio.php31 lines, 641 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
7c683c5d181c79d76bb2237853a679c4
sha1
668b600229411dce81239b3d7d81aca9022d66a1
sha256
f315b079f9b3dc9ab53094f6d093ea1842ee04a31431aea327b1a2619b4e524f
<?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 16 releases, Joomla 4.2.0-beta3 to 4.3.0-alpha2. See them all, or every version of this file.