本文整理汇总了PHP中SendPress_Data::get_opens方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Data::get_opens方法的具体用法?PHP SendPress_Data::get_opens怎么用?PHP SendPress_Data::get_opens使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Data
的用法示例。
在下文中一共展示了SendPress_Data::get_opens方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: html
function html($sp)
{
SendPress_Tracking::event('Overview Tab');
global $wp_version;
$classes = 'sp-welcome-panel';
$option = get_user_meta(get_current_user_id(), 'show_sp_welcome_panel', true);
// 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
$hide = 0 == $option || 2 == $option && wp_get_current_user()->user_email != get_option('admin_email');
list($display_version) = explode('-', $wp_version);
?>
<br>
<div class="sp-row ">
<div class="sp-block sp-25 sp-first">
<h2 class="nomargin nopadding"><?php
echo SendPress_Data::bd_nice_number(SendPress_Data::get_total_subscribers());
?>
</h2> <p class="fwb"><?php
_e('Subscribers', 'sendpress');
?>
</p>
</div>
<div class="sp-block sp-25">
<h2 class="nomargin nopadding"><?php
$report = SendPress_Data::get_last_report();
echo SendPress_Data::emails_active_in_queue();
?>
</h2> <p class="fwb"><?php
_e('Emails Actively Sending', 'sendpress');
?>
</small></p>
</div>
<div class="sp-block sp-25">
<h2 class="nomargin nopadding"><?php
echo SendPress_Data::emails_maxed_in_queue();
?>
</h2> <p class="fwb"><?php
_e('Emails Stuck in Queue', 'sendpress');
?>
</p>
</div>
<div class="sp-block sp-25">
<h2 class="nomargin nopadding"><?php
_e('Autocron last check', 'sendpress');
?>
</h2> <p class="fwb"> <?php
$autocron = SendPress_Option::get('autocron', 'no');
//print_r(SendPress_Data::emails_stuck_in_queue());
if ($autocron == 'yes') {
$api_info = json_decode(SendPress_Cron::get_info());
if (isset($api_info->lastcheck)) {
echo $api_info->lastcheck . " UTC";
} else {
echo "No Data";
}
} else {
echo "Not Enabled";
}
?>
</p>
</div>
</div>
<?php
if ($report) {
$rec = get_post_meta($report->ID, '_send_last_count', true);
$this->panel_start($report->post_title . " <small style='color:#333;'>" . __('This email had', 'sendpress') . " " . $rec . " " . __('Recipients', 'sendpress') . "</small>");
$stat_type = get_post_meta($report->ID, '_stat_type', true);
$clicks = SPNL()->db("Subscribers_Url")->clicks_email_id($report->ID);
$clicks_total = SPNL()->db("Subscribers_Url")->clicks_total_email_id($report->ID);
?>
<div class="sp-row">
<div class="sp-50 sp-first">
<h4 style="text-align:center;"><?php
_e('Opens', 'sendpress');
?>
</h4>
<?php
$this->panel_start();
$open = 0;
$rec = get_post_meta($report->ID, '_send_last_count', true);
if ($report) {
if ($stat_type == 'new') {
$open = SPNL()->db("Subscribers_Tracker")->get_opens_total($report->ID);
} else {
$open = SendPress_Data::get_opens($report->ID);
}
$p = $open / $rec * 100;
}
?>
<div class="sp-row">
<div class="sp-50 sp-first">
<div style="float:left;">
<div id="myStat" class="chartid" data-dimension="150" data-text="<?php
echo floor($p);
?>
//.........这里部分代码省略.........
示例2: html
//.........这里部分代码省略.........
echo $api_info->lastcheck . " UTC";
} else {
echo "No Data";
}
} else {
echo "Not Enabled";
}
?>
</p>
</div>
</div>
<?php
if ($report) {
$rec = get_post_meta($report->ID, '_send_last_count', true);
$this->panel_start($report->post_title . " <small style='color:#333;'>" . __('This email had', 'sendpress') . " " . $rec . " " . __('Recipients', 'sendpress') . "</small>");
$stat_type = get_post_meta($report->ID, '_stat_type', true);
$clicks = SPNL()->db->subscribers_url->clicks_email_id($report->ID);
$clicks_total = SPNL()->db->subscribers_url->clicks_total_email_id($report->ID);
?>
<div class="sp-row">
<div class="sp-50 sp-first">
<h4 style="text-align:center;"><?php
_e('Opens', 'sendpress');
?>
</h4>
<?php
$this->panel_start();
$open = 0;
$rec = get_post_meta($report->ID, '_send_last_count', true);
if ($report) {
if ($stat_type == 'new') {
$open = SPNL()->db->subscribers_tracker->get_opens_total($report->ID);
} else {
$open = SendPress_Data::get_opens($report->ID);
}
$p = $open / $rec * 100;
}
?>
<div class="sp-row">
<div class="sp-50 sp-first">
<div style="float:left;">
<div id="myStat" class="chartid" data-dimension="150" data-text="<?php
echo floor($p);
?>
%" data-info="Total Opens" data-width="15" data-fontsize="30" data-percent="<?php
echo floor($p);
?>
" data-fgcolor="#61a9dc" data-bgcolor="#eee" data-fill="#ddd" data-total="<?php
echo $rec;
?>
" data-part="<?php
echo $open;
?>
" data-icon="long-arrow-up" data-icon-size="28" data-icon-color="#fff"></div>
</div>
<div style="text-align:center;">
<h5>Total</h5>
<?php
echo $open;
?>
</div>
</div>
<div class="sp-50">
<?php