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


PHP RevSlider::getSettingsFields方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $revSliderAdmin = Mage::getSingleton('RevSliderAdmin');
     $revSliderAdmin->requireSettings("slider_settings");
     $settingsMain = $revSliderAdmin->getSettings("slider_main");
     $settingsParams = $revSliderAdmin->getSettings("slider_params");
     $settingsSliderMain = new RevSliderSettingsProduct();
     $settingsSliderParams = new UniteSettingsProductSidebarRev();
     //get taxonomies with cats
     $postTypesWithCats = RevOperations::getPostTypesWithCatsForClient();
     $jsonTaxWithCats = UniteFunctionsRev::jsonEncodeForClientSide($postTypesWithCats);
     //check existing slider data:
     $sliderID = $this->getRequest()->getParam('id');
     if (!empty($sliderID)) {
         $slider = new RevSlider();
         $slider->initByID($sliderID);
         //get setting fields
         $settingsFields = $slider->getSettingsFields();
         $arrFieldsMain = $settingsFields["main"];
         $arrFieldsParams = $settingsFields["params"];
         //modify arrows type for backword compatability
         $arrowsType = UniteFunctionsRev::getVal($arrFieldsParams, "navigation_arrows");
         switch ($arrowsType) {
             case "verticalcentered":
                 $arrFieldsParams["navigation_arrows"] = "solo";
                 break;
         }
         //set custom type params values:
         $settingsMain = RevSliderSettingsProduct::setSettingsCustomValues($settingsMain, $arrFieldsParams, $postTypesWithCats);
         //set setting values from the slider
         $settingsMain->setStoredValues($arrFieldsParams);
         $settingsParams->setStoredValues($arrFieldsParams);
         //update short code setting
         $shortcode = $slider->getShortcode();
         $settingsMain->updateSettingValue("shortcode", htmlentities($shortcode));
         $linksEditSlides = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slides/id/' . $sliderID);
         $settingsSliderParams->init($settingsParams);
         $settingsSliderMain->init($settingsMain);
         $settingsSliderParams->isAccordion(true);
         $this->assign('sliderID', $sliderID);
         $this->assign('linksEditSlides', $linksEditSlides);
         $this->assign('arrFieldsParams', $arrFieldsParams);
         $this->setTemplate('nwdthemes/revslider/templates/slider_edit.phtml');
     } else {
         //set custom type params values:
         $settingsMain = RevSliderSettingsProduct::setSettingsCustomValues($settingsMain, array(), $postTypesWithCats);
         $settingsSliderParams->init($settingsParams);
         $settingsSliderMain->init($settingsMain);
         $settingsSliderParams->isAccordion(true);
         $this->setTemplate('nwdthemes/revslider/templates/slider_new.phtml');
     }
     $this->assign('sliderTemplate', $this->_sliderTemplate);
     $this->assign('settingsSliderMain', $settingsSliderMain);
     $this->assign('settingsSliderParams', $settingsSliderParams);
     $this->assign('jsonTaxWithCats', $jsonTaxWithCats);
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:60,代码来源:Edit.php

示例2: include_custom_css

 public static function include_custom_css()
 {
     $type = isset($_GET['view']) ? $_GET['view'] : '';
     $page = isset($_GET['page']) ? $_GET['page'] : '';
     if ($page !== 'slider' && $page !== 'revslider_navigation') {
         return false;
     }
     //showbiz fix
     $sliderID = '';
     switch ($type) {
         case 'slider':
             $sliderID = isset($_GET['id']) ? $_GET['id'] : '';
             break;
         case 'slide':
             $slideID = isset($_GET['id']) ? $_GET['id'] : '';
             if ($slideID == 'new') {
                 break;
             }
             $slide = new RevSlide();
             $slide->initByID($slideID);
             $sliderID = $slide->getSliderID();
             break;
         default:
             if (isset($_GET['slider'])) {
                 $sliderID = $_GET['slider'];
             }
             break;
     }
     $arrFieldsParams = array();
     if (!empty($sliderID)) {
         $slider = new RevSlider();
         $slider->initByID($sliderID);
         $settingsFields = $slider->getSettingsFields();
         $arrFieldsMain = $settingsFields['main'];
         $arrFieldsParams = $settingsFields['params'];
         $custom_css = @stripslashes($arrFieldsParams['custom_css']);
         $custom_css = RevSliderCssParser::compress_css($custom_css);
         echo '<style>' . $custom_css . '</style>';
     }
 }
开发者ID:zruiz,项目名称:NG,代码行数:40,代码来源:revslider-admin.class.php

示例3: RevSliderSettingsProduct

<?php

$settingsMain = self::getSettings("slider_main");
$settingsParams = self::getSettings("slider_params");
$settingsSliderMain = new RevSliderSettingsProduct();
$settingsSliderParams = new UniteSettingsProductSidebarRev();
//check existing slider data:
$sliderID = self::getGetVar("id");
if (!empty($sliderID)) {
    $slider = new RevSlider();
    $slider->initByID($sliderID);
    //get setting fields
    $settingsFields = $slider->getSettingsFields();
    $arrFieldsMain = $settingsFields["main"];
    $arrFieldsParams = $settingsFields["params"];
    //modify arrows type for backword compatability
    $arrowsType = UniteFunctionsRev::getVal($arrFieldsParams, "navigation_arrows");
    switch ($arrowsType) {
        case "verticalcentered":
            $arrFieldsParams["navigation_arrows"] = "solo";
            break;
    }
    //set setting values from the slider
    $settingsMain->setStoredValues($arrFieldsParams);
    //set custom type params values:
    $settingsMain = RevSliderSettingsProduct::setSettingsCustomValues($settingsMain, $arrFieldsParams);
    $settingsParams->setStoredValues($arrFieldsParams);
    //update short code setting
    $shortcode = $slider->getShortcode();
    $settingsMain->updateSettingValue("shortcode", $shortcode);
    $linksEditSlides = self::getViewUrl(RevSliderAdmin::VIEW_SLIDES, "id={$sliderID}");
开发者ID:par-orillonsoft,项目名称:elearning-wordpress,代码行数:31,代码来源:slider.php


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