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


PHP SendPress_Data::get_count_subscribers方法代码示例

本文整理汇总了PHP中SendPress_Data::get_count_subscribers方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::get_count_subscribers方法的具体用法?PHP SendPress_Data::get_count_subscribers怎么用?PHP SendPress_Data::get_count_subscribers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SendPress_Data的用法示例。


在下文中一共展示了SendPress_Data::get_count_subscribers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: html


//.........这里部分代码省略.........
</script>
<select name="send-later-time" id="datepicker-time" class="fifty">
<option value="00:00:00">12:00 am</option>
<option value="01:00:00">1:00 am</option>
<option value="02:00:00">2:00 am</option>
<option value="03:00:00">3:00 am</option>
<option value="04:00:00">4:00 am</option>
<option value="05:00:00">5:00 am</option>
<option value="06:00:00">6:00 am</option>
<option value="07:00:00">7:00 am</option>
<option value="08:00:00">8:00 am</option>
<option value="09:00:00">9:00 am</option>
<option value="10:00:00">10:00 am</option>
<option value="11:00:00">11:00 am</option>
<option value="12:00:00">12:00 pm</option>
<option value="13:00:00">1:00 pm</option>
<option value="14:00:00">2:00 pm</option>
<option value="15:00:00">3:00 pm</option>
<option value="16:00:00">4:00 pm</option>
<option value="17:00:00">5:00 pm</option>
<option value="18:00:00">6:00 pm</option>
<option value="19:00:00">7:00 pm</option>
<option value="20:00:00">8:00 pm</option>
<option value="21:00:00">9:00 pm</option>
<option value="22:00:00">10:00 pm</option>
<option value="23:00:00">11:00 pm</option>
</select>
</div>
<?php 
        $this->panel_end();
        do_action('spnl_add_to_sending', $this);
        $this->panel_start('<span class="glyphicon glyphicon-list"></span> ' . __('Lists', 'sendpress'));
        $post_args = array('post_type' => 'sendpress_list', 'numberposts' => -1, 'offset' => 0, 'orderby' => 'post_title', 'order' => 'DESC');
        $current_lists = get_posts($post_args);
        foreach ($current_lists as $list) {
            $t = '';
            $tlist = '';
            if (get_post_meta($list->ID, '_test_list', true) == 1) {
                $t = '  <span class="label label-info">Test List</span>';
                $tlist = ' test-list-add';
            }
            echo "<input name='listIDS[]' type='checkbox' id='listIDS' class='sp-send-lists " . $tlist . "' value=" . $list->ID . "> " . $list->post_title . " <small>(" . SendPress_Data::get_count_subscribers($list->ID) . ")</small>{$t}<br>";
        }
        $this->panel_end();
        $this->panel_start('<span class="glyphicon glyphicon-tag"></span> ' . __('Mark as Test', 'sendpress'));
        echo "<input name='test_report' type='checkbox' id='test_report' value='1'> " . __('Test', 'sendpress') . "<br>";
        echo "<small class='text-muted'> " . __('This puts the report into the Test tab on the Reports screen', 'sendpress') . ".</small>";
        $this->panel_end();
        ?>

<!--
<div class="style-unit">
<h4><?php 
        _e('Settings', 'sendpress');
        ?>
</h4>
<input type="checkbox" name="test-send" value="1" /> Mark as Test

<textarea name="test-add" cols='26' rows='6'></textarea>


</div>
-->
<?php 
        wp_nonce_field($sp->_nonce_value);
        ?>
</div>
<div style="margin-left: 250px;">
<div class="widerightcol">
<?php 
        $url = get_site_url();
        //$link =  get_permalink( $post->ID );
        $open_info = array("id" => $post->ID, "view" => "email");
        $code = SendPress_Data::encrypt($open_info);
        $url = SendPress_Manager::public_url($code);
        $sep = strstr($url, '?') ? '&' : '?';
        $link = $url . $sep . 'inline=true';
        ?>
<iframe src="<?php 
        echo $link;
        ?>
" width="100%" height="600px"></iframe>
<small><?php 
        _e('Displaying a 404? Please try saving your permalinks', 'sendpress');
        ?>
 <a href="<?php 
        echo admin_url('options-permalink.php');
        ?>
"><?php 
        _e('here', 'sendpress');
        ?>
</a>.</small>

</div>
</div>
<br class="clear" />
</div>
</form>
<?php 
    }
开发者ID:radscheit,项目名称:unicorn,代码行数:101,代码来源:class-sendpress-view-emails-send.php

示例2: html


//.........这里部分代码省略.........

</div>
        <h2>Autoresponder Settings</h2>
        <br>
        <h4>Subject: <?php 
        echo esc_attr(htmlspecialchars(get_post_meta($post->ID, '_sendpress_subject', true)));
        ?>
</h4>
        
        <div class="sp-row">
<div class="sp-75 sp-first">
<br>
<select name="sp-autoresponder-type" id="params-auto" >
<option value="subscribe"  <?php 
        if ($options['type'] == 'subscribe') {
            echo "selected";
        }
        ?>
 >When someone subscribes to the list...</option>
<!--<option value="user-new" <?php 
        if ($options['type'] == 'user-new') {
            echo "selected";
        }
        ?>
 >When a new WordPress user is added to your site...</option>-->
