当前位置: 首页>>代码示例>>PHP>>正文


PHP SendPress_Data::get_charset_types方法代码示例

本文整理汇总了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');
开发者ID:anirut,项目名称:sendpress,代码行数:67,代码来源:class-sendpress-view-settings-account.php

示例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">
开发者ID:redelivre,项目名称:jaiminho,代码行数:67,代码来源:class-jaiminho-view-settings-account.php

示例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());
 }
开发者ID:richardsweeney,项目名称:sendpress,代码行数:4,代码来源:test_sendpress_data.php


注:本文中的SendPress_Data::get_charset_types方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。