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