本文整理匯總了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;
}
}