CoreFiles by mySites.guru
radio.php31 lines, 636 bytes, from Joomla_4.2.9-Stable-Full_Package.zip
Raw History Compare with 4.2.8
md5
8dfba6978f0407a691d7f271208c32a5
sha1
ec123bfdf65a1561357764913c04134ce3f5daf2
sha256
9328375402cd0a471000f0013f04bd9174b9ccb769976a478bd952720735c145
<?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   = [];
$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 97 releases, Joomla 4.2.7-rc1 to 5.1.4. See them all, or every version of this file.