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


PHP SendPress_Option::base_get方法代碼示例

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


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

示例1: save

 function save()
 {
     $_POST['post_type'] = SendPress_Data::email_post_type();
     // Update post 37 (37!)
     $my_post = _wp_translate_postdata(true);
     $system_emails = SendPress_Option::base_get('system-emails');
     $my_post['post_status'] = 'sp-systememail';
     $my_post['post_content'] = SendPress_Data::get_sysemail_content($_POST['email_type']);
     // 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');
     update_post_meta($my_post['ID'], '_sendpress_system', 'new');
     update_post_meta($my_post['ID'], '_system_email_type', $_POST['email_type']);
     update_post_meta($my_post['ID'], '_system_default', $_POST['default']);
     if ($_POST['default']) {
         //set default system e-mail for this type
         SendPress_Data::set_system_email_default($my_post['ID'], $_POST['email_type']);
     }
     SendPress_Email::set_default_style($my_post['ID']);
     //clear the cached file.
     delete_transient('sendpress_email_html_' . $my_post['ID']);
     if (!in_array($_POST['email_type'], $system_emails)) {
         $system_emails[] = $_POST['email_type'];
     }
     SendPress_Option::base_set('system-emails', $system_emails);
     SendPress_Admin::redirect('Settings_Emailedit', array('emailID' => $my_post['ID']));
     //$this->save_redirect( $_POST  );
 }
開發者ID:pmatheus,項目名稱:participacao-sitebase,代碼行數:30,代碼來源:class-sendpress-view-settings-systememailcreate.php

示例2: get_system_email_types

 static function get_system_email_types()
 {
     $system_emails = SendPress_Option::base_get('system-emails');
     $defaults = array("opt_in" => "Opt In", "manage_subscriptions" => "Manage Subscriptions");
     //remove manage subscription for now so i can work on other things
     unset($defaults['manage_subscriptions']);
     return $defaults;
 }
開發者ID:pedro-mendonca,項目名稱:sendpress,代碼行數:8,代碼來源:class-sendpress-data.php

示例3: get_system_email_types

 static function get_system_email_types()
 {
     $system_emails = SendPress_Option::base_get('system-emails');
     $defaults = array("opt_in" => "Opt In", "manage_subscriptions" => "Manage Subscriptions");
     // foreach ($system_emails as $key => $value) {
     // 	unset($defaults[$value]);
     // }
     // if(count($defaults) === 0){
     // 	return false;
     // }
     return $defaults;
 }
開發者ID:pmatheus,項目名稱:participacao-sitebase,代碼行數:12,代碼來源:class-sendpress-data.php

示例4: maybe_upgrade

 function maybe_upgrade()
 {
     //SendPress::update_templates();
     $current_version = SendPress_Option::get('version', '0');
     //SendPress_Error::log($current_version);
     if (version_compare($current_version, SENDPRESS_VERSION, '==')) {
         return;
     }
     $current_version_base = SendPress_Option::base_get('version', '0');
     if (version_compare($current_version_base, SENDPRESS_VERSION, '==')) {
         return;
     }
     SendPress_DB_Tables::install();
     @SPNL()->db->subscribers_tracker->create_table();
     @SPNL()->db->subscribers_url->create_table();
     @SPNL()->db->url->create_table();
     SendPress_Option::base_set('update-info', 'show');
     //On version change update default template
     $this->set_template_default();
     SendPress_Template_Manager::update_template_content();
     //SendPress_Data::create_default_form();
     SendPress_Option::check_for_keys();
     if (version_compare($current_version, '0.8.6', '<')) {
         $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;
         SendPress_Option::set($widget_options);
     }
     if (version_compare($current_version, '0.8.7.5', '<')) {
         SendPress_Data::set_double_optin_content();
     }
     if (version_compare($current_version, '0.8.8', '<')) {
         $pro_plugins = array();
         $pro_plugins['pro_plugins']['setup_value'] = false;
         SendPress_Option::set($pro_plugins);
     }
     if (version_compare($current_version, '0.9.3', '<')) {
         $options = SendPress_Option::get('notification_options');
         $new_options = array('email' => '', 'name' => '', 'notifications-enable' => false, 'notifications-subscribed-instant' => false, 'notifications-subscribed-daily' => false, 'notifications-subscribed-weekly' => false, 'notifications-subscribed-monthly' => false, 'notifications-unsubscribed-instant' => false, 'notifications-unsubscribed-daily' => false, 'notifications-unsubscribed-weekly' => false, 'notifications-unsubscribed-monthly' => false);
         if ($options === false || $options === '') {
             SendPress_Option::set('notification_options', $new_options);
         } else {
             if (is_array($options)) {
                 $result = array_merge($new_options, $options);
                 SendPress_Option::set('notification_options', $result);
             }
         }
     }
     /*
     
     if(version_compare( $current_version, '0.9.4.7', '<' )){
     	SendPress_Data::update_tables_0947();
     }
     if(version_compare( $current_version, '0.9.5.2', '<' )){
     	SendPress_Data::update_tables_0952();
     }
     
     if(version_compare( $current_version, '0.9.5.4', '<' )){
     	SendPress_Data::update_tables_0954();
     }
     */
     if (version_compare($current_version, '0.9.6', '<')) {
         $options = SendPress_Option::get('notification_options');
         $new_options = array('email' => '', 'notifications-enable' => false, 'subscribed' => 1, 'unsubscribed' => 1, 'send-to-admins' => false, 'enable-hipchat' => false, 'hipchat-api' => '', 'hipchat-room' => '', 'post-notifications-enable' => false, 'post-notification-subject' => '');
         if ($options === false || $options === '') {
             SendPress_Option::set('notification_options', $new_options);
         } else {
             if (is_array($options)) {
                 $result = array_merge($new_options, $options);
                 SendPress_Option::set('notification_options', $result);
             }
         }
     }
     if (version_compare($current_version, '0.9.9', '<')) {
         $link = SendPress_Option::get('socialicons');
         if ($twit = SendPress_Option::get('twitter')) {
             $link['Twitter'] = $twit;
         }
         if ($fb = SendPress_Option::get('facebook')) {
             $link['Facebook'] = $fb;
         }
         if ($ld = SendPress_Option::get('linkedin')) {
             $link['LinkedIn'] = $ld;
         }
         SendPress_Option::set('socialicons', $link);
     }
     /*
     		if( version_compare( $current_version, '0.9.9.8', '<' ) && SendPress_Option::get('autocron','no') == 'yes' ){
     			$email = get_option( 'admin_email' );
     			$url = "http://api.sendpress.com/senddiscountcode/".md5($_SERVER['SERVER_NAME']."|".$email)."/".$email;
     			wp_remote_get( $url );
     		}
     */
     $update_options_sp = array();
     if (isset($_GET['sendpress_ignore_087']) && '0' == $_GET['sendpress_ignore_087']) {
         $update_options_sp['sendpress_ignore_087'] = 'true';
         //SendPress_Option::set('sendpress_ignore_087', 'true');
     }
     //dadd_action('admin_notices', array($this,'sendpress_ignore_087'));
//.........這裏部分代碼省略.........
開發者ID:pmatheus,項目名稱:participacao-sitebase,代碼行數:101,代碼來源:sendpress.php


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