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


PHP SendPress_Option::set方法代码示例

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


在下文中一共展示了SendPress_Option::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: save

 function save($post, $sp)
 {
     $options = SendPress_Option::get('notification_options');
     $options['email'] = $post['toemail'];
     $options['notifications-enable'] = array_key_exists('notifications-enable', $post) ? true : false;
     if ($options['notifications-enable']) {
         $options['subscribed'] = $post['subscribed'];
         $options['unsubscribed'] = $post['unsubscribed'];
         $options['send-to-admins'] = array_key_exists('send-to-admins', $post) ? true : false;
     }
     $options['enable-hipchat'] = array_key_exists('enable-hipchat', $post) ? true : false;
     $options['hipchat-api'] = $post['hipchat-api'];
     if (strlen($options['hipchat-api']) > 0) {
         $options['hipchat-rooms'] = array();
         if (!array_key_exists('hipchat-rooms', $post)) {
             $post['hipchat-rooms'] = array();
         }
         global $hc;
         $hc = new SendPress_HipChat($options['hipchat-api'], 'https://api.hipchat.com');
         try {
             foreach ($hc->get_rooms() as $room) {
                 $options['hipchat-rooms'][$room->room_id] = array_key_exists($room->room_id, $post['hipchat-rooms']) ? true : false;
             }
         } catch (Exception $e) {
             $options['hipchat-room'] = $post['hipchat-room'];
         }
     }
     $options = apply_filters('sendpress_notification_settings_save', $options, $post, $sp);
     SendPress_Option::set('notification_options', $options);
     SendPress_Admin::redirect('Settings_Notifications');
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:31,代码来源:class-sendpress-view-settings-notifications.php

示例3: save

 function save($data, $sp)
 {
     $saveid = SPNL()->validate->int($_POST['post_ID']);
     if ($saveid > 0) {
         $bodybg = SPNL()->validate->hex($_POST['body_bg']);
         $bodytext = SPNL()->validate->hex($_POST['body_text']);
         $bodylink = SPNL()->validate->hex($_POST['body_link']);
         $contentbg = SPNL()->validate->hex($_POST['content_bg']);
         $contenttext = SPNL()->validate->hex($_POST['content_text']);
         $contentlink = SPNL()->validate->hex($_POST['sp_content_link_color']);
         $contentborder = SPNL()->validate->hex($_POST['content_border']);
         $upload_image = $_POST['upload_image'];
         $headerbg = SPNL()->validate->hex($_POST['header_bg']);
         $headertextcolor = SPNL()->validate->hex($_POST['header_text_color']);
         $headertext = sanitize_text_field($_POST['header_text']);
         $headerlink = esc_url_raw($_POST['header_link']);
         $imageheaderurl = esc_url_raw($_POST['image_header_url']);
         $subheadertext = sanitize_text_field($_POST['sub_header_text']);
         $activeHeader = $_POST['active_header'];
         update_post_meta($saveid, 'upload_image', $upload_image);
         update_post_meta($saveid, 'body_bg', $bodybg);
         update_post_meta($saveid, 'body_text', $bodytext);
         update_post_meta($saveid, 'body_link', $bodylink);
         update_post_meta($saveid, 'content_bg', $contentbg);
         update_post_meta($saveid, 'content_text', $contenttext);
         update_post_meta($saveid, 'sp_content_link_color', $contentlink);
         update_post_meta($saveid, 'content_border', $contentborder);
         update_post_meta($saveid, 'header_bg', $headerbg);
         update_post_meta($saveid, 'header_text_color', $headertextcolor);
         update_post_meta($saveid, 'header_text', $headertext);
         update_post_meta($saveid, 'header_link', $headerlink);
         update_post_meta($saveid, 'image_header_url', $imageheaderurl);
         update_post_meta($saveid, 'sub_header_text', $subheadertext);
         update_post_meta($saveid, 'active_header', $activeHeader);
         $canspam = sanitize_text_field($_POST['can-spam']);
         $linkedin = '';
         if (isset($_POST['linkedin'])) {
             $linkedin = esc_url_raw($_POST['linkedin']);
         }
         $twitter = '';
         if (isset($_POST['twitter'])) {
             $twitter = esc_url_raw($_POST['twitter']);
         }
         $facebook = '';
         if (isset($_POST['facebook'])) {
             $facebook = esc_url_raw($_POST['facebook']);
         }
         if (isset($_POST['fromname'])) {
             $fromname = sanitize_text_field($_POST['fromname']);
         }
         SendPress_Option::set('canspam', $canspam);
         SendPress_Option::set('linkedin', $linkedin);
         SendPress_Option::set('facebook', $facebook);
         SendPress_Option::set('twitter', $twitter);
     }
     // SendPress_Option::set('unsubscribetext', $unsubtext);
     SendPress_Admin::redirect('Settings_Styles');
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:58,代码来源:class-sendpress-view-settings-styles.php

示例4: send_test_email

 function send_test_email()
 {
     $options = array();
     $options['testemail'] = $_POST['testemail'];
     SendPress_Option::set($options);
     SendPress_Manager::send_test();
     // SendPress_Admin::redirect('Settings_Account');
     // $this->send_test();
     // $this->redirect();
 }
开发者ID:anirut,项目名称:sendpress,代码行数:10,代码来源:class-sendpress-view-settings-account.php

示例5: save

 function save($post, $sp)
 {
     if (isset($post['allow_tracking'])) {
         SendPress_Option::set('allow_tracking', 'yes');
         SendPress_Option::set('feedback', 'yes');
     } else {
         SendPress_Option::set('allow_tracking', 'no');
         SendPress_Option::set('feedback', 'no');
     }
     if (isset($post['old_permalink'])) {
         SendPress_Option::set('old_permalink', true);
     } else {
         SendPress_Option::set('old_permalink', false);
     }
     if (isset($post['skip_mailto'])) {
         SendPress_Option::set('skip_mailto', true);
     } else {
         SendPress_Option::set('skip_mailto', false);
     }
     if (isset($post['enable_email_template_edit'])) {
         SendPress_Option::set('enable_email_template_edit', true);
     } else {
         SendPress_Option::set('enable_email_template_edit', false);
     }
     if (isset($post['prerelease_templates'])) {
         SendPress_Option::set('prerelease_templates', 'yes');
     } else {
         SendPress_Option::set('prerelease_templates', 'no');
     }
     SendPress_Option::set('queue-per-call', $post['queue-per-call']);
     SendPress_Option::set('sync-per-call', $post['sync-per-call']);
     SendPress_Option::set('autocron-per-call', $post['autocron-per-call']);
     SendPress_Option::set('wpcron-per-call', $post['wpcron-per-call']);
     SendPress_Option::set('queue-history', $post['queue-history']);
     if (isset($post['sp_widget_shortdoces'])) {
         SendPress_Option::set('sp_widget_shortdoces', $post['sp_widget_shortdoces']);
     }
     $widget_options = array();
     $widget_options['widget_options']['load_css'] = 0;
     $widget_options['widget_options']['load_ajax'] = 0;
     $widget_options['widget_options']['load_scripts_in_footer'] = 0;
     if (isset($_POST['load_css'])) {
         $widget_options['widget_options']['load_css'] = $_POST['load_css'];
     }
     if (isset($_POST['load_ajax'])) {
         $widget_options['widget_options']['load_ajax'] = $_POST['load_ajax'];
     }
     if (isset($_POST['load_scripts_in_footer'])) {
         $widget_options['widget_options']['load_scripts_in_footer'] = $_POST['load_scripts_in_footer'];
     }
     SendPress_Option::set($widget_options);
     SendPress_Admin::redirect('Settings_Advanced');
 }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:53,代码来源:class-sendpress-view-settings-advanced.php

示例6: save

 function save($post, $sp)
 {
     $icon_list = SendPress_Data::social_icons();
     $links = array();
     foreach ($icon_list as $key => $value) {
         if (isset($_POST["url-" . $key]) && $_POST["url-" . $key] != "") {
             $links[$key] = $_POST["url-" . $key];
         }
     }
     SendPress_Option::set('socialicons', $links);
     SendPress_Option::set('socialsize', $_POST['icon-view']);
     //SendPress_Admin::redirect('Settings_Advanced');
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:13,代码来源:class-sendpress-view-emails-social.php

示例7: module_deactivate_sendpress_pro

 function module_deactivate_sendpress_pro()
 {
     $path = $_POST['plugin_path'];
     $pro_options = SendPress_Option::get('pro_plugins');
     if (!preg_match('/sendpress-pro.php/i', $path)) {
         if (preg_match('/sendpress-pro/i', $path)) {
             //make sure the plugin loads from sendpress pro
             $pro_options[$path] = false;
             SendPress_Option::set('pro_plugins', $pro_options);
         }
     } else {
         deactivate_plugins($path);
     }
 }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:14,代码来源:class-sendpress-view-pro.php

示例8: save

 function save()
 {
     SendPress_Option::set('send_optin_email', $_POST['optin']);
     SendPress_Option::set('optin_subject', $_POST['subject']);
     SendPress_Option::set('confirm-page', $_POST['confirm-page']);
     SendPress_Option::set('confirm-page-id', $_POST['confirm-page-id']);
     SendPress_Option::set('confirm-notification-template', $_POST['confirm-notification-template']);
     SendPress_Option::set('manage-page', $_POST['manage-page']);
     SendPress_Option::set('manage-page-id', $_POST['manage-page-id']);
     SendPress_Option::set('try-theme', $_POST['try-theme']);
     $optin = SendPress_Data::get_template_id_by_slug('double-optin');
     /*
     $dpost = get_post($optin);
     $dpost->post_content = $_POST['body'];
     $dpost->post_title = $_POST['subject'];
     */
     $my_post = array('ID' => $optin, 'post_content' => $_POST['body'], 'post_title' => $_POST['subject']);
     wp_update_post($my_post);
     update_post_meta($optin, '_sendpress_template', $_POST['confirm-notification-template']);
     SendPress_Admin::redirect('Settings_Activation');
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:21,代码来源:class-sendpress-view-settings-activation.php

示例9: html

    function html($sp)
    {
        SendPress_Tracking::event('Queue Tab');
        $testListTable = new SendPress_Queue_Errors_Table();
        $testListTable->prepare_items();
        SendPress_Option::set('no_cron_send', 'false');
        $sp->cron_start();
        $open_info = array("id" => 13, "report" => 10, "view" => "open");
        ?>

	<h2><?php 
        _e('Error history for the last 2 Weeks', 'sendpress');
        ?>
.</h2>

	<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
	<form id="email-filter" action="<?php 
        echo SendPress_Admin::link('Queue_Errors');
        ?>
" method="get">
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
	     <input type="hidden" name="page" value="<?php 
        echo SPNL()->validate->page($_REQUEST['page']);
        ?>
" /> 
	    <!-- Now we can render the completed list table -->
	    <?php 
        $testListTable->display();
        ?>
	    <?php 
        wp_nonce_field($sp->_nonce_value);
        ?>
	</form>
	<br>
	
<?php 
    }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:37,代码来源:class-sendpress-view-queue-errors.php

示例10: enqueue

 /**
  * Enqueue styles and scripts needed for the pointers.
  */
 function enqueue()
 {
     if (!current_user_can('manage_options')) {
         return;
     }
     SendPress_Option::set('allow_tracking', '');
     $track = SendPress_Option::get('allow_tracking');
     $tour = false;
     //SendPress_Option::get( 'intro_tour' );
     if (($track == false || $track == '') && !isset($_GET['allow_tracking'])) {
         wp_enqueue_style('wp-pointer');
         wp_enqueue_script('jquery-ui');
         wp_enqueue_script('wp-pointer');
         wp_enqueue_script('utils');
         add_action('admin_print_footer_scripts', array($this, 'tracking_request'));
     } else {
         if ($tour == 'false' || $tour == false) {
             /*
             add_action( 'admin_print_footer_scripts', array( $this, 'intro_tour' ) );
             add_action( 'admin_head', array( $this, 'admin_head' ) );
             */
         }
     }
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:27,代码来源:class-sendpress-tour.php

示例11: send_email

 function send_email($to, $subject, $html, $text, $istest = false, $sid, $list_id, $report_id)
 {
     $phpmailer = new SendPress_PHPMailer();
     /*
      * Make sure the mailer thingy is clean before we start,  should not
      * be necessary, but who knows what others are doing to our mailer
      */
     $phpmailer->ClearAddresses();
     $phpmailer->ClearAllRecipients();
     $phpmailer->ClearAttachments();
     $phpmailer->ClearBCCs();
     $phpmailer->ClearCCs();
     $phpmailer->ClearCustomHeaders();
     $phpmailer->ClearReplyTos();
     $charset = SendPress_Option::get('email-charset', 'UTF-8');
     $encoding = SendPress_Option::get('email-encoding', '8bit');
     $phpmailer->CharSet = $charset;
     $phpmailer->Encoding = $encoding;
     if ($charset != 'UTF-8') {
         $html = $this->change($html, 'UTF-8', $charset);
         $text = $this->change($text, 'UTF-8', $charset);
         $subject = $this->change($subject, 'UTF-8', $charset);
     }
     $from_email = SendPress_Option::get('fromemail');
     $phpmailer->From = $from_email;
     $phpmailer->FromName = SendPress_Option::get('fromname');
     //$subject = str_replace(array('’','“','�','–'),array("'",'"','"','-'),$subject);
     //$html = str_replace(chr(194),chr(32),$html);
     //$text = str_replace(chr(194),chr(32),$text);
     //return $email;
     $phpmailer->AddAddress(trim($to));
     $phpmailer->AltBody = $text;
     $phpmailer->Subject = $subject;
     $content_type = 'text/html';
     $phpmailer->MsgHTML($html);
     $phpmailer->ContentType = $content_type;
     // Set whether it's plaintext, depending on $content_type
     //if ( 'text/html' == $content_type )
     $phpmailer->IsHTML(true);
     $hosting = SendPress_Option::get('website-hosting-provider');
     if ($hosting == 'godaddy') {
         // We are sending SMTP mail
         $phpmailer->IsSMTP();
         // Set the other options
         $phpmailer->Host = 'relay-hosting.secureserver.net';
     }
     // If we don't have a charset from the input headers
     //if ( !isset( $charset ) )
     //$charset = get_bloginfo( 'charset' );
     // Set the content-type and charset
     /**
      * We'll let php init mess with the message body and headers.  But then
      * we stomp all over it.  Sorry, my plug-inis more important than yours :)
      */
     do_action_ref_array('phpmailer_init', array(&$phpmailer));
     //$phpmailer->Sender = 'bounce@sendpress.com';//SendPress_Option::get('fromemail');
     $hdr = new SendPress_SendGrid_SMTP_API();
     $hdr->addFilterSetting('dkim', 'domain', SendPress_Manager::get_domain_from_email($from_email));
     //$phpmailer->AddCustomHeader( sprintf( 'X-SP-MID: %s',$email->messageID ) );
     $phpmailer->AddCustomHeader(sprintf('X-SMTPAPI: %s', $hdr->asJSON()));
     $phpmailer->AddCustomHeader('X-SP-METHOD: website');
     // Set SMTPDebug to 2 will collect dialogue between us and the mail server
     $phpmailer->AddCustomHeader('X-SP-LIST: ' . $list_id);
     $phpmailer->AddCustomHeader('X-SP-REPORT: ' . $report_id);
     $phpmailer->AddCustomHeader('X-SP-SUBSCRIBER: ' . $sid);
     if ($istest == true) {
         $phpmailer->SMTPDebug = 2;
         // Start output buffering to grab smtp output
         ob_start();
     }
     // Send!
     $result = true;
     // start with true, meaning no error
     $result = @$phpmailer->Send();
     //$phpmailer->SMTPClose();
     if ($istest == true) {
         // Grab the smtp debugging output
         $smtp_debug = ob_get_clean();
         SendPress_Option::set('phpmailer_error', $phpmailer->ErrorInfo);
         SendPress_Option::set('last_test_debug', $smtp_debug);
         //$this->last_send_smtp_debug = $smtp_debug;
     }
     if ($result != true) {
         $log_message = 'Website <br>';
         $log_message .= $to . "<br>";
         if ($istest == true) {
             $log_message .= "<br><br>";
             $log_message .= $smtp_debug;
         }
         //$phpmailer->ErrorInfo
         SPNL()->log->add($phpmailer->ErrorInfo, $log_message, 0, 'sending');
     }
     if ($result != true && $istest == true) {
         $hostmsg = 'host: ' . $phpmailer->Host . '  port: ' . $phpmailer->Port . '  secure: ' . $phpmailer->SMTPSecure . '  auth: ' . $phpmailer->SMTPAuth . '  user: ' . $phpmailer->Username . "  pass: *******\n";
         $msg = '';
         $msg .= __('The result was: ', 'sendpress') . $result . "\n";
         $msg .= __('The mailer error info: ', 'sendpress') . $phpmailer->ErrorInfo . "\n";
         $msg .= $hostmsg;
         $msg .= __("The SMTP debugging output is shown below:\n", "sendpress");
         $msg .= $smtp_debug . "\n";
//.........这里部分代码省略.........
开发者ID:radscheit,项目名称:unicorn,代码行数:101,代码来源:class-sendpress-sender-website.php

示例12: html

    function html($sp)
    {
        ?>
  <?php 
        if (SendPress_Option::get('import_error', false) == true) {
            ?>
	<div class="alert alert-danger">
  <?php 
            _e('We had a problem saving your upload', 'sendpress');
            ?>
.
  </div>
  <?php 
        }
        ?>
  <div id="taskbar" class="lists-dashboard rounded group"> 
	<h2><?php 
        _e('Import CSV to ', 'sendpress');
        echo get_the_title($_GET['listID']);
        ?>
</h2>
	</div>
<div class="boxer">
	<div class="boxer-inner">
	<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
	<form method="post" enctype="multipart/form-data" accept-charset="utf-8" >
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
	    <input type="hidden" name="listID" value="<?php 
        echo SPNL()->validate->int($_GET['listID']);
        ?>
" />
	   	<table>
	   	<tr>
    <td class="left_label"> <?php 
        echo $label;
        ?>
    </td>
    <td>
        <input type="file" name="uploadfiles[]" id="uploadfiles" size="35" class="uploadfiles" />
        <input class="button-primary" type="submit" name="uploadfile" id="uploadfile_btn" value="Upload"  />
     
    </td>
  </tr> 
 	</table>
   
<?php 
        SendPress_Option::set('import_error', false);
        SendPress_Data::nonce_field();
        ?>
	   </form>
</div>
</div>
<?php 
    }
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:54,代码来源:class-sendpress-view-subscribers-csvimport.php

示例13: wp_update_post

        $my_post['post_title'] = $_POST['post_title'];
        */
        $my_post['post_status'] = 'publish';
        // Update the post into the database
        wp_update_post($my_post);
        update_post_meta($my_post['ID'], '_sendpress_subject', $_POST['post_subject']);
        update_post_meta($my_post['ID'], '_sendpress_template', $_POST['template']);
        update_post_meta($my_post['ID'], '_sendpress_status', 'private');
        SendPress_Email::set_default_style($my_post['ID']);
        //clear the cached file.
        delete_transient('sendpress_email_html_' . $my_post['ID']);
        $this->save_redirect($_POST);
        break;
    case 'temaplte-widget-settings':
        $widget_options = array();
        $widget_options['widget_options']['load_css'] = 0;
        $widget_options['widget_options']['load_ajax'] = 0;
        $widget_options['widget_options']['load_scripts_in_footer'] = 0;
        if (isset($_POST['load_css'])) {
            $widget_options['widget_options']['load_css'] = $_POST['load_css'];
        }
        if (isset($_POST['load_ajax'])) {
            $widget_options['widget_options']['load_ajax'] = $_POST['load_ajax'];
        }
        if (isset($_POST['load_scripts_in_footer'])) {
            $widget_options['widget_options']['load_scripts_in_footer'] = $_POST['load_scripts_in_footer'];
        }
        SendPress_Option::set($widget_options);
        wp_redirect(esc_url_raw(admin_url('admin.php?page=sp-settings&view=widget')));
        break;
}
开发者ID:richardsweeney,项目名称:sendpress,代码行数:31,代码来源:sendpress-post-actions.php

示例14: create_default_form

 static function create_default_form($type = 'signup')
 {
     //SendPress_Option::set('default-signup-widget-settings',null);
     $postid = SendPress_Option::get('default-' . $type . '-widget-settings');
     $hasPost = false;
     if (!empty($postid)) {
         $hasPost = true;
         $query = array();
         /*
         			$query =  get_posts(array(
         				'post_type'=>'sp_settings',
         				'post_status'=>'any',
         				'p'=>$postid
         			));
         */
         if (count($query) === 0) {
             $hasPost = false;
             $xposts = get_posts(array('post_type' => 'sp_settings', 'post_status' => 'any', 'orderby' => 'ID', 'order' => 'ASC'));
             foreach ($xposts as $pchecks) {
                 if ($pchecks->post_title == 'Default Signup Settings') {
                     $hasPost = true;
                     SendPress_Option::set('default-signup-widget-settings', $pchecks->ID);
                 }
                 //Default Signup Settings
             }
         }
     }
     if (!$hasPost) {
         switch ($type) {
             case 'signup':
                 $postid = SendPress_Data::create_settings_post("Default Signup Settings", SendPress_Data::signup_defaults());
                 SendPress_Option::set('default-' . $type . '-widget-settings', $postid);
                 break;
         }
     }
 }
开发者ID:pedro-mendonca,项目名称:sendpress,代码行数:36,代码来源:class-sendpress-data.php

示例15: save

 function save($data, $sp)
 {
     $saveid = $_POST['post_ID'];
     $bodybg = $_POST['body_bg'];
     $bodytext = $_POST['body_text'];
     $bodylink = $_POST['body_link'];
     $contentbg = $_POST['content_bg'];
     $contenttext = $_POST['content_text'];
     $contentlink = $_POST['sp_content_link_color'];
     $contentborder = $_POST['content_border'];
     $upload_image = $_POST['upload_image'];
     $headerbg = $_POST['header_bg'];
     $headertextcolor = $_POST['header_text_color'];
     $headertext = $_POST['header_text'];
     $headerlink = $_POST['header_link'];
     $imageheaderurl = $_POST['image_header_url'];
     $subheadertext = $_POST['sub_header_text'];
     $activeHeader = $_POST['active_header'];
     update_post_meta($saveid, 'upload_image', $upload_image);
     update_post_meta($saveid, 'body_bg', $bodybg);
     update_post_meta($saveid, 'body_text', $bodytext);
     update_post_meta($saveid, 'body_link', $bodylink);
     update_post_meta($saveid, 'content_bg', $contentbg);
     update_post_meta($saveid, 'content_text', $contenttext);
     update_post_meta($saveid, 'sp_content_link_color', $contentlink);
     update_post_meta($saveid, 'content_border', $contentborder);
     update_post_meta($saveid, 'header_bg', $headerbg);
     update_post_meta($saveid, 'header_text_color', $headertextcolor);
     update_post_meta($saveid, 'header_text', $headertext);
     update_post_meta($saveid, 'header_link', $headerlink);
     update_post_meta($saveid, 'image_header_url', $imageheaderurl);
     update_post_meta($saveid, 'sub_header_text', $subheadertext);
     update_post_meta($saveid, 'active_header', $activeHeader);
     $canspam = $_POST['can-spam'];
     $linkedin = '';
     if (isset($_POST['linkedin'])) {
         $linkedin = $_POST['linkedin'];
     }
     $twitter = '';
     if (isset($_POST['twitter'])) {
         $twitter = $_POST['twitter'];
     }
     $facebook = '';
     if (isset($_POST['facebook'])) {
         $facebook = $_POST['facebook'];
     }
     if (isset($_POST['fromname'])) {
         $fromname = $_POST['fromname'];
     }
     // From email and name
     // If we don't have a name from the input headers
     if (!isset($fromname) || $fromname == '') {
         $fromname = get_bloginfo('name');
     }
     if (isset($_POST['fromemail'])) {
         $fromemail = $_POST['fromemail'];
     }
     if (!isset($fromemail) || $fromemail == '') {
         // Get the site domain and get rid of www.
         $sitename = strtolower($_SERVER['SERVER_NAME']);
         if (substr($sitename, 0, 4) == 'www.') {
             $sitename = substr($sitename, 4);
         }
         $fromemail = 'wordpress@' . $sitename;
     }
     SendPress_Option::set('canspam', $canspam);
     SendPress_Option::set('linkedin', $linkedin);
     SendPress_Option::set('facebook', $facebook);
     SendPress_Option::set('twitter', $twitter);
     // SendPress_Option::set('unsubscribetext', $unsubtext);
     SendPress_Admin::redirect('Settings_Styles');
 }
开发者ID:radscheit,项目名称:unicorn,代码行数:72,代码来源:class-sendpress-view-settings-styles.php


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