當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SendPress_Data::remove_subscriber_status方法代碼示例

本文整理匯總了PHP中SendPress_Data::remove_subscriber_status方法的典型用法代碼示例。如果您正苦於以下問題:PHP SendPress_Data::remove_subscriber_status方法的具體用法?PHP SendPress_Data::remove_subscriber_status怎麽用?PHP SendPress_Data::remove_subscriber_status使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SendPress_Data的用法示例。


在下文中一共展示了SendPress_Data::remove_subscriber_status方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: save

 function save()
 {
     if (isset($_POST['delete-this-user']) && $_POST['delete-this-user'] == 'yes') {
         SendPress_Data::delete_subscriber($_POST['subscriberID']);
         if ($_GET['listID']) {
             SendPress_Admin::redirect('Subscribers_Subscribers', array('listID' => $_GET['listID']));
         } else {
             SendPress_Admin::redirect('Subscribers_All');
         }
     } else {
         global $post;
         $subscriber_info = array('email' => $_POST['email'], 'firstname' => $_POST['firstname'], 'lastname' => $_POST['lastname']);
         SendPress_Data::update_subscriber($_POST['subscriberID'], $subscriber_info);
         $args = array('post_type' => 'sendpress_list', 'post_status' => array('publish', 'draft'), 'posts_per_page' => 100, 'order' => 'ASC', 'orderby' => 'title');
         $postslist = get_posts($args);
         foreach ($postslist as $post) {
             setup_postdata($post);
             if (isset($_POST[$post->ID . "-status"]) && $_POST[$post->ID . "-status"] > 0) {
                 SendPress_Data::update_subscriber_status($post->ID, $_POST['subscriberID'], $_POST[$post->ID . "-status"]);
             } else {
                 SendPress_Data::remove_subscriber_status($post->ID, $_POST['subscriberID']);
             }
             $notifications = SendPress_Data::get_post_notification_types();
             if (isset($_POST[$post->ID . "-pn"]) && array_key_exists($_POST[$post->ID . "-pn"], $notifications)) {
                 SendPress_Data::update_subscriber_meta($_POST['subscriberID'], 'post_notifications', $_POST[$post->ID . "-pn"], $post->ID);
             }
         }
         wp_reset_postdata();
     }
     SendPress_Admin::redirect('Subscribers_Subscriber', array('subscriberID' => $_POST['subscriberID']));
 }
開發者ID:pmatheus,項目名稱:participacao-sitebase,代碼行數:31,代碼來源:class-sendpress-view-subscribers-subscriber.php

示例2: wp_redirect

     }
     wp_redirect(esc_url_raw(admin_url('admin.php?page=' . SPNL()->validate->page($_GET['page']))));
     break;
 case 'delete-subscriber':
     $l = SPNL()->validate->int($_GET['listID']);
     $s = SPNL()->validate->int($_GET['subscriberID']);
     if ($l > 0 && $s > 0) {
         SendPress_Data::remove_subscriber_status($l, $s);
     }
     wp_redirect(esc_url_raw(admin_url('admin.php?page=' . SPNL()->validate->page($_GET['page']) . '&view=subscribers&listID=' . $_GET['listID'])));
     break;
 case 'delete-subscribers-bulk':
     $subscriber_delete = $_GET['subscriber'];
     $list = SPNL()->validate->int($_GET['listID']);
     foreach ($subscriber_delete as $subscriberID) {
         SendPress_Data::remove_subscriber_status($list, SPNL()->validate->int($subscriberID));
     }
     wp_redirect(esc_url_raw(admin_url('admin.php?page=' . SPNL()->validate->page($_GET['page']) . '&view=subscribers&listID=' . $_GET['listID'])));
     break;
 case 'delete-report':
     $r = SPNL()->validate->int($_GET['reportID']);
     if ($r > 0) {
         SendPress_Posts::report_delete($_GET['reportID']);
     }
     wp_redirect(esc_url_raw(admin_url('admin.php?page=' . SPNL()->validate->page($_GET['page']))));
     break;
 case 'delete-reports-bulk':
     $email_delete = $_GET['report'];
     foreach ($email_delete as $emailID) {
         $email = SPNL()->validate->int($emailID);
         if ($email > 0) {
開發者ID:richardsweeney,項目名稱:sendpress,代碼行數:31,代碼來源:sendpress-get-actions.php


注:本文中的SendPress_Data::remove_subscriber_status方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。