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.../Font
File: ModelFont.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Nextend\Framework\Font;
[2] Fix | Delete
[3] Fix | Delete
use Nextend\Framework\Form\Container\ContainerTable;
[4] Fix | Delete
use Nextend\Framework\Form\Element\Button;
[5] Fix | Delete
use Nextend\Framework\Form\Element\Decoration;
[6] Fix | Delete
use Nextend\Framework\Form\Element\MixedField;
[7] Fix | Delete
use Nextend\Framework\Form\Element\Radio\TextAlign;
[8] Fix | Delete
use Nextend\Framework\Form\Element\Select;
[9] Fix | Delete
use Nextend\Framework\Form\Element\Select\FontWeight;
[10] Fix | Delete
use Nextend\Framework\Form\Element\Tab;
[11] Fix | Delete
use Nextend\Framework\Form\Element\Text\Color;
[12] Fix | Delete
use Nextend\Framework\Form\Element\Text\Family;
[13] Fix | Delete
use Nextend\Framework\Form\Element\Text\TextAutoComplete;
[14] Fix | Delete
use Nextend\Framework\Form\Element\Textarea;
[15] Fix | Delete
use Nextend\Framework\Form\Form;
[16] Fix | Delete
use Nextend\Framework\Visual\ModelVisual;
[17] Fix | Delete
[18] Fix | Delete
class ModelFont extends ModelVisual {
[19] Fix | Delete
[20] Fix | Delete
protected $type = 'font';
[21] Fix | Delete
[22] Fix | Delete
public function renderForm() {
[23] Fix | Delete
[24] Fix | Delete
$form = new Form($this, 'n2-font-editor');
[25] Fix | Delete
[26] Fix | Delete
$table = new ContainerTable($form->getContainer(), 'font', n2_('Font settings'));
[27] Fix | Delete
[28] Fix | Delete
$table->setFieldsetPositionEnd();
[29] Fix | Delete
[30] Fix | Delete
new Button($table->getFieldsetLabel(), 'font-clear-tab', false, n2_('Clear tab'));
[31] Fix | Delete
[32] Fix | Delete
new Tab($table->getFieldsetLabel(), 'font-state');
[33] Fix | Delete
[34] Fix | Delete
$row1 = $table->createRow('font-row-1');
[35] Fix | Delete
new Family($row1, 'family', n2_('Family'), 'Arial, Helvetica', array(
[36] Fix | Delete
'style' => 'width:150px;'
[37] Fix | Delete
));
[38] Fix | Delete
new Color($row1, 'color', n2_('Color'), '000000FF', array(
[39] Fix | Delete
'alpha' => true
[40] Fix | Delete
));
[41] Fix | Delete
[42] Fix | Delete
new MixedField\FontSize($row1, 'size', n2_('Size'), '14|*|px');
[43] Fix | Delete
[44] Fix | Delete
new FontWeight($row1, 'weight', n2_('Font weight'), '');
[45] Fix | Delete
new Decoration($row1, 'decoration', n2_('Decoration'));
[46] Fix | Delete
new TextAutoComplete($row1, 'lineheight', n2_('Line height'), '18px', array(
[47] Fix | Delete
'values' => array(
[48] Fix | Delete
'normal',
[49] Fix | Delete
'1',
[50] Fix | Delete
'1.2',
[51] Fix | Delete
'1.5',
[52] Fix | Delete
'1.8',
[53] Fix | Delete
'2'
[54] Fix | Delete
),
[55] Fix | Delete
'style' => 'width:70px;'
[56] Fix | Delete
));
[57] Fix | Delete
new TextAlign($row1, 'textalign', n2_('Text align'), 'inherit');
[58] Fix | Delete
[59] Fix | Delete
$row2 = $table->createRow('font-row-2');
[60] Fix | Delete
[61] Fix | Delete
new TextAutoComplete($row2, 'letterspacing', n2_('Letter spacing'), 'normal', array(
[62] Fix | Delete
'values' => array(
[63] Fix | Delete
'normal',
[64] Fix | Delete
'1px',
[65] Fix | Delete
'2px',
[66] Fix | Delete
'5px',
[67] Fix | Delete
'10px',
[68] Fix | Delete
'15px'
[69] Fix | Delete
),
[70] Fix | Delete
'style' => 'width:50px;'
[71] Fix | Delete
));
[72] Fix | Delete
new TextAutoComplete($row2, 'wordspacing', n2_('Word spacing'), 'normal', array(
[73] Fix | Delete
'values' => array(
[74] Fix | Delete
'normal',
[75] Fix | Delete
'2px',
[76] Fix | Delete
'5px',
[77] Fix | Delete
'10px',
[78] Fix | Delete
'15px'
[79] Fix | Delete
),
[80] Fix | Delete
'style' => 'width:50px;'
[81] Fix | Delete
));
[82] Fix | Delete
new Select($row2, 'texttransform', n2_('Transform'), 'none', array(
[83] Fix | Delete
'options' => array(
[84] Fix | Delete
'none' => n2_('None'),
[85] Fix | Delete
'capitalize' => n2_('Capitalize'),
[86] Fix | Delete
'uppercase' => n2_('Uppercase'),
[87] Fix | Delete
'lowercase' => n2_('Lowercase')
[88] Fix | Delete
)
[89] Fix | Delete
));
[90] Fix | Delete
[91] Fix | Delete
new MixedField\TextShadow($row2, 'tshadow', n2_('Text shadow'), '0|*|0|*|1|*|000000FF');
[92] Fix | Delete
[93] Fix | Delete
new Textarea($row2, 'extracss', 'CSS', '', array(
[94] Fix | Delete
'width' => 200,
[95] Fix | Delete
'height' => 26
[96] Fix | Delete
));
[97] Fix | Delete
[98] Fix | Delete
$previewTable = new ContainerTable($form->getContainer(), 'font-preview', n2_('Preview'));
[99] Fix | Delete
[100] Fix | Delete
$previewTable->setFieldsetPositionEnd();
[101] Fix | Delete
[102] Fix | Delete
new Color($previewTable->getFieldsetLabel(), 'preview-background', false, 'ced3d5');
[103] Fix | Delete
[104] Fix | Delete
$form->render();
[105] Fix | Delete
}
[106] Fix | Delete
}
[107] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function