本文整理汇总了PHP中GFNotification::delete_notification方法的典型用法代码示例。如果您正苦于以下问题:PHP GFNotification::delete_notification方法的具体用法?PHP GFNotification::delete_notification怎么用?PHP GFNotification::delete_notification使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFNotification
的用法示例。
在下文中一共展示了GFNotification::delete_notification方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: maybe_process_notification_list_action
public static function maybe_process_notification_list_action()
{
if (empty($_POST) || !check_admin_referer('gform_notification_list_action', 'gform_notification_list_action')) {
return;
}
$action = rgpost('action');
$object_id = rgpost('action_argument');
switch ($action) {
case 'delete':
$notification_deleted = GFNotification::delete_notification($object_id, rgget('id'));
if ($notification_deleted) {
GFCommon::add_message(__('Notification deleted.', 'gravityforms'));
} else {
GFCommon::add_error_message(__('There was an issue deleting this notification.', 'gravityforms'));
}
break;
case 'duplicate':
$notification_duplicated = GFNotification::duplicate_notification($object_id, rgget('id'));
if ($notification_duplicated) {
GFCommon::add_message(__('Notification duplicates.', 'gravityforms'));
} else {
GFCommon::add_error_message(__('There was an issue duplicating this notification.', 'gravityforms'));
}
break;
}
}