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


PHP RevSliderNavigation::delete_preset方法代碼示例

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


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

示例1: onAjaxAction


//.........這裏部分代碼省略.........
                     if ($staticID !== false) {
                         $msl = new RevSliderSlide();
                         if (strpos($staticID, 'static_') === false) {
                             $staticID = 'static_' . $slider->getID();
                         }
                         $msl->initByID($staticID);
                         if ($msl->getID() !== '') {
                             $slides[$msl->getID()]['layers'] = $msl->getLayers();
                             $slides[$msl->getID()]['params'] = $msl->getParams();
                             $slides[$msl->getID()]['params']['title'] = __('Static Slide', 'revslider');
                         }
                     }
                 }
                 if (!empty($slides)) {
                     self::ajaxResponseData(array('slides' => $slides));
                 } else {
                     self::ajaxResponseData('');
                 }
                 break;
             case "create_navigation_preset":
                 $nav = new RevSliderNavigation();
                 $return = $nav->add_preset($data);
                 if ($return === true) {
                     self::ajaxResponseSuccess(__('Navigation preset saved/updated', 'revslider'), array('navs' => $nav->get_all_navigations()));
                 } else {
                     if ($return === false) {
                         $return = __('Preset could not be saved/values are the same', 'revslider');
                     }
                     self::ajaxResponseError($return);
                 }
                 break;
             case "delete_navigation_preset":
                 $nav = new RevSliderNavigation();
                 $return = $nav->delete_preset($data);
                 if ($return) {
                     self::ajaxResponseSuccess(__('Navigation preset deleted', 'revslider'), array('navs' => $nav->get_all_navigations()));
                 } else {
                     if ($return === false) {
                         $return = __('Preset not found', 'revslider');
                     }
                     self::ajaxResponseError($return);
                 }
                 break;
             case "toggle_slide_state":
                 $currentState = $slide->toggleSlideStatFromData($data);
                 self::ajaxResponseData(array("state" => $currentState));
                 break;
             case "toggle_hero_slide":
                 $currentHero = $slider->setHeroSlide($data);
                 self::ajaxResponseSuccess(__('Slide is now the new active Hero Slide', 'revslider'));
                 break;
             case "slide_lang_operation":
                 $responseData = $slide->doSlideLangOperation($data);
                 self::ajaxResponseData($responseData);
                 break;
             case "update_general_settings":
                 $operations->updateGeneralSettings($data);
                 self::ajaxResponseSuccess(__("General settings updated", 'revslider'));
                 break;
             case "fix_database_issues":
                 update_option('revslider_change_database', true);
                 RevSliderFront::createDBTables();
                 self::ajaxResponseSuccess(__('Database structure creation/update done', 'revslider'));
                 break;
             case "update_posts_sortby":
                 $slider->updatePostsSortbyFromData($data);
開發者ID:ksan5835,項目名稱:maadithottam,代碼行數:67,代碼來源:revslider-admin.class.php


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