本文整理汇总了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))));