wpMandrill - Version 1.25

Version Description

  • FIXED: Undefined WPDOMAIN constant in stats.php
Download this release

Release Info

Developer MC_Will
Plugin Icon wp plugin wpMandrill
Version 1.25
Comparing to
See all releases

Code changes from version 1.24 to 1.25

Files changed (3) hide show
  1. readme.txt +3 -0
  2. stats.php +33 -33
  3. wpmandrill.php +1 -1
readme.txt CHANGED
@@ -92,6 +92,9 @@ If your account has more than 20 senders registered or more than 40 tags used, t
92
 
93
  == Changelog ==
94
 
 
 
 
95
  = 1.24 =
96
  * UPDATED: Dashboard widget shown only to those capable of manage_options
97
  * ADDED: CURL calls doesn't verify SSL certificates anymore. ** Thanks Bruno Braga! **
92
 
93
  == Changelog ==
94
 
95
+ = 1.25 =
96
+ * FIXED: Undefined WPDOMAIN constant in stats.php
97
+
98
  = 1.24 =
99
  * UPDATED: Dashboard widget shown only to those capable of manage_options
100
  * ADDED: CURL calls doesn't verify SSL certificates anymore. ** Thanks Bruno Braga! **
stats.php CHANGED
@@ -2,11 +2,11 @@
2
  <?php wpMandrill::getConnected(); ?>
3
  <div class="wrap">
4
  <div class="icon32" style="background: url('<?php echo plugins_url('images/mandrill-head-icon.png',__FILE__); ?>');"><br /></div>
5
- <h2><?php _e('Mandrill Service Report', wpMandrill::WPDOMAIN); ?></h2><?php
6
 
7
  $stats = self::getCurrentStats();
8
  if ( empty($stats) ) {
9
- echo '<p>' . __('There was a problem retrieving statistics.', self::WPDOMAIN) . '</p>';
10
  echo '</div>';
11
  return;
12
  }
@@ -18,54 +18,54 @@ $delivered = $stats['general']['stats']['sent'] -
18
 
19
  $lit = array();
20
 
21
- $lit['hourly']['title'] = __('Hourly Sending Volume and Open/Click Rate',self::WPDOMAIN);
22
- $lit['hourly']['Xtitle'] = __('Hours',self::WPDOMAIN);
23
- $lit['hourly']['tooltip'] = __('Hour',self::WPDOMAIN);
24
 
25
- $lit['daily']['title'] = __('Daily Sending Volume and Open/Click Rate',self::WPDOMAIN);
26
- $lit['daily']['Xtitle'] = __('Days',self::WPDOMAIN);
27
- $lit['daily']['tooltip'] = __('Day',self::WPDOMAIN);
28
 
29
- $lit['subtitle'] = __('in the last 30 days',self::WPDOMAIN);
30
- $lit['Ytitle'] = __('Open & Click Rate',self::WPDOMAIN);
31
- $lit['SerieName'] = __('Volume',self::WPDOMAIN);
32
- $lit['emails'] = __('emails',self::WPDOMAIN);
33
- $lit['openrate'] = __('Open Rate',self::WPDOMAIN);
34
- $lit['clickrate'] = __('Click Rate',self::WPDOMAIN);
35
 
36
  ?>
37
  <div id="alltime_report">
38
- <h3><?php echo sprintf(__('All-time statistics since %s: ', wpMandrill::WPDOMAIN),date('m/d/Y',strtotime($stats['general']['created_at']))); ?></h3>
39
 
40
  <div id="alltime_report_canvas">
41
- <div class="stat_box"><?php _e('Reputation:', wpMandrill::WPDOMAIN); ?><br/><span><?=$stats['general']['reputation']?>%</span></div>
42
- <div class="stat_box"><?php _e('Quota:', wpMandrill::WPDOMAIN); ?><br/><span><?=$stats['general']['hourly_quota']?> <?php _e('sends/hour', wpMandrill::WPDOMAIN); ?></span></div>
43
- <div class="stat_box"><?php _e('Emails sent:', wpMandrill::WPDOMAIN); ?><br/><span><?=$stats['general']['stats']['sent']?></span></div>
44
- <div class="stat_box"><?php _e('Emails delivered:', wpMandrill::WPDOMAIN); ?><br/><span><?=$delivered?> (<?=number_format( $delivered*100 / ( ($stats['general']['stats']['sent'])?$stats['general']['stats']['sent']:1 ) ,2); ?>%)</span></div>
45
- <div class="stat_box"><?php _e('Tracked opens:', wpMandrill::WPDOMAIN); ?><br/><span><?=$stats['general']['stats']['opens']?></span></div>
46
- <div class="stat_box"><?php _e('Tracked clicks:', wpMandrill::WPDOMAIN); ?><br/><span><?=$stats['general']['stats']['clicks']?></span></div>
47
  <?php
