Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/smart-sl.../Nextend/Framewor.../Form/Element
File: Devices.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
namespace Nextend\Framework\Form\Element;
[3] Fix | Delete
[4] Fix | Delete
[5] Fix | Delete
use Nextend\Framework\Asset\Js\Js;
[6] Fix | Delete
use Nextend\Framework\View\Html;
[7] Fix | Delete
[8] Fix | Delete
class Devices extends AbstractFieldHidden {
[9] Fix | Delete
[10] Fix | Delete
private $values = array();
[11] Fix | Delete
[12] Fix | Delete
protected function fetchElement() {
[13] Fix | Delete
[14] Fix | Delete
$html = Html::tag('div', array(
[15] Fix | Delete
'id' => $this->fieldID,
[16] Fix | Delete
'class' => 'n2_field_radio_icon'
[17] Fix | Delete
), $this->generateOptions());
[18] Fix | Delete
[19] Fix | Delete
Js::addInline('new _N2.FormElementDevices("' . $this->fieldID . '", ' . json_encode($this->values) . ');');
[20] Fix | Delete
[21] Fix | Delete
return $html;
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
function generateOptions() {
[25] Fix | Delete
$options = array(
[26] Fix | Delete
'desktop-portrait' => 'ssi_16 ssi_16--desktopportrait',
[27] Fix | Delete
'tablet-portrait' => 'ssi_16 ssi_16--tabletportrait',
[28] Fix | Delete
'mobile-portrait' => 'ssi_16 ssi_16--mobileportrait'
[29] Fix | Delete
);
[30] Fix | Delete
[31] Fix | Delete
[32] Fix | Delete
$html = '';
[33] Fix | Delete
$i = 0;
[34] Fix | Delete
foreach ($options as $value => $class) {
[35] Fix | Delete
$this->values[] = $value;
[36] Fix | Delete
[37] Fix | Delete
$html .= Html::tag('div', array(
[38] Fix | Delete
'class' => 'n2_field_radio__option'
[39] Fix | Delete
), Html::tag('i', array(
[40] Fix | Delete
'class' => $class
[41] Fix | Delete
)) . Html::tag('input', array(
[42] Fix | Delete
'type' => 'hidden',
[43] Fix | Delete
'id' => $this->fieldID . '-' . $value
[44] Fix | Delete
)));
[45] Fix | Delete
$i++;
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
return $html;
[49] Fix | Delete
}
[50] Fix | Delete
}
[51] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function