当前位置: 首页>>代码示例>>PHP>>正文


PHP SendPress_Data::subscriber_csv_post_to_array方法代码示例

本文整理汇总了PHP中SendPress_Data::subscriber_csv_post_to_array方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::subscriber_csv_post_to_array方法的具体用法?PHP SendPress_Data::subscriber_csv_post_to_array怎么用?PHP SendPress_Data::subscriber_csv_post_to_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SendPress_Data的用法示例。


在下文中一共展示了SendPress_Data::subscriber_csv_post_to_array方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 function save()
 {
     if (isset($_POST['send-date']) && $_POST['send-date'] == 'later') {
         $send_at = $_POST['date-pickit'] . " " . $_POST['send-later-time'];
     } else {
         $send_at = '0000-00-00 00:00:00';
     }
     if (isset($_POST['test-add'])) {
         $csvadd = "email,firstname,lastname\n" . trim($_POST['test-add']);
         $data = SendPress_Data::subscriber_csv_post_to_array($csvadd);
     } else {
         $data = false;
     }
     $listids = isset($_POST['listIDS']) ? $_POST['listIDS'] : array();
     SendPress_Option::set('current_send_' . $_POST['post_ID'], array('listIDS' => $listids, 'testemails' => $data, 'send_at' => $send_at));
     SendPress_Option::set('current_send_subject_' . $_POST['post_ID'], $_POST['post_subject']);
     if (isset($_POST['test_report'])) {
         update_post_meta($_POST['post_ID'], 'istest', true);
     } else {
         update_post_meta($_POST['post_ID'], 'istest', false);
     }
     if (isset($_POST['google-campaign-name'])) {
         update_post_meta($_POST['post_ID'], 'google-campaign-name', $_POST['google-campaign-name']);
     }
     if (isset($_POST['submit']) && $_POST['submit'] == 'save-next') {
         SendPress_Admin::redirect('Emails_Send_Confirm', array('emailID' => $_GET['emailID']));
     } else {
         SendPress_Admin::redirect('Emails_Style', array('emailID' => $_GET['emailID']));
     }
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:30,代码来源:class-sendpress-view-emails-send.php

示例2: create_subscribers

 function create_subscribers()
 {
     $csvadd = "email,firstname,lastname\n" . trim($_POST['csv-add']);
     $listID = SPNL()->validate->int($_POST['listID']);
     if ($listID > 0) {
         $newsubscribers = SendPress_Data::subscriber_csv_post_to_array($csvadd);
         foreach ($newsubscribers as $subscriberx) {
             if (is_email(trim($subscriberx['email']))) {
                 $result = SendPress_Data::add_subscriber(array('firstname' => trim($subscriberx['firstname']), 'email' => trim($subscriberx['email']), 'lastname' => trim($subscriberx['lastname'])));
                 SendPress_Data::update_subscriber_status($listID, $result, 2, false);
             }
         }
     }
     wp_redirect(esc_url_raw(admin_url('admin.php?page=' . SPNL()->validate->page($_GET['page']) . "&view=subscribers&listID=" . $listID)));
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:15,代码来源:class-sendpress-view-subscribers-add.php

示例3: subscriber_csv_post_to_array

 function subscriber_csv_post_to_array($csv, $delimiter = ',', $enclosure = '"', $escape = '\\', $terminator = "\n")
 {
     return SendPress_Data::subscriber_csv_post_to_array($csv, $delimiter, $enclosure, $escape, $terminator);
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:4,代码来源:sendpress.php


注:本文中的SendPress_Data::subscriber_csv_post_to_array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。