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


PHP RevSliderNavigation::delete_navigation方法代碼示例

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


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

示例1: onAjaxAction


//.........這裏部分代碼省略.........
                             self::ajaxResponseError($error);
                         } else {
                             self::ajaxResponseSuccess(__("Success! Please check your Emails to finish the process", 'revslider'), $return);
                         }
                     } else {
                         self::ajaxResponseError(__('Invalid Email/Could not connect to the Newsletter server', 'revslider'));
                     }
                 } else {
                     self::ajaxResponseError(__('No Email given', 'revslider'));
                 }
                 break;
             case 'change_specific_navigation':
                 $nav = new RevSliderNavigation();
                 $found = false;
                 $navigations = $nav->get_all_navigations();
                 foreach ($navigations as $navig) {
                     if ($data['id'] == $navig['id']) {
                         $found = true;
                         break;
                     }
                 }
                 if ($found) {
                     $nav->create_update_navigation($data, $data['id']);
                 } else {
                     $nav->create_update_navigation($data);
                 }
                 self::ajaxResponseSuccess(__('Navigation saved/updated', 'revslider'), array('navs' => $nav->get_all_navigations()));
                 break;
             case 'change_navigations':
                 $nav = new RevSliderNavigation();
                 $nav->create_update_full_navigation($data);
                 self::ajaxResponseSuccess(__('Navigations updated', 'revslider'), array('navs' => $nav->get_all_navigations()));
                 break;
             case 'delete_navigation':
                 $nav = new RevSliderNavigation();
                 if (isset($data) && intval($data) > 0) {
                     $return = $nav->delete_navigation($data);
                     if ($return !== true) {
                         self::ajaxResponseError($return);
                     } else {
                         self::ajaxResponseSuccess(__('Navigation deleted', 'revslider'), array('navs' => $nav->get_all_navigations()));
                     }
                 }
                 self::ajaxResponseError(__('Wrong ID given', 'revslider'));
                 break;
             case "get_facebook_photosets":
                 if (!empty($data['url'])) {
                     $facebook = new RevSliderFacebook();
                     $return = $facebook->get_photo_set_photos_options($data['url'], $data['album'], $data['app_id'], $data['app_secret']);
                     if (!empty($return)) {
                         self::ajaxResponseSuccess(__('Successfully fetched Facebook albums', 'revslider'), array('html' => implode(' ', $return)));
                     } else {
                         $error = __('Could not fetch Facebook albums', 'revslider');
                         self::ajaxResponseError($error);
                     }
                 } else {
                     self::ajaxResponseSuccess(__('Cleared Albums', 'revslider'), array('html' => implode(' ', $return)));
                 }
                 break;
             case "get_flickr_photosets":
                 if (!empty($data['url']) && !empty($data['key'])) {
                     $flickr = new RevSliderFlickr($data['key']);
                     $user_id = $flickr->get_user_from_url($data['url']);
                     $return = $flickr->get_photo_sets($user_id, $data['count'], $data['set']);
                     if (!empty($return)) {
                         self::ajaxResponseSuccess(__('Successfully fetched flickr photosets', 'revslider'), array("data" => array('html' => implode(' ', $return))));
開發者ID:zruiz,項目名稱:NG,代碼行數:67,代碼來源:revslider-admin.class.php


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