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


PHP UniteFunctionsRev::getVal方法代码示例

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


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

示例1: putJavascript

    /**
     * 
     * javascript output to footer
     */
    public function putJavascript()
    {
        $urlPlugin = UniteBaseClassRev::$url_plugin . "rs-plugin/";
        $operations = new RevOperations();
        $arrValues = $operations->getGeneralSettingsValues();
        $use_hammer = UniteFunctionsRev::getVal($arrValues, "use_hammer_js", 'on');
        if ($use_hammer == 'off') {
            ?>
				<script type='text/javascript' src='<?php 
            echo $urlPlugin;
            ?>
js/jquery.themepunch.disablehammer.js?rev=<?php 
            echo GlobalsRevSlider::SLIDER_REVISION;
            ?>
'></script>
				<?php 
        }
        ?>
			<script type='text/javascript' src='<?php 
        echo $urlPlugin;
        ?>
js/jquery.themepunch.tools.min.js?rev=<?php 
        echo GlobalsRevSlider::SLIDER_REVISION;
        ?>
'></script>
			<script type='text/javascript' src='<?php 
        echo $urlPlugin;
        ?>
js/jquery.themepunch.revolution.min.js?rev=<?php 
        echo GlobalsRevSlider::SLIDER_REVISION;
        ?>
'></script>
			<?php 
    }
开发者ID:misfist,项目名称:missdrepants-network,代码行数:38,代码来源:revslider_front.php

示例2: getThumbFilename

 /**
  * 
  * get filename for thumbnail save / retrieve
  * TODO: do input validations - security measures
  */
 private function getThumbFilename()
 {
     $info = pathInfo($this->filename);
     //add dirname as postfix (if exists)
     $postfix = "";
     $dirname = UniteFunctionsRev::getVal($info, "dirname");
     if (!empty($dirname)) {
         $postfix = str_replace("/", "-", $dirname);
     }
     $ext = $info["extension"];
     $name = $info["filename"];
     $width = ceil($this->maxWidth);
     $height = ceil($this->maxHeight);
     $thumbFilename = $name . "_" . $width . "x" . $height;
     if (!empty($this->type)) {
         $thumbFilename .= "_" . $this->type;
     }
     if (!empty($this->effect)) {
         $thumbFilename .= "_e" . $this->effect;
         if (!empty($this->effect_arg1)) {
             $thumbFilename .= "x" . $this->effect_arg1;
         }
     }
     //add postfix
     if (!empty($postfix)) {
         $thumbFilename .= "_" . $postfix;
     }
     $thumbFilename .= "." . $ext;
     return $thumbFilename;
 }
开发者ID:par-orillonsoft,项目名称:elearning-wordpress,代码行数:35,代码来源:image_view.class.php

示例3: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     // Build the script.
     $script = array();
     $script[] = '	function onArrowsSelect(data){';
     $script[] = '		UniteAdminRev.onArrowsChange(data);';
     $script[] = '		SqueezeBox.close();';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Setup variables for display.
     $html = array();
     $link = 'index.php?option=' . GlobalsUniteRev::COMPONENT_NAME . '&view=slider&layout=arrows&tmpl=component&settingid=' . $this->id;
     $buttonType = $this->value;
     $arrArrowSet = HelperUniteRev::getArrowSet($buttonType);
     $arrowName = $arrArrowSet["name"];
     $html[] = '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . $this->value . '" />';
     $buttonID = $this->id . "-btn";
     $desc = UniteFunctionsRev::getVal($this->element, "description");
     // The the arrow
     $imageArrow = $arrArrowSet["url_right"];
     $html[] = '<span class="chooser-image-wrapper"><img id="' . $this->id . '-img" title="' . $arrowName . '" src="' . $imageArrow . '"></span>';
     //put select button
     $html[] = '	<a id="' . $buttonID . '" class="modal button-secondary button-chooser" href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 900, y: 450}}">Change</a>';
     $html = implode("\n", $html);
     return $html;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:35,代码来源:arrows.php

