本文整理汇总了PHP中RevSliderNavigation::create_update_navigation方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderNavigation::create_update_navigation方法的具体用法?PHP RevSliderNavigation::create_update_navigation怎么用?PHP RevSliderNavigation::create_update_navigation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderNavigation
的用法示例。
在下文中一共展示了RevSliderNavigation::create_update_navigation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAjaxAction
//.........这里部分代码省略.........
}
} else {
self::ajaxResponseError(__('No Email given', 'revslider'));
}
break;
case "unsubscribe_to_newsletter":
if (isset($data['email']) && !empty($data['email'])) {
$return = ThemePunch_Newsletter::unsubscribe($data['email']);
if ($return !== false) {
if (!isset($return['status']) || $return['status'] === 'error') {
$error = isset($return['message']) && !empty($return['message']) ? $return['message'] : __('Invalid Email', 'revslider');
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);
}