本文整理汇总了PHP中SendPress_Data::get_encoding_types方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::get_encoding_types方法的具体用法?PHP SendPress_Data::get_encoding_types怎么用?PHP SendPress_Data::get_encoding_types使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::get_encoding_types方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html
//.........这里部分代码省略.........
<br><br>
<h2><?php
_e('Email Encoding', 'sendpress');
?>
</h2>
<?php
$charset = SendPress_Option::get('email-charset', 'UTF-8');
?>
Charset:
<select name="email-charset" id="">
<?php
$charsete = SendPress_Data::get_charset_types();
foreach ($charsete as $type) {
$select = "";
if ($type == $charset) {
$select = " selected ";
}
echo "<option {$select} value={$type}>{$type}</option>";
}
?>
</select><br>
<?php
_e('Squares or weird characters displaying in your emails select the charset for your language', 'sendpress');
?>
.
<br><br>
<?php
_e('Encoding', 'sendpress');
?>
: <select name="email-encoding" id="">
<?php
$charset = SendPress_Option::get('email-encoding', '8bit');
$charsete = SendPress_Data::get_encoding_types();
foreach ($charsete as $type) {
$select = "";
if ($type == $charset) {
$select = " selected ";
}
echo "<option {$select} value={$type}>{$type}</option>";
}
?>
</select><br>
<?php
_e('Older versions of SendPress used', 'sendpress');
?>
"quoted-printable"
<br><br><br>
<h2><?php
_e('AutoCron Information', 'sendpress');
?>
</h2>
<?php
$api_info = json_decode(SendPress_Cron::get_info());
$autocron = SendPress_Option::get('autocron', 'no');
if ($autocron == 'yes') {
?>
<ul>
<li>Last Check: <?php
echo $api_info->lastcheck;
?>
UTC</li>
<li>Errors: <?php
echo $api_info->errors;
?>
</li>
示例2: html
//.........这里部分代码省略.........
<br><br>
<h2><?php
_e('Email Encoding', 'sendpress');
?>
</h2>
<?php
$charset = SendPress_Option::get('email-charset', 'UTF-8');
?>
Charset:
<select name="email-charset" id="">
<?php
$charsete = SendPress_Data::get_charset_types();
foreach ($charsete as $type) {
$select = "";
if ($type == $charset) {
$select = " selected ";
}
echo "<option {$select} value={$type}>{$type}</option>";
}
?>
</select><br>
<?php
_e('Squares or weird characters displaying in your emails select the charset for your language', 'sendpress');
?>
.
<br><br>
<?php
_e('Encoding', 'sendpress');
?>
: <select name="email-encoding" id="">
<?php
$charset = SendPress_Option::get('email-encoding', '8bit');
$charsete = SendPress_Data::get_encoding_types();
foreach ($charsete as $type) {
$select = "";
if ($type == $charset) {
$select = " selected ";
}
echo "<option {$select} value={$type}>{$type}</option>";
}
?>
</select>
<br class="clear">
</div>
</div>
</div>
</div>
<?php
//Page Nonce
//wp_nonce_field( basename(__FILE__) ,'_spnonce' );
wp_nonce_field($this->_nonce_value);
?>
<input type="submit" class="btn btn-primary" value="Save"/> <a href="" class="btn btn-default"><i class="icon-remove"></i> <?php
_e('Cancel', 'sendpress');
?>
</a>
</form>
<form method="post" id="post-test" class="form-inline">
<input type="hidden" name="action" value="send-test-email" />
<input name="testemail" type="hidden" id="test-email-form" value="<?php
echo SendPress_Option::get('testemail');
?>
示例3: test_get_encoding_types
function test_get_encoding_types()
{
$this->assertEquals(array("8bit", "7bit", "binary", "base64", "quoted-printable"), SendPress_Data::get_encoding_types());
}