本文整理汇总了PHP中n2_x函数的典型用法代码示例。如果您正苦于以下问题:PHP n2_x函数的具体用法?PHP n2_x怎么用?PHP n2_x使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了n2_x函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: backend
public static function backend($force = false)
{
static $once;
if ($once != null && !$force) {
return;
}
$once = true;
$family = n2_x('Montserrat', 'Default Google font family for admin');
foreach (explode(',', n2_x('latin', 'Default Google font charset for admin')) as $subset) {
N2GoogleFonts::addSubset($subset);
}
N2GoogleFonts::addFont($family);
N2CSS::addInline('.n2,html[dir="rtl"] .n2,.n2 td,.n2 th,.n2 select, .n2 textarea, .n2 input{font-family: "' . $family . '", Arial, sans-serif;}');
N2CSS::addFiles(N2LIBRARYASSETS . "/css", array('nextend-font.css', 'font.css', 'admin.css', 'form.css', 'notificationcenter.css', 'spectrum.css', 'contextMenu.css'), 'nextend-backend');
foreach (glob(N2LIBRARYASSETS . "/css/tabs/*.css") as $file) {
N2CSS::addFile($file, 'nextend-backend');
}
foreach (glob(N2LIBRARYASSETS . "/css/jquery/*.css") as $file) {
N2CSS::addFile($file, 'nextend-backend');
}
N2JS::addFiles(N2LIBRARYASSETS . "/js", array('json2.js', 'admin.js', 'color.js', 'query-string.js', 'md5.js', 'css.js', 'imagehelper.js', 'modal.js', 'notificationcenter.js', 'spectrum.js', 'expert.js'), 'nextend-backend');
N2Localization::addJS(array('Cancel', 'Delete', 'Delete and never show again', 'Are you sure you want to delete?', 'Documentation'));
self::form($force);
N2JS::addFiles(N2LIBRARYASSETS . "/js/core/jquery", array("fixto.js", "jstorage.js", "jquery.datetimepicker.js", "jquery.tinyscrollbar.min.js", "jquery.unique-element-id.js", "vertical-pane.js"), "nextend-backend");
wp_enqueue_script('nextend-ui', N2Uri::pathToUri(N2LIBRARYASSETS . "/js/core/jquery/ui/jquery-ui.nextend.js"), array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-autocomplete', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-resizable', 'jquery-ui-sortable', 'jquery-ui-slider'), '1.0', 1);
wp_enqueue_script('nextend-ui-iframe-transport', N2Uri::pathToUri(N2LIBRARYASSETS . "/js/core/jquery/ui/jquery.iframe-transport.js"), array('jquery-ui-core', 'jquery-ui-widget'), '1.0', 1);
wp_enqueue_script('nextend-ui-fileupload', N2Uri::pathToUri(N2LIBRARYASSETS . "/js/core/jquery/ui/jquery.fileupload.js"), array('jquery-ui-core', 'jquery-ui-widget'), '1.0', 1);
N2JS::addFiles(N2LIBRARYASSETS . "/js/core/jquery/ui", array('jquery.contextMenu.js'), "nextend-backend");
N2Base::getApplication('system')->info->assetsBackend();
N2JS::addFirstCode("NextendAjaxHelper.addAjaxArray(" . json_encode(N2Form::tokenizeUrl()) . ");");
N2Plugin::callPlugin('fontservices', 'onFontManagerLoadBackend');
}
示例2: getDefaults
public static function getDefaults()
{
$defaults = array();
$fontsSets = explode(',', n2_x('latin', 'Default font sets'));
for ($i = 0; $i < count($fontsSets); $i++) {
$fontsSets[$i] = 'google-set-' . $fontsSets[$i];
}
$defaults += array_fill_keys($fontsSets, 1);
return $defaults;
}
示例3: loadSettings
public static function loadSettings()
{
static $inited;
if (!$inited) {
$inited = true;
self::$config = array('default-family' => n2_x('Montserrat,Arial', 'Default font'), 'preset-families' => n2_x("'Montserrat',Arial\n'Pacifico',Arial\n'Open Sans',Arial\n'Lato',Arial\n'Bevan',Arial\n'Oxygen',Arial\n'Pt Sans',Arial\n'Average',Arial\n'Roboto',Arial\n'Roboto Slab',Arial\n'Oswald',Arial\n'Droid Sans',Arial\n'Raleway',Arial\n'Lobster',Arial\n'Titillium Web',Arial\n'Cabin',Arial\n'Varela Round',Arial\n'Vollkorn',Arial\n'Quicksand',Arial\n'Source Sans Pro',Arial\n'Asap',Arial\n'Merriweather',Arial", 'Default font family list'), 'plugins' => array());
foreach (N2StorageSectionAdmin::getAll('system', 'fonts') as $data) {
self::$config[$data['referencekey']] = $data['value'];
}
self::$config['plugins'] = new N2Data(self::$config['plugins'], true);
}
return self::$config;
}
示例4: __construct
public function __construct()
{
$this->_title = n2_x('Button', 'Slide item');
}
示例5: n2_ex
function n2_ex($text, $context, $domain = 'nextend')
{
echo n2_x($text, $context, $domain);
}
示例6: addAdvanced
protected function addAdvanced()
{
$advanced = $this->_xml->addChild('param');
$advanced->addAttribute('type', 'group');
$advanced->addAttribute('style', 'width:350px;');
$horizontal = $advanced->addChild('param');
$horizontal->addAttribute('name', $this->_name . '-horizontal');
$horizontal->addAttribute('type', 'switcher');
$horizontal->addAttribute('label', 'Horizontal');
$horizontal->addAttribute('default', 'left');
$horizontal->addAttribute('translateable', '1');
$left = $horizontal->addChild('unit', 'Left');
$left->addAttribute('value', 'left');
$right = $horizontal->addChild('unit', 'Right');
$right->addAttribute('value', 'right');
$position = $advanced->addChild('param');
$position->addAttribute('name', $this->_name . '-horizontal-position');
$position->addAttribute('type', 'text');
$position->addAttribute('label', n2_x('Position', "position for controls"));
$position->addAttribute('default', '0');
$position->addAttribute('style', 'width:30px;');
$switcher = $advanced->addChild('param');
$switcher->addAttribute('name', $this->_name . '-horizontal-unit');
$switcher->addAttribute('type', 'switcher');
$switcher->addAttribute('label', n2_('Unit'));
$switcher->addAttribute('default', 'px');
$px = $switcher->addChild('unit', 'px');
$px->addAttribute('value', 'px');
$percent = $switcher->addChild('unit', n2_('%'));
$percent->addAttribute('value', '%');
$vertical = $advanced->addChild('param');
$vertical->addAttribute('name', $this->_name . '-vertical');
$vertical->addAttribute('type', 'switcher');
$vertical->addAttribute('label', 'Vertical');
$vertical->addAttribute('default', 'top');
$vertical->addAttribute('translateable', '1');
$left = $vertical->addChild('unit', 'Top');
$left->addAttribute('value', 'top');
$right = $vertical->addChild('unit', 'Bottom');
$right->addAttribute('value', 'bottom');
$position = $advanced->addChild('param');
$position->addAttribute('name', $this->_name . '-vertical-position');
$position->addAttribute('type', 'text');
$position->addAttribute('label', n2_x('Position', "position for controls"));
$position->addAttribute('default', '0');
$position->addAttribute('style', 'width:30px;');
$switcher = $advanced->addChild('param');
$switcher->addAttribute('name', $this->_name . '-vertical-unit');
$switcher->addAttribute('type', 'switcher');
$switcher->addAttribute('label', n2_('Unit'));
$switcher->addAttribute('default', 'px');
$px = $switcher->addChild('unit', 'px');
$px->addAttribute('value', 'px');
$percent = $switcher->addChild('unit', n2_('%'));
$percent->addAttribute('value', '%');
}
示例7: onResponsiveList
function onResponsiveList(&$list, &$labels)
{
$list[self::$name] = $this->getPath();
$labels[self::$name] = n2_x('Fullwidth', 'Slider responsive mode');
}
示例8: onTypeList
function onTypeList(&$list, &$labels)
{
$list[self::$name] = $this->getPath();
$labels[self::$name] = n2_x('Simple', 'Slider type');
}