</select>
<select name="" id="params-list">
<?php 
        $post_args = array('post_type' => 'sendpress_list', 'numberposts' => -1, 'offset' => 0, 'orderby' => 'post_title', 'order' => 'DESC');
        $current_lists = get_posts($post_args);
        foreach ($current_lists as $list) {
            $t = '';
            $tlist = '';
            echo "<option value=" . $list->ID . "> " . $list->post_title . " <small>(" . SendPress_Data::get_count_subscribers($list->ID) . ")</small></option>";
        }
        ?>
</select>
<input type="text"  name="sp-delay" style="width:30px; <?php 
        if ($options['when'] == 'immediate') {
            echo "display:none;";
        }
        ?>
"   class="text" id="timer" value="<?php 
        echo $options['delay'];
        ?>
" />
<select name="sp-timing"  id="when-to-send" >
<option value="immediate" <?php 
        if ($options['when'] == 'immediate') {
            echo "selected";
        }
        ?>
  >immediately.</option>
<option value="hours" <?php 
        if ($options['when'] == 'hours') {
            echo "selected";
        }
        ?>
  >hour(s) after.</option>
<option value="days" <?php 
        if ($options['when'] == 'days') {
            echo "selected";
        }
        ?>
  >day(s) after.</option>
<option value="weeks" <?php 
开发者ID:radscheit,项目名称:unicorn,代码行数:67,代码来源:class-sendpress-view-emails-autoedit.php

示例3: html

    function html($sp)
    {
        global $post_ID, $post;
        $view = isset($_GET['view']) ? $_GET['view'] : '';
        $list = '';
        if (isset($_GET['emailID'])) {
            $emailID = $_GET['emailID'];
            $post = get_post($_GET['emailID']);
            $post_ID = $post->ID;
        }
        ?>
		<form  method="POST" name="post" id="post">
<?php 
        $info = SendPress_Option::get('current_send_' . $post->ID);
        $subject = SendPress_Option::get('current_send_subject_' . $post->ID, true);
        ?>
<div id="styler-menu">
    <div style="float:right;" class="btn-group">
<a class="btn btn-primary btn-large " id="confirm-send" href="#"><i class="icon-white  icon-thumbs-up"></i> <?php 
        _e('Confirm Send', 'sendpress');
        ?>
</a>
  </div>
</div>
<div id="sp-cancel-btn" style="float:right; ">
<a class="btn btn-default" href="<?php 
        echo '?page=' . $_GET['page'] . '&view=send&emailID=' . $_GET['emailID'];
        ?>
"><?php 
        _e('Cancel Send', 'sendpress');
        ?>
</a>&nbsp;
</div>
<h2><?php 
        _e('Confirm Send', 'sendpress');
        ?>
</h2>
<br>

<input type="hidden" id="user-id" name="user_ID" value="<?php 
        //echo $current_user->ID;
        ?>
" />
<input type="hidden" id="post_ID" name="post_ID" value="<?php 
        echo $post->ID;
        ?>
" />
<div class="boxer">
<div class="boxer-inner">
<?php 
        $this->panel_start('<span class="glyphicon glyphicon-inbox"></span> ' . __('Subject', 'sendpress'));
        ?>
<input type="text" class="form-control" value="<?php 
        echo stripslashes(esc_attr(htmlspecialchars($subject)));
        ?>
" disabled />
<?php 
        $this->panel_end();
        ?>
<div class="leftcol">
<?php 
        $this->panel_start('<span class="glyphicon glyphicon-calendar"></span> ' . __('Date & Time', 'sendpress'));
        if ($info['send_at'] == '0000-00-00 00:00:00') {
            echo "Your email will start sending right away!";
        } else {
            echo "Your email will start sending on " . date('Y/m/d', strtotime($info['send_at'])) . " at " . date('h:i A', strtotime($info['send_at']));
        }
        $this->panel_end();
        $this->panel_start('<span class="glyphicon glyphicon-list"></span> ' . __('Lists', 'sendpress'));
        ?>



<?php 
        if (!empty($info['listIDS'])) {
            foreach ($info['listIDS'] as $list_id) {
                $list = $sp->get_list_details($list_id);
                echo $list->post_title . " <small>(" . SendPress_Data::get_count_subscribers($list_id) . ")</small><br>";
            }
        } else {
            _e('No Lists Selected', 'sendpress');
            echo "<br>";
        }
        $this->panel_end();
        $this->panel_start('<span class="glyphicon glyphicon-tag"></span> ' . __('Mark as Test', 'sendpress'));
        $sel = '';
        if (get_post_meta($post_ID, 'istest', true) == true) {
            $sel = 'checked';
        }
        echo "<input {$sel} name='test_report' type='checkbox' id='test_report' value='1' disabled> Test<br>";
        echo "<small class='text-muted'>" . __('This puts the report into the Test tab on the Reports screen', 'sendpress') . ".</small>";
        $this->panel_end();
        ?>

</div>
<div style="margin-left: 250px;">
<div class="widerightcol">
<?php 
        $link = get_permalink($post->ID);
        $sep = strstr($link, '?') ? '&' : '?';
//.........这里部分代码省略.........
开发者ID:radscheit,项目名称:unicorn,代码行数:101,代码来源:class-sendpress-view-emails-send-confirm.php


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