本文整理汇总了PHP中SendPress_Data::unsubscribe_from_list方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::unsubscribe_from_list方法的具体用法?PHP SendPress_Data::unsubscribe_from_list怎么用?PHP SendPress_Data::unsubscribe_from_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::unsubscribe_from_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prerender
function prerender()
{
$r = $_GET['rid'];
$s = $_GET['sid'];
$r = (int) base64_decode($r);
$s = (int) base64_decode($s);
if (is_numeric($r)) {
$lists = get_post_meta($r, '_send_lists', true);
$lists = explode(",", $lists);
foreach ($lists as $list) {
SendPress_Data::unsubscribe_from_list($s, $r, $list);
}
}
$link_data = array("id" => $s, "report" => $r, "urlID" => '0', "view" => "manage", "listID" => "0", "action" => "");
$code = SendPress_Data::encrypt($link_data);
$link = SendPress_Manager::public_url($code);
$this->redirect($link);
exit;
}
示例2: manage_sub_prerender
private static function manage_sub_prerender()
{
$info = self::data();
if (isset($info->action) && $info->action == 'unsubscribe') {
SendPress_Data::unsubscribe_from_list($info->id, $info->report, $info->listID);
$link_data = array("id" => $info->id, "report" => $info->report, "urlID" => '0', "view" => "manage", "listID" => $info->listID, "action" => "");
$code = SendPress_Data::encrypt($link_data);
$link = SendPress_Manager::public_url($code);
//$this->redirect( $link );
//exit;
}
}