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


PHP SendPress_Data::email_post_type方法代碼示例

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


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

示例1: html

    function html()
    {
        do_action('sendpress_event', 'Create Email');
        $post = get_default_post_to_edit(SPNL()->_email_post_type, true);
        $post_ID = $post->ID;
        global $current_user;
        wp_enqueue_script('post');
        $post_type = SendPress_Data::email_post_type();
        $post_type_object = get_post_type_object($post_type);
        ?>
		<form method="POST" name="post" id="post">
		<div id="styler-menu">
			<div style="float:right;" class="btn-group">
				<input type="submit" value="<?php 
        _e('Save & Next', 'sendpress');
        ?>
" class="btn btn-primary" />
			</div>
			<div id="sp-cancel-btn" style="float:right; ">
				<a href="<?php 
        echo SendPress_Admin::link('Emails');
        ?>
" id="cancel-update" class="btn btn-default"><?php 
        echo __('Cancel', 'sendpress');
        ?>
</a>&nbsp;
			</div>
		</div>
		
		<h2><?php 
        _e('Create Email', 'sendpres');
        ?>
</h2>
		<br>
		<!--
		has-right-sidebar">
		<div id="side-info-column" class="inner-sidebar">
			
			<div class="clear"><br>
			<?php 
        echo do_action('do_meta_boxes', SPNL()->_email_post_type, 'side', $post);
        do_meta_boxes($post_type, 'side', $post);
        ?>
			</div>
		</div>
		-->
		
		<input type="hidden" value="save-create" name="save-action" id="save-action" />
		<input type="hidden" value="save-email" name="action" />
		<input type="hidden" id="user-id" name="user_ID" value="<?php 
        echo $current_user->ID;
        ?>
" />
		<input type="hidden" value="default" name="target-location" id="target-location" />
		<input type="hidden" id="post_ID" name="post_ID" value="<?php 
        echo $post->ID;
        ?>
" />
		
			<!--
			<h2>Email Template Name</h2>
			-->
			<input type="hidden" name="post_title" size="30" tabindex="1" value="<?php 
        echo SendPress_Data::random_code();
        //echo esc_attr( htmlspecialchars( $post->post_title ) );
        ?>
" id="title" autocomplete="off" />
		<!--<br><br>-->
			<!--<h2><?php 
        _e('Subject', 'sendpress');
        ?>
</h2>
			<input type="text" name="post_subject" size="30" tabindex="1" value="<?php 
        echo esc_attr(htmlspecialchars(get_post_meta($post->ID, '_sendpress_subject', true)));
        ?>
" id="email-subject" autocomplete="off" />-->
		<?php 
        $this->panel_start('<span class="glyphicon glyphicon-envelope"></span> ' . __('Subject', 'sendpress'));
        ?>
        <input type="text" name="post_subject" size="30" tabindex="1" class="form-control" value="<?php 
        echo esc_attr(htmlspecialchars(get_post_meta($post->ID, '_sendpress_subject', true)));
        ?>
" id="email-subject" autocomplete="off" />
        <?php 
        $this->panel_end();
        ?>
		

        
        	<div class="sp-row">
        		<div class="sp-50 sp-first">
			<?php 
        $this->panel_start(__('1.0 Template', 'sendpress'));
        ?>
			<label>
			<input type="radio"  name="template_system" checked value="new" /> <?php 
        _e('Use New System', 'sendpres');
        ?>
			</label>
			<br>
//.........這裏部分代碼省略.........
開發者ID:redelivre,項目名稱:jaiminho,代碼行數:101,代碼來源:class-jaiminho-view-emails-create.php

示例2: html

    function html($sp)
    {
        do_action('sendpress_event', 'Create Email');
        $post = get_default_post_to_edit($sp->_email_post_type, true);
        $post_ID = $post->ID;
        global $current_user;
        wp_enqueue_script('post');
        $post_type = SendPress_Data::email_post_type();
        $post_type_object = get_post_type_object($post_type);
        ?>
		<form method="POST" name="post" id="post">
		<div id="styler-menu">
			<div style="float:right;" class="btn-group">
				<input type="submit" value="<?php 
        _e('Save & Next', 'sendpress');
        ?>
" class="btn btn-primary" />
			</div>
			<div id="sp-cancel-btn" style="float:right; ">
				<a href="<?php 
        echo SendPress_Admin::link('Emails_Autoresponder');
        ?>
" id="cancel-update" class="btn btn-default"><?php 
        echo __('Cancel', 'sendpress');
        ?>
</a>&nbsp;
			</div>
		</div>
		
		<h2><?php 
        _e('Create Autoresponder', 'sendpress');
        ?>
</h2>
		<br>
		<!--
		has-right-sidebar">
		<div id="side-info-column" class="inner-sidebar">
			
			<div class="clear"><br>
			<?php 
        echo do_action('do_meta_boxes', $sp->_email_post_type, 'side', $post);
        do_meta_boxes($post_type, 'side', $post);
        ?>
			</div>
		</div>
		-->
		
		<input type="hidden" value="save-create" name="save-action" id="save-action" />
		<input type="hidden" value="save-email" name="action" />
		<input type="hidden" id="user-id" name="user_ID" value="<?php 
        echo $current_user->ID;
        ?>
" />
		<input type="hidden" value="default" name="target-location" id="target-location" />
		<input type="hidden" id="post_ID" name="post_ID" value="<?php 
        echo $post->ID;
        ?>
" />
		
			<!--
			<h2>Email Template Name</h2>
			-->
			<input type="hidden" name="post_title" size="30" tabindex="1" value="<?php 
        echo SendPress_Data::random_code();
        //echo esc_attr( htmlspecialchars( $post->post_title ) );
        ?>
" id="title" autocomplete="off" />
		<!--<br><br>-->
			<!--<h2><?php 
        _e('Subject', 'sendpress');
        ?>
</h2>
			<input type="text" name="post_subject" size="30" tabindex="1" value="<?php 
        echo esc_attr(htmlspecialchars(get_post_meta($post->ID, '_sendpress_subject', true)));
        ?>
" id="email-subject" autocomplete="off" />-->
		<?php 
        $this->panel_start('<span class="glyphicon glyphicon-envelope"></span> ' . __('Subject', 'sendpress'));
        ?>
        <input type="text" name="post_subject" size="30" tabindex="1" class="form-control" value="<?php 
        echo esc_attr(htmlspecialchars(get_post_meta($post->ID, '_sendpress_subject', true)));
        ?>
" id="email-subject" autocomplete="off" />
        <?php 
        $this->panel_end();
        ?>
		

        
        	<div class="sp-row">
        		<div class="sp-50 sp-first">
			<?php 
        $this->panel_start(__('Template', 'sendpress'));
        ?>
			
			<select class="form-control" name="template">
			<?php 
        $args = array('post_type' => 'sp_template', 'post_status' => array('sp-standard'));
        $the_query = new WP_Query($args);
        if ($the_query->have_posts()) {
//.........這裏部分代碼省略.........
開發者ID:anirut,項目名稱:sendpress,代碼行數:101,代碼來源:class-sendpress-view-emails-createauto.php

示例3: test_email_post_type

 function test_email_post_type()
 {
     $this->assertEquals('sp_newsletters', SendPress_Data::email_post_type());
 }
開發者ID:richardsweeney,項目名稱:sendpress,代碼行數:4,代碼來源:test_sendpress_data.php


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