當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RevSliderBase::stripslashes_deep方法代碼示例

本文整理匯總了PHP中RevSliderBase::stripslashes_deep方法的典型用法代碼示例。如果您正苦於以下問題:PHP RevSliderBase::stripslashes_deep方法的具體用法?PHP RevSliderBase::stripslashes_deep怎麽用?PHP RevSliderBase::stripslashes_deep使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RevSliderBase的用法示例。


在下文中一共展示了RevSliderBase::stripslashes_deep方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_all_navigations

 /**
  * Get all Navigations
  * @since: 5.0
  **/
 public static function get_all_navigations($defaults = true)
 {
     global $wpdb;
     $navigations = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . RevSliderGlobals::TABLE_NAVIGATION_NAME, ARRAY_A);
     foreach ($navigations as $key => $nav) {
         $navigations[$key]['css'] = RevSliderBase::stripslashes_deep(json_decode($navigations[$key]['css'], true));
         $navigations[$key]['markup'] = RevSliderBase::stripslashes_deep(json_decode($navigations[$key]['markup'], true));
         if (isset($navigations[$key]['settings'])) {
             $navigations[$key]['settings'] = RevSliderBase::stripslashes_deep(json_decode($navigations[$key]['settings'], true));
         }
     }
     if ($defaults) {
         $def = self::get_default_navigations();
         if (!empty($def)) {
             foreach ($def as $key => $nav) {
                 $def[$key]['css'] = RevSliderBase::stripslashes_deep(json_decode($def[$key]['css'], true));
                 $def[$key]['markup'] = RevSliderBase::stripslashes_deep(json_decode($def[$key]['markup'], true));
             }
             if (isset($def[$key]['settings'])) {
                 $def[$key]['settings'] = RevSliderBase::stripslashes_deep(json_decode($def[$key]['settings'], true));
             }
             $navigations = array_merge($navigations, $def);
         }
     }
     return $navigations;
 }
開發者ID:SayenkoDesign,項目名稱:ividf,代碼行數:30,代碼來源:navigation.class.php

示例2: get_all_navigations

 /**
  * Get all Navigations
  * @since: 5.0
  **/
 public static function get_all_navigations($defaults = true, $raw = false)
 {
     global $wpdb;
     $navigations = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . RevSliderGlobals::TABLE_NAVIGATION_NAME, ARRAY_A);
     if ($raw == false) {
         foreach ($navigations as $key => $nav) {
             $navigations[$key]['css'] = RevSliderBase::stripslashes_deep(json_decode($navigations[$key]['css'], true));
             $navigations[$key]['markup'] = RevSliderBase::stripslashes_deep(json_decode($navigations[$key]['markup'], true));
             if (isset($navigations[$key]['settings'])) {
                 $navigations[$key]['settings'] = RevSliderBase::stripslashes_deep(json_decode($navigations[$key]['settings'], true));
                 if (!is_array($navigations[$key]['settings'])) {
                     $navigations[$key]['settings'] = json_decode($navigations[$key]['settings'], true);
                 }
             }
         }
     }
     if ($defaults) {
         $def = self::get_default_navigations();
         $default_presets = get_option('revslider-nav-preset-default', array());
         if (!empty($def)) {
             if ($raw == false) {
                 foreach ($def as $key => $nav) {
                     $def[$key]['css'] = RevSliderBase::stripslashes_deep(json_decode($def[$key]['css'], true));
                     $def[$key]['markup'] = RevSliderBase::stripslashes_deep(json_decode($def[$key]['markup'], true));
                     if (isset($def[$key]['settings'])) {
                         $def[$key]['settings'] = RevSliderBase::stripslashes_deep(json_decode($def[$key]['settings'], true));
                         if (!is_array($def[$key]['settings'])) {
                             $def[$key]['settings'] = json_decode($def[$key]['settings'], true);
                         }
                     }
                     //add custom settings (placeholders) to the default navigation
                     if (!empty($default_presets)) {
                         if (!isset($def[$key]['settings'])) {
                             $def[$key]['settings'] = array();
                         }
                         if (!isset($def[$key]['settings']['presets'])) {
                             $def[$key]['settings']['presets'] = array();
                         }
                         foreach ($default_presets as $id => $v) {
                             if ($id !== $def[$key]['id']) {
                                 continue;
                             }
                             foreach ($v as $values) {
                                 $def[$key]['settings']['presets'][] = $values;
                             }
                         }
                     }
                 }
             }
             $navigations = array_merge($navigations, $def);
         }
     }
     return $navigations;
 }
開發者ID:ksan5835,項目名稱:maadithottam,代碼行數:58,代碼來源:navigation.class.php


注:本文中的RevSliderBase::stripslashes_deep方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。