[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Plugin 5 * @subpackage Fields.URL 6 * 7 * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Language\Text; 14 use Joomla\CMS\Uri\Uri; 15 16 $value = $field->value; 17 18 if ($value == '') { 19 return; 20 } 21 22 $attributes = ''; 23 24 if (!Uri::isInternal($value)) { 25 $attributes = ' rel="nofollow noopener noreferrer" target="_blank"'; 26 $text = Text::_('JVISIT_WEBSITE'); 27 } else { 28 $text = Text::_('JVISIT_LINK'); 29 } 30 31 if ($fieldParams->get('show_url', 0)) { 32 $text = htmlspecialchars($value); 33 } 34 35 echo sprintf( 36 '<a href="%s"%s>%s</a>', 37 htmlspecialchars($value), 38 $attributes, 39 $text 40 );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |