本文整理匯總了PHP中SendPress_Data::get_charset_types方法的典型用法代碼示例。如果您正苦於以下問題:PHP SendPress_Data::get_charset_types方法的具體用法?PHP SendPress_Data::get_charset_types怎麽用?PHP SendPress_Data::get_charset_types使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::get_charset_types方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: html
//.........這裏部分代碼省略.........
$emails_so_far = SendPress_Data::emails_sent_in_queue("day");
$offset = get_option('gmt_offset') * 60 * 60;
// Time offset in seconds
$local_timestamp = wp_next_scheduled('sendpress_cron_action') + $offset;
//print_r(wp_get_schedules());
printf(__('You have sent <strong>%d</strong> emails so far today.', 'sendpress'), $emails_so_far);
?>
.<br><br>
<input type="text" size="6" name="emails-per-day" value="<?php
echo $emails_per_day;
?>
" /> <?php
_e('Emails Per Day', 'sendpress');
?>
<br><br>
<input type="text" size="6" name="emails-per-hour" value="<?php
echo $emails_per_hour;
?>
" /> <?php
_e('Emails Per Hour', 'sendpress');
?>
<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');
示例2: html
//.........這裏部分代碼省略.........
$emails_so_far = SendPress_Data::emails_sent_in_queue("day");
$offset = get_option('gmt_offset') * 60 * 60;
// Time offset in seconds
$local_timestamp = wp_next_scheduled('sendpress_cron_action') + $offset;
//print_r(wp_get_schedules());
sprintf(__('You have sent <strong>%s</strong> emails so far today and you have <strong>%s</strong> credits remaining.', 'sendpress'), $emails_so_far, $credits);
?>
<br><br>
<input type="text" size="6" name="emails-per-day" value="<?php
echo $emails_per_day;
?>
" /> <?php
_e('Emails Per Day', 'sendpress');
?>
<br><br>
<input type="text" size="6" name="emails-per-hour" value="<?php
echo $emails_per_hour;
?>
" /> <?php
_e('Emails Per Hour', 'sendpress');
?>
<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">
示例3: test_get_charset_types
function test_get_charset_types()
{
$this->assertEquals(array("UTF-8", "UTF-7", "BIG5", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "Windows-1251", "Windows-1252"), SendPress_Data::get_charset_types());
}