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: Breakpoint.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\Form\AbstractField;
[7] Fix | Delete
use Nextend\Framework\Form\ContainerInterface;
[8] Fix | Delete
use Nextend\Framework\Form\TraitFieldset;
[9] Fix | Delete
use Nextend\Framework\View\Html;
[10] Fix | Delete
[11] Fix | Delete
class Breakpoint extends AbstractField implements ContainerInterface {
[12] Fix | Delete
[13] Fix | Delete
use TraitFieldset;
[14] Fix | Delete
[15] Fix | Delete
protected $fields = array();
[16] Fix | Delete
[17] Fix | Delete
protected $enables = false;
[18] Fix | Delete
[19] Fix | Delete
protected $global = false;
[20] Fix | Delete
[21] Fix | Delete
public function __construct($insertAt, $name = '', $fields = array(), $enables = false, $global = false) {
[22] Fix | Delete
[23] Fix | Delete
$this->fields = $fields;
[24] Fix | Delete
$this->enables = $enables;
[25] Fix | Delete
$this->global = $global;
[26] Fix | Delete
[27] Fix | Delete
parent::__construct($insertAt, $name, false, '');
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
public function getLabelClass() {
[31] Fix | Delete
[32] Fix | Delete
return parent::getLabelClass() . ' n2_field--raw';
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
protected function fetchElement() {
[36] Fix | Delete
[37] Fix | Delete
$orientation = new Tab($this, $this->name . '-orientation', n2_('Orientation'), 'portrait', array(
[38] Fix | Delete
'options' => array(
[39] Fix | Delete
'portrait' => n2_('Portrait'),
[40] Fix | Delete
'landscape' => n2_('Landscape')
[41] Fix | Delete
)
[42] Fix | Delete
));
[43] Fix | Delete
$devices = array(
[44] Fix | Delete
array(
[45] Fix | Delete
'id' => 'mobileportrait',
[46] Fix | Delete
'icon' => 'ssi_16 ssi_16--mobileportrait',
[47] Fix | Delete
'label' => n2_('Mobile')
[48] Fix | Delete
),
[49] Fix | Delete
array(
[50] Fix | Delete
'id' => 'tabletportrait',
[51] Fix | Delete
'icon' => 'ssi_16 ssi_16--tabletportrait',
[52] Fix | Delete
'label' => n2_('Tablet')
[53] Fix | Delete
),
[54] Fix | Delete
array(
[55] Fix | Delete
'id' => 'desktopportrait',
[56] Fix | Delete
'icon' => 'ssi_16 ssi_16--desktopportrait',
[57] Fix | Delete
'label' => n2_('Desktop')
[58] Fix | Delete
)
[59] Fix | Delete
);
[60] Fix | Delete
[61] Fix | Delete
[62] Fix | Delete
$preHtml = '';
[63] Fix | Delete
$element = $this->first;
[64] Fix | Delete
while ($element) {
[65] Fix | Delete
$preHtml .= $this->decorateElement($element);
[66] Fix | Delete
[67] Fix | Delete
$element = $element->getNext();
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
$html = '';
[71] Fix | Delete
[72] Fix | Delete
for ($i = 0; $i < count($devices); $i++) {
[73] Fix | Delete
$html .= Html::tag('div', array(
[74] Fix | Delete
'data-id' => $devices[$i]['id'],
[75] Fix | Delete
'class' => 'n2_field_breakpoint__device'
[76] Fix | Delete
), '<div class="n2_field_breakpoint__device_enable" data-n2tip="' . $devices[$i]['label'] . '"><i class="' . $devices[$i]['icon'] . '"></i></div>');
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
$options = array(
[80] Fix | Delete
'orientation' => $orientation->getID(),
[81] Fix | Delete
'fields' => $this->fields,
[82] Fix | Delete
'enables' => $this->enables,
[83] Fix | Delete
'global' => $this->global
[84] Fix | Delete
);
[85] Fix | Delete
[86] Fix | Delete
Js::addInline('new _N2.FormElementBreakpoint("' . $this->fieldID . '", ' . json_encode($options) . ');');
[87] Fix | Delete
[88] Fix | Delete
[89] Fix | Delete
return '<div id="' . $this->getID() . '" class="n2_field_breakpoint"><div class="n2_field_breakpoint__pre_fields">' . $preHtml . '</div><div class="n2_field_breakpoint__breakpoint_container" data-orientation="portrait">' . $html . '</div></div>';
[90] Fix | Delete
}
[91] Fix | Delete
[92] Fix | Delete
public function decorateElement($element) {
[93] Fix | Delete
return $this->parent->decorateElement($element);
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
}
[97] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function