当前位置: 首页>>代码示例>>PHP>>正文


PHP UniteSettingsAdvancedRev::loadXMLFile方法代码示例

本文整理汇总了PHP中UniteSettingsAdvancedRev::loadXMLFile方法的典型用法代码示例。如果您正苦于以下问题:PHP UniteSettingsAdvancedRev::loadXMLFile方法的具体用法?PHP UniteSettingsAdvancedRev::loadXMLFile怎么用?PHP UniteSettingsAdvancedRev::loadXMLFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UniteSettingsAdvancedRev的用法示例。


在下文中一共展示了UniteSettingsAdvancedRev::loadXMLFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$sliderMainSettings->addRadio("auto_height", array("on" => __("On", REVSLIDER_TEXTDOMAIN), "off" => __("Off", REVSLIDER_TEXTDOMAIN)), __("Unlimited Height", REVSLIDER_TEXTDOMAIN), "off");
$sliderMainSettings->addRadio("force_full_width", array("on" => __("On", REVSLIDER_TEXTDOMAIN), "off" => __("Off", REVSLIDER_TEXTDOMAIN)), __("Force Full Width", REVSLIDER_TEXTDOMAIN), "off");
$arrParams = array("description" => __("", REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addTextBox("min_height", "0", __("Min. Height", REVSLIDER_TEXTDOMAIN), $arrParams);
$paramsSize = array("width" => 960, "height" => 350, "datatype" => UniteSettingsRev::DATATYPE_NUMBER, "description" => __('
- The <span class="prevxmpl">LAYERS GRID</span> is the container of layers within the <span class="prevxmpl">SLIDER</span> <br>
- The "Grid Size" setting does not relate to the actual "Slider Size". <br>
- "Max Height" of the slider equals the "Grid Height"<br>
- "Slider Width" can be greater than the set "Grid Width"', REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addCustom("slider_size", "slider_size", "", __("Layers Grid Size", REVSLIDER_TEXTDOMAIN), $paramsSize);
$paramsResponsitive = array("w1" => 940, "sw1" => 770, "w2" => 780, "sw2" => 500, "w3" => 510, "sw3" => 310, "datatype" => UniteSettingsRev::DATATYPE_NUMBER);
$sliderMainSettings->addCustom("responsitive_settings", "responsitive", "", __("Responsive Sizes", REVSLIDER_TEXTDOMAIN), $paramsResponsitive);
$sliderMainSettings->addHr();
self::storeSettings("slider_main", $sliderMainSettings);
//set "slider_params" settings.
$sliderParamsSettings = new UniteSettingsAdvancedRev();
$sliderParamsSettings->loadXMLFile(self::$path_settings . "/slider_settings.xml");
//update transition type setting.
$settingFirstType = $sliderParamsSettings->getSettingByName("first_transition_type");
$operations = new RevOperations();
$arrTransitions = $operations->getArrTransition();
if (count($arrTransitions) == 0) {
    $arrTransitions = $operations->getArrTransition(true);
}
//get premium transitions
$settingFirstType["items"] = $arrTransitions;
$sliderParamsSettings->updateArrSettingByName("first_transition_type", $settingFirstType);
//store params
self::storeSettings("slider_params", $sliderParamsSettings);
?>
				
开发者ID:TeamCodeStudio,项目名称:fpmoz,代码行数:30,代码来源:slider_settings.php

示例2: writeSettingLanguageFile

 /**
  * 
  * write settings language file for wp automatic scanning
  */
 public static function writeSettingLanguageFile($filepath)
 {
     $info = pathinfo($filepath);
     $path = UniteFunctionsRev::getVal($info, "dirname") . "/";
     $filename = UniteFunctionsRev::getVal($info, "filename");
     $ext = UniteFunctionsRev::getVal($info, "extension");
     $filenameOutput = "{$filename}_{$ext}_lang.php";
     $filepathOutput = $path . $filenameOutput;
     //load settings
     $settings = new UniteSettingsAdvancedRev();
     $settings->loadXMLFile($filepath);
     $arrText = $settings->getArrTextFromAllSettings();
     $str = "";
     $str .= "<?php \n";
     foreach ($arrText as $text) {
         $text = str_replace('"', '\\"', $text);
         $str .= "_e(\"{$text}\",\"" . REVSLIDER_TEXTDOMAIN . "\"); \n";
     }
     $str .= "?>";
     UniteFunctionsRev::writeFile($str, $filepathOutput);
 }
开发者ID:jhonrsalcedo,项目名称:sitio,代码行数:25,代码来源:functions_wordpress.class.php


注:本文中的UniteSettingsAdvancedRev::loadXMLFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。