示例4: getControlFields

 /**
  * 
  * get fields that relevant for the control
  */
 public function getControlFields()
 {
     $arrControls = array();
     //get base elements array
     $arrBase = array();
     $arrBase["parent"] = (string) UniteFunctionsRev::getVal($this->element, 'parent');
     $arrBase["value"] = (string) UniteFunctionsRev::getVal($this->element, 'value');
     $arrBase["ctype"] = (string) UniteFunctionsRev::getVal($this->element, 'ctype');
     //validate fields:
     if (empty($arrBase["parent"])) {
         UniteFunctionsRev::throwError("The parent can't be empty in control");
     }
     if (empty($arrBase["value"])) {
         UniteFunctionsRev::throwError("The value can't be empty in control: {$arrBase['parent']}");
     }
     if (empty($arrBase["ctype"])) {
         UniteFunctionsRev::throwError("The ctype can't be empty in control: {$arrBase['parent']}");
     }
     //get children
     $strchild = (string) UniteFunctionsRev::getVal($this->element, 'child');
     //validate child
     if (empty($strchild)) {
         UniteFunctionsRev::throwError("The child can't be empty in control: {$arrBase['parent']}");
     }
     $strchild = trim($strchild);
     $children = explode(",", $strchild);
     foreach ($children as $child) {
         $arrControl = $arrBase;
         $arrControl["child"] = $child;
         $arrControls[] = $arrControl;
     }
     return $arrControls;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:37,代码来源:control.php

示例5: yit_revslider_slider

function yit_revslider_slider()
{
    $operations = new RevOperations();
    $arrValues = $operations->getGeneralSettingsValues();

    $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally","on");

    $isWidgetActive = is_active_widget( false, false, "rev-slider-widget", true );
    $hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");

    if ( yit_slider_get_setting('slider_type',yit_slider_name()) != 'revolution-slider' || $includesGlobally == "on" || $isWidgetActive || $hasShortcode ) {
        return;
    }

    wp_enqueue_style('rs-plugin-settings', RS_PLUGIN_URL .'public/assets/css/settings.css', array(), RevSliderGlobals::SLIDER_REVISION);

    $custom_css = RevOperations::getStaticCss();
    $custom_css = UniteCssParserRev::compress_css($custom_css);
    wp_add_inline_style('rs-plugin-settings', $custom_css);

    $setBase = (is_ssl()) ? "https://" : "http://";

    $url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
    wp_enqueue_script("jquery", $url_jquery);

    // put javascript to footer
    add_action('wp_footer', array($GLOBALS['productFront'], 'putJavascript'));
}
开发者ID:simonsays88,项目名称:costa,代码行数:28,代码来源:config.php

示例6: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     // Build the script.
     $script = array();
     $script[] = '	function onBulletsSelect(data){';
     $script[] = '		alert("do something: " + data)';
     $script[] = '		SqueezeBox.close();';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Setup variables for display.
     $html = array();
     $link = 'index.php?option=com_uniterevolution&view=slider&layout=bullets&tmpl=component';
     $html[] = '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="' . $this->value . '" />';
     $bulletsText = "Change Bullets";
     $buttonID = $this->id . "-btn";
     $desc = UniteFunctionsRev::getVal($this->element, "description");
     $htmlAddon = "";
     if (!empty($desc)) {
         $htmlAddon = ' title="' . $desc . '"';
         //$class .= " hasTip";	//making problems with rel
     }
     // The user select button.
     $html[] = '	<a id="' . $buttonID . '" class="modal panel_button" ' . $htmlAddon . '  href="' . $link . '&amp;' . JSession::getFormToken() . '=1" rel="{handler: \'iframe\', size: {x: 900, y: 450}}">' . $bulletsText . '</a>';
     $html = implode("\n", $html);
     return $html;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:35,代码来源:bullets.php

示例7: rev_slider_shortcode

 function rev_slider_shortcode($args)
 {
     $sliderAlias = UniteFunctionsRev::getVal($args, 0);
     ob_start();
     $slider = RevSliderOutput::putSlider($sliderAlias);
     $content = ob_get_contents();
     ob_clean();
     ob_end_clean();
     //handle slider output types
     if (!empty($slider)) {
         $outputType = $slider->getParam("output_type", "");
         switch ($outputType) {
             case "compress":
                 $content = str_replace("\n", "", $content);
                 $content = str_replace("\r", "", $content);
                 return $content;
                 break;
             case "echo":
                 echo $content;
                 //bypass the filters
                 break;
             default:
                 return $content;
                 break;
         }
     } else {
         return $content;
     }
     //normal output
 }
开发者ID:venkimithu,项目名称:npmgroups,代码行数:30,代码来源:revslider.php

示例8: onAddScripts

 /**
  * 
  * a must function. you can not use it, but the function must stay there!.
  *   
  */
 public static function onAddScripts()
 {
     global $wp_version;
     $style_pre = '';
     $style_post = '';
     if ($wp_version < 3.7) {
         $style_pre = '<style type="text/css">';
         $style_post = '</style>';
     }
     $operations = new RevOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
     $includesFooter = UniteFunctionsRev::getVal($arrValues, "js_to_footer", "off");
     $strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     //put the includes only on pages with active widget or shortcode
     // if the put in match, then include them always (ignore this if)
     if ($isPutIn == false && $includesGlobally == "off") {
         $isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
         $hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");
         if ($isWidgetActive == false && $hasShortcode == false) {
             return false;
         }
     }
     self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
     $custom_css = RevOperations::getStaticCss();
     $custom_css = UniteCssParserRev::compress_css($custom_css);
     wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
     /*
      */
     /*
     $styles = $db->fetch(GlobalsRevSlider::$table_css);
     $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
     $styles = UniteCssParserRev::compress_css($styles);
     wp_add_inline_style( 'rs-plugin-settings', $style_pre.$styles.$style_post );
     
     // KRISZTIAN MODIFICATION FOR INNERLAYERS
     $stylesinnerlayers = str_replace('.tp-caption', '',$styles);´
     wp_add_inline_style( 'rs-plugin-settings', $style_pre.$stylesinnerlayers.$style_post );
     // END MODIFICATION
     */
     $setBase = is_ssl() ? "https://" : "http://";
     $url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
     self::addScriptAbsoluteUrl($url_jquery, "jquery");
     if ($includesFooter == "off") {
         $waitfor = array('jquery');
         $enable_logs = UniteFunctionsRev::getVal($arrValues, "enable_logs", 'off');
         if ($enable_logs == 'on') {
             self::addScriptWaitFor("jquery.themepunch.enablelog", "rs-plugin/js", 'enable-logs');
             $waitfor[] = 'enable-logs';
         }
         self::addScriptWaitFor("jquery.themepunch.tools.min", "rs-plugin/js", 'tp-tools', $waitfor);
         self::addScriptWaitFor("jquery.themepunch.revolution.min", "rs-plugin/js", 'revmin', 'tp-tools');
     } else {
         //put javascript to footer
         UniteBaseClassRev::addAction('wp_footer', 'putJavascript');
     }
 }
开发者ID:epiii,项目名称:aros,代码行数:63,代码来源:revslider_front.php

示例9: rev_slider_shortcode

 function rev_slider_shortcode($args)
 {
     $sliderAlias = UniteFunctionsRev::getVal($args, 0);
     ob_start();
     RevSliderOutput::putSlider($sliderAlias);
     $content = ob_get_contents();
     ob_clean();
     return $content;
 }
开发者ID:rohichurch,项目名称:rohichurch-wp,代码行数:9,代码来源:revslider.php

示例10: __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

示例11: widget

 /**
  * 
  * widget output
  */
 public function widget($args, $instance)
 {
     $sliderID = UniteFunctionsRev::getVal($instance, "rev_slider");
     $homepageCheck = UniteFunctionsRev::getVal($instance, "rev_slider_homepage");
     $homepage = "";
     if ($homepageCheck == "on") {
         $homepage = "homepage";
     }
     if (empty($sliderID)) {
         return false;
     }
     RevSliderOutput::putSlider($sliderID, $homepage);
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:17,代码来源:revslider_widget.class.php

示例12: form

 /**
  * 
  * the form
  */
 public function form($instance)
 {
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSlidersShort();
     $sliderID = UniteFunctionsRev::getVal($instance, "rev_slider");
     if (empty($arrSliders)) {
         echo __("No sliders found, Please create a slider", tk_theme_name);
     } else {
         $field = "rev_slider";
         $fieldID = $this->get_field_id($field);
         $fieldName = $this->get_field_name($field);
         $select = UniteFunctionsRev::getHTMLSelect($arrSliders, $sliderID, 'name="' . $fieldName . '" id="' . $fieldID . '"', true);
     }
     echo "Choose slider: ";
     echo $select;
 }
开发者ID:rohichurch,项目名称:rohichurch-wp,代码行数:20,代码来源:revslider_widget.class.php

示例13: putRevSlider

 /**
  * 
  * put rev slider on the page.
  * the data can be slider ID or slider alias.
  */
 function putRevSlider($data, $putIn = "")
 {
     $operations = new RevOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
     $strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     if ($isPutIn == false && $includesGlobally == "off") {
         $output = new RevSliderOutput();
         $option1Name = "Include RevSlider libraries globally (all pages/posts)";
         $option2Name = "Pages to include RevSlider libraries";
         $output->putErrorMessage(__("If you want to use the PHP function \"putRevSlider\" in your code please make sure to check \" ", REVSLIDER_TEXTDOMAIN) . $option1Name . __(" \" in the backend's \"General Settings\" (top right panel). <br> <br> Or add the current page to the \"", REVSLIDER_TEXTDOMAIN) . $option2Name . __("\" option box."));
         return false;
     }
     RevSliderOutput::putSlider($data, $putIn);
 }
开发者ID:ashanrupasinghe,项目名称:amc-car-from-server-2015-1-14,代码行数:21,代码来源:revslider.php

示例14: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Initialize some field attributes.
     if (empty($class)) {
         $class = "button1";
     }
     $id = $this->element['name'];
     $label = $this->element['label'];
     $desc = UniteFunctionsRev::getVal($this->element, "description");
     $htmlAddon = "";
     if (!empty($desc)) {
         $htmlAddon = "class='hasTip' title='{$desc}'";
     }
     $html = "<input type='button' id='{$id}' value='{$label}' {$htmlAddon}>";
     return $html;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:22,代码来源:mybutton.php

示例15: saveSlider

 /**
  * 
  * save the slider
  */
 private function saveSlider()
 {
     $sliderID = $this->data["sliderid"];
     $params = UniteFunctionsRev::getVal($this->data, "params", array());
     $settings = UniteFunctionsRev::getVal($this->data, "settings", array());
     $params = array_merge($settings, $params);
     $params = UniteFunctionJoomlaRev::clearParamsArray($params);
     //validate title not empty:
     $title = UniteFunctionsRev::getVal($params, "title");
     UniteFunctionsRev::validateNotEmpty($title, "Title");
     //unset sldier id from the params
     unset($params["id"]);
     if (empty($sliderID)) {
         $sliderID = $this->operations->addNewSlider($params);
     } else {
         $this->operations->saveSlider($sliderID, $params);
     }
     return $sliderID;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:23,代码来源:actions.class.php


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