48
- if ( $stats['general']['stats']['rejects'] ) echo '<div class="stat_box warning">'.__('Rejects:', wpMandrill::WPDOMAIN).'<br/><span>'.$stats['general']['stats']['rejects'].'</span></div>';
49
- if ( $stats['general']['stats']['complaints'] ) echo '<div class="stat_box warning">'.__('Complaints:', wpMandrill::WPDOMAIN).'<br/><span>'.$stats['general']['stats']['complaints'].'</span></div>';
50
- if ( $stats['general']['backlog'] ) echo '<div class="stat_box warning">'.__('Current backlog:', wpMandrill::WPDOMAIN).'<br/><span>'.$stats['general']['backlog'].' emails</span></div>';
51
  ?>
52
  </div>
53
  </div>
54
 
55
  <div style="clear: both;"></div>
56
  <div id="filtered_reports">
57
- <h3><?php _e('Filtered statistics:', wpMandrill::WPDOMAIN); ?></h3>
58
- <label for="filter"><?php _e('Filter by:', wpMandrill::WPDOMAIN); ?> </label>
59
  <select id="filter" name="filter">
60
- <option value="none" selected="selected" ><?php _e('No filter', wpMandrill::WPDOMAIN); ?></option>
61
- <optgroup label="<?php _e('Sender:', wpMandrill::WPDOMAIN); ?>">
62
  <?php
63
  foreach ( array_keys($stats['stats']['hourly']['senders']) as $sender) {
64
  echo '<option value="s:'.$sender.'">'.$sender.'</option>';
65
  }
66
  ?>
67
  </optgroup>
68
- <optgroup label="<?php _e('Tag:', wpMandrill::WPDOMAIN); ?>">
69
  <?php
