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


PHP Essential_Grid_Base::stripslashes_deep方法代码示例

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


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

示例1: get_essential_navigation_skin_by_handle

 /**
  * Get Navigation Skin by ID from Database
  */
 public static function get_essential_navigation_skin_by_handle($handle = '')
 {
     global $wpdb;
     if ($handle == '') {
         return false;
     }
     $table_name = $wpdb->prefix . Essential_Grid::TABLE_NAVIGATION_SKINS;
     $skin = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$table_name} WHERE handle = %s", $handle), ARRAY_A);
     if (!empty($skin)) {
         $skin['css'] = Essential_Grid_Base::stripslashes_deep($skin['css']);
     }
     return $skin;
 }
开发者ID:mertyildiran,项目名称:grandinsaat,代码行数:16,代码来源:navigation.class.php

示例2: register_shortcode_search

 /** 
  * add search shortcode functionality
  * @since: 2.0
  */
 public static function register_shortcode_search($args, $mid_content = null)
 {
     extract(shortcode_atts(array('handle' => ''), $args, 'ess_grid_search'));
     if (trim($handle) === '') {
         return false;
     }
     $settings = get_option('esg-search-settings', array('settings' => array(), 'global' => array(), 'shortcode' => array()));
     $settings = Essential_Grid_Base::stripslashes_deep($settings);
     if (!isset($settings['shortcode']['sc-handle'])) {
         return false;
     }
     $use_key = false;
     foreach ($settings['shortcode']['sc-handle'] as $key => $sc_handle) {
         if ($sc_handle === $handle) {
             $use_key = $key;
         }
     }
     if ($key === false) {
         return false;
     }
     //we have found it, now proceed if correct handle and a text was set it
     $class = 'eg-' . sanitize_html_class($settings['shortcode']['sc-handle'][$use_key]);
     if ($class === '') {
         return false;
     }
     $text = trim($settings['shortcode']['sc-html'][$use_key]);
     if ($text === '') {
         return false;
     }
     //modify text so that we add 1. the class to existing if there is a tag element in it (add only to first wrap). 2. the class as new if there is a tag element inside. 3. wrap text around it if there is not tag element
     $search = new Essential_Grid_Search(true);
     //true will enqueue scripts to page
     preg_match_all('/<(.*?)>/', $text, $matches);
     if (!empty($matches[0])) {
         //check if first tag has class, if not add it
         $string = $matches[0][0];
         if (strpos($string, 'class="') !== false) {
             $new_text = str_replace('class="', 'class="' . $class . ' ', $string);
         } elseif (strpos($string, "class='") !== false) {
             $new_text = str_replace("class='", "class='" . $class . ' ', $string);
         } else {
             $use_string = $matches[1][0];
             $new_text = '<' . $use_string . ' class="' . $class . '">';
         }
         $text = str_replace($string, $new_text, $text);
     } else {
         $text = '<a href="javascript:void(0);" class="' . $class . '">' . $text . '</a>';
     }
     return $text;
 }
开发者ID:Lumbe,项目名称:dev_servus,代码行数:54,代码来源:search.class.php

示例3: getVar

 /**
  * Get $_POST/$_GET Parameter
  */
 public static function getVar($arr, $key, $default = "", $type = "")
 {
     $val = $default;
     if (isset($arr[$key])) {
         $val = $arr[$key];
     }
     switch ($type) {
         case 'i':
             //int
             $val = intval($val);
             break;
         case 'f':
             //float
             $val = floatval($val);
             break;
         case 'r':
             //raw meaning, do nothing
             break;
         default:
             $val = Essential_Grid_Base::stripslashes_deep($val);
             break;
     }
     return $val;
 }
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:27,代码来源:base.class.php

示例4: getTextElementsArray

 /**
  * Get Array of Text Elements
  */
 public static function getTextElementsArray()
 {
     global $wpdb;
     $custom = array();
     $elements = self::get_essential_item_elements();
     if (!empty($elements)) {
         foreach ($elements as $element) {
             $custom[$element['handle']] = array('id' => $element['id'], 'name' => $element['name'], 'settings' => json_decode($element['settings'], true));
         }
     }
     Essential_Grid_Base::stripslashes_deep($custom);
     return $custom;
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:16,代码来源:item-element.class.php

示例5: get_essential_item_skin_by_id

 /**
  * Get Item Skin by ID from Database
  */
 public static function get_essential_item_skin_by_id($id = 0)
 {
     global $wpdb;
     $id = intval($id);
     if ($id == 0) {
         return false;
     }
     $table_name = $wpdb->prefix . Essential_Grid::TABLE_ITEM_SKIN;
     $skin = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$table_name} WHERE id = %d", $id), ARRAY_A);
     if (!empty($skin)) {
         $skin['params'] = Essential_Grid_Base::stripslashes_deep(@json_decode($skin['params'], true));
         $layers = @json_decode($skin['layers'], true);
         if (!empty($layers) && is_array($layers)) {
             //prevent overhead
             foreach ($layers as $lkey => $layer) {
                 $layers[$lkey] = Essential_Grid_Base::stripslashes_deep($layer);
             }
         }
         $skin['layers'] = $layers;
         //$skin['layers'] = Essential_Grid_Base::stripslashes_deep(@json_decode($skin['layers'], true));
         $skin['settings'] = Essential_Grid_Base::stripslashes_deep(@json_decode($skin['settings'], true));
     }
     return $skin;
 }
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:27,代码来源:item-skin.class.php

示例6: get_option

<?php

/**
 * Panel to the search options.
 * 
 * @package   Essential_Grid
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.themepunch.com/essential/
 * @copyright 2014 ThemePunch
 * @since: 2.0
 */
$settings = get_option('esg-search-settings', array('settings' => array(), 'global' => array(), 'shortcode' => array()));
$settings = Essential_Grid_Base::stripslashes_deep($settings);
$base = new Essential_Grid_Base();
$grids = Essential_Grid::get_grids_short();
$my_skins = array('light' => __('Light', EG_TEXTDOMAIN), 'dark' => __('Dark', EG_TEXTDOMAIN));
$my_skins = apply_filters('essgrid_modify_search_skins', $my_skins);
?>
<h2 class="topheader"><?php 
_e('Search Settings', EG_TEXTDOMAIN);
?>
</h2>

<div id="eg-grid-search-wrapper">
	<ul class="es-grid-search-tabs">
		<li><a href="#eg-search-settings-wrap"><?php 
_e('Global Settings', EG_TEXTDOMAIN);
?>
</a></li>
		<li><a href="#eg-shortcode-search-wrap"><?php 
_e('ShortCode Search', EG_TEXTDOMAIN);
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:31,代码来源:grid-search.php


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