本文整理汇总了PHP中SendPress_Data::get_system_email_types方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::get_system_email_types方法的具体用法?PHP SendPress_Data::get_system_email_types怎么用?PHP SendPress_Data::get_system_email_types使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::get_system_email_types方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html
function html($sp)
{
SendPress_Tracking::event('Emails Tab');
//Create an instance of our package class...
$testListTable = new SendPress_System_Email_Table();
//Fetch, prepare, sort, and filter our data...
$testListTable->prepare_items();
?>
<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
<form id="email-filter" method="get">
<div id="taskbar" class="lists-dashboard rounded group">
<?php
$form_types = SendPress_Data::get_system_email_types();
if ($form_types) {
?>
<div id="button-area">
<a class="btn btn-primary btn-large" href="?page=<?php
echo $_REQUEST['page'];
?>
&view=systememailcreate"><?php
_e('Create System E-mail', 'sendpress');
?>
</a>
</div>
<?php
}
?>
</div>
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php
echo $_REQUEST['page'];
?>
" />
<!-- Now we can render the completed list table -->
<?php
$testListTable->display();
?>
<?php
wp_nonce_field($this->_nonce_value);
?>
</form>
<?php
}
示例2: html
//.........这里部分代码省略.........
<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()) {
while ($the_query->have_posts()) {
$the_query->the_post();
$temp_id = $the_query->post->ID;
$s = '';
if ($temp_id == $template_id) {
$s = 'selected';
}
echo '<option value="' . $temp_id . '" ' . $s . '>' . get_the_title() . '</option>';
}
}
?>
</select>
<?php
$this->panel_end();
?>
</div>
<div class="sp-50">
<?php
$this->panel_start(__('Email Type', 'sendpress'));
?>
<?php
$form_types = SendPress_Data::get_system_email_types();
if ($form_types) {
?>
<select class="form-control" name="email_type" id="email_type">
<option value="0"></option>
<?php
foreach ($form_types as $key => $value) {
echo '<option value="' . $key . '">' . $value . '</option>';
}
?>
</select>
<?php
}
$this->panel_end();
?>
</div>
</div>
<input class="checkbox" type="checkbox" id="make_default" name="make_default" value="<?php
echo $options['default'];
?>
" <?php
checked($options['default'], true);
?>
/>
<label for="make_default">Send This E-Mail by Default</label>
<br><br>
<?php
//wp_editor($post->post_content,'textversion');
?>
<?php
wp_nonce_field($sp->_nonce_value);
?>
<br><br>
</form>
<?php
}
开发者ID:pmatheus,项目名称:participacao-sitebase,代码行数:101,代码来源:class-sendpress-view-settings-systememailcreate.php