70
  if ( isset($stats['stats']['hourly']['tags']['detailed_stats'])
71
  && is_array($stats['stats']['hourly']['tags']['detailed_stats']) ) {
@@ -78,10 +78,10 @@ $lit['clickrate'] = __('Click Rate',self::WPDOMAIN);
78
  ?>
79
  </optgroup>
80
  </select>
81
- <label for="display"><?php _e('Display:', wpMandrill::WPDOMAIN); ?> </label>
82
  <select id="display" name="display">
83
- <option value="volume"><?php _e('Total Volume per Period', wpMandrill::WPDOMAIN); ?></option>
84
- <option value="average"><?php _e('Average Volume per Period', wpMandrill::WPDOMAIN); ?></option>
85
  </select><div id="ajax-icon-container"><span id="loading_data" class="hidden"></span></div>
86
  <div id="filtered_reports_canvas">
87
  <div id="filtered_recent" style="width: 50%;height: 300px; float: left;"></div>
@@ -268,7 +268,7 @@ jQuery(function () {
268
  <h3><?=$lit['daily']['title']; ?></h3>
269
  <h4><?=$lit['subtitle']; ?></h4>
270
  <div id="daily_report_canvas" style="height: 400px;"></div>
271
- <h3><a href="http://mandrillapp.com/" target="_target"><?php _e('For more detailed statistics, please visit your Mandrill Dashboard',self::WPDOMAIN); ?></a>.</h3>
272
 
273
  <?php
274
  wpMandrill::$stats = $stats;
2
  <?php wpMandrill::getConnected(); ?>
3
  <div class="wrap">
4
  <div class="icon32" style="background: url('<?php echo plugins_url('images/mandrill-head-icon.png',__FILE__); ?>');"><br /></div>
5
+ <h2><?php _e('Mandrill Service Report', 'wpmandrill'); ?></h2><?php
6
 
7
  $stats = self::getCurrentStats();
8
  if ( empty($stats) ) {
9
+ echo '<p>' . __('There was a problem retrieving statistics.', 'wpmandrill') . '</p>';
10
  echo '</div>';
11
  return;
12
  }
18
 
19
  $lit = array();
20
 
21
+ $lit['hourly']['title'] = __('Hourly Sending Volume and Open/Click Rate','wpmandrill');
22
+ $lit['hourly']['Xtitle'] = __('Hours','wpmandrill');
23
+ $lit['hourly']['tooltip'] = __('Hour','wpmandrill');
24
 
25
+ $lit['daily']['title'] = __('Daily Sending Volume and Open/Click Rate','wpmandrill');
26
+ $lit['daily']['Xtitle'] = __('Days','wpmandrill');
27
+ $lit['daily']['tooltip'] = __('Day','wpmandrill');
28
 
29
+ $lit['subtitle'] = __('in the last 30 days','wpmandrill');
30
+ $lit['Ytitle'] = __('Open & Click Rate','wpmandrill');
31
+ $lit['SerieName'] = __('Volume','wpmandrill');
32
+ $lit['emails'] = __('emails','wpmandrill');
33
+ $lit['openrate'] = __('Open Rate','wpmandrill');
34
+ $lit['clickrate'] = __('Click Rate','wpmandrill');
35
 
36
  ?>
37
  <div id="alltime_report">
38
+ <h3><?php echo sprintf(__('All-time statistics since %s: ', 'wpmandrill'),date('m/d/Y',strtotime($stats['general']['created_at']))); ?></h3>
39
 
40
  <div id="alltime_report_canvas">
41
+ <div class="stat_box"><?php _e('Reputation:', 'wpmandrill'); ?><br/><span><?=$stats['general']['reputation']?>%</span></div>
42
+ <div class="stat_box"><?php _e('Quota:', 'wpmandrill'); ?><br/><span><?=$stats['general']['hourly_quota']?> <?php _e('sends/hour', 'wpmandrill'); ?></span></div>
43
+ <div class="stat_box"><?php _e('Emails sent:', 'wpmandrill'); ?><br/><span><?=$stats['general']['stats']['sent']?></span></div>
44
+ <div class="stat_box"><?php _e('Emails delivered:', 'wpmandrill'); ?><br/><span><?=$delivered?> (<?=number_format( $delivered*100 / ( ($stats['general']['stats']['sent'])?$stats['general']['stats']['sent']:1 ) ,2); ?>%)</span></div>
45
+ <div class="stat_box"><?php _e('Tracked opens:', 'wpmandrill'); ?><br/><span><?=$stats['general']['stats']['opens']?></span></div>
46
+ <div class="stat_box"><?php _e('Tracked clicks:', 'wpmandrill'); ?><br/><span><?=$stats['general']['stats']['clicks']?></span></div>
47
  <?php
48
+ if ( $stats['general']['stats']['rejects'] ) echo '<div class="stat_box warning">'.__('Rejects:', 'wpmandrill').'<br/><span>'.$stats['general']['stats']['rejects'].'</span></div>';
49
+ if ( $stats['general']['stats']['complaints'] ) echo '<div class="stat_box warning">'.__('Complaints:', 'wpmandrill').'<br/><span>'.$stats['general']['stats']['complaints'].'</span></div>';
50
+ if ( $stats['general']['backlog'] ) echo '<div class="stat_box warning">'.__('Current backlog:', 'wpmandrill').'<br/><span>'.$stats['general']['backlog'].' emails</span></div>';
51
  ?>
52
  </div>
53
  </div>
54
 
55
  <div style="clear: both;"></div>
56
  <div id="filtered_reports">
57
+ <h3><?php _e('Filtered statistics:', 'wpmandrill'); ?></h3>
58
+ <label for="filter"><?php _e('Filter by:', 'wpmandrill'); ?> </label>
59
  <select id="filter" name="filter">
60
+ <option value="none" selected="selected" ><?php _e('No filter', 'wpmandrill'); ?></option>
61
+ <optgroup label="<?php _e('Sender:', 'wpmandrill'); ?>">
62
  <?php
63
  foreach ( array_keys($stats['stats']['hourly']['senders']) as $sender) {
64
  echo '<option value="s:'.$sender.'">'.$sender.'</option>';
65
  }
66
  ?>
67
  </optgroup>
68
+ <optgroup label="<?php _e('Tag:', 'wpmandrill'); ?>">
69
  <?php
70
  if ( isset($stats['stats']['hourly']['tags']['detailed_stats'])
71
  && is_array($stats['stats']['hourly']['tags']['detailed_stats']) ) {
78
  ?>
79
  </optgroup>
80
  </select>
81
+ <label for="display"><?php _e('Display:', 'wpmandrill'); ?> </label>
82
  <select id="display" name="display">
83
+ <option value="volume"><?php _e('Total Volume per Period', 'wpmandrill'); ?></option>
84
+ <option value="average"><?php _e('Average Volume per Period', 'wpmandrill'); ?></option>
85
  </select><div id="ajax-icon-container"><span id="loading_data" class="hidden"></span></div>
86
  <div id="filtered_reports_canvas">
87
  <div id="filtered_recent" style="width: 50%;height: 300px; float: left;"></div>
268
  <h3><?=$lit['daily']['title']; ?></h3>
269
  <h4><?=$lit['subtitle']; ?></h4>
270
  <div id="daily_report_canvas" style="height: 400px;"></div>
271
+ <h3><a href="http://mandrillapp.com/" target="_target"><?php _e('For more detailed statistics, please visit your Mandrill Dashboard','wpmandrill'); ?></a>.</h3>
272
 
273
  <?php
274
  wpMandrill::$stats = $stats;
wpmandrill.php CHANGED
@@ -5,7 +5,7 @@ Description: wpMandrill sends emails, generated by WordPress using Mandrill.
5
  Author: Mandrill
6
  Author URI: http://mandrillapp.com/
7
  Plugin URI: http://connect.mailchimp.com/integrations/wpmandrill
8
- Version: 1.24
9
  Text Domain: wpmandrill
10
  */
11
  /* Copyright 2012 MailChimp (email : will@mailchimp.com )
5
  Author: Mandrill
6
  Author URI: http://mandrillapp.com/
7
  Plugin URI: http://connect.mailchimp.com/integrations/wpmandrill
8
+ Version: 1.25
9
  Text Domain: wpmandrill
10
  */
11
  /* Copyright 2012 MailChimp (email : will@mailchimp.com )