summaryrefslogtreecommitdiff
path: root/Postman/Postman-Controller/PostmanDashboardWidgetController.php
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-05-15 12:14:32 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-05-15 12:14:32 +0000
commit38153c0f3e739f3d89a1a7734fd7d199bf457fab (patch)
tree28e19f4e091d5182a2c63bc98377e5381b0043ac /Postman/Postman-Controller/PostmanDashboardWidgetController.php
parent942aa536210fe204a2d097eb8878c1d690e0547b (diff)
downloadPost-SMTP-38153c0f3e739f3d89a1a7734fd7d199bf457fab.zip
= 2.0 - 2019-05-15
* New: Mailer Type - Added an option to send without overwrite the 'wp_mail' function, better compability to WordPress delivery. hopefully will be the default in the future. * Updated: Sendgrid API was upgraded and rewritten to the new version. * Fixed: Message-Id header was missing on SMTP * Fixed: Email logger optimization - better query for large amount of records. * Fixed: The localization was fixed to match translate.wordpress.org translation system ( Thanks to Niels de Blaauw from Level-Level ). * Fixed: Code and optimization ( Thanks to Niels de Blaauw from Level-Level ).
Diffstat (limited to 'Postman/Postman-Controller/PostmanDashboardWidgetController.php')
-rw-r--r--Postman/Postman-Controller/PostmanDashboardWidgetController.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/Postman/Postman-Controller/PostmanDashboardWidgetController.php b/Postman/Postman-Controller/PostmanDashboardWidgetController.php
index 7393ee3..6233315 100644
--- a/Postman/Postman-Controller/PostmanDashboardWidgetController.php
+++ b/Postman/Postman-Controller/PostmanDashboardWidgetController.php
@@ -54,7 +54,7 @@ if (! class_exists ( "PostmanDashboardWidgetController" )) {
public function addDashboardWidget() {
// only display to the widget to administrator
if (PostmanUtils::isAdmin ()) {
- wp_add_dashboard_widget ( 'example_dashboard_widget', __ ( 'Postman SMTP', Postman::TEXT_DOMAIN ), array (
+ wp_add_dashboard_widget ( 'example_dashboard_widget', __ ( 'Postman SMTP', 'post-smtp' ), array (
$this,
'printDashboardWidget'
) ); // Display function.
@@ -67,7 +67,7 @@ if (! class_exists ( "PostmanDashboardWidgetController" )) {
public function addNetworkDashboardWidget() {
// only display to the widget to administrator
if (PostmanUtils::isAdmin ()) {
- wp_add_dashboard_widget ( 'example_dashboard_widget', __ ( 'Postman SMTP', Postman::TEXT_DOMAIN ), array (
+ wp_add_dashboard_widget ( 'example_dashboard_widget', __ ( 'Postman SMTP', 'post-smtp' ), array (
$this,
'printNetworkDashboardWidget'
) ); // Display function.
@@ -78,8 +78,8 @@ if (! class_exists ( "PostmanDashboardWidgetController" )) {
* Create the function to output the contents of our Dashboard Widget.
*/
public function printDashboardWidget() {
- $goToSettings = sprintf ( '<a href="%s">%s</a>', PostmanUtils::getSettingsPageUrl (), __ ( 'Settings', Postman::TEXT_DOMAIN ) );
- $goToEmailLog = sprintf ( '%s', _x ( 'Email Log', 'The log of Emails that have been delivered', Postman::TEXT_DOMAIN ) );
+ $goToSettings = sprintf ( '<a href="%s">%s</a>', PostmanUtils::getSettingsPageUrl (), __ ( 'Settings', 'post-smtp' ) );
+ $goToEmailLog = sprintf ( '%s', _x ( 'Email Log', 'The log of Emails that have been delivered', 'post-smtp' ) );
if ($this->options->isMailLoggingEnabled ()) {
$goToEmailLog = sprintf ( '<a href="%s">%s</a>', PostmanUtils::getEmailLogPageUrl (), $goToEmailLog );
}
@@ -92,16 +92,16 @@ if (! class_exists ( "PostmanDashboardWidgetController" )) {
*/
public function print_postman_status() {
if (! PostmanPreRequisitesCheck::isReady ()) {
- printf ( '<p><span style="color:red">%s</span></p>', __ ( 'Error: Postman is missing a required PHP library.', Postman::TEXT_DOMAIN ) );
+ printf ( '<p><span style="color:red">%s</span></p>', __ ( 'Error: Postman is missing a required PHP library.', 'post-smtp' ) );
} else if ($this->wpMailBinder->isUnboundDueToException ()) {
- printf ( '<p><span style="color:red">%s</span></p>', __ ( 'Postman: wp_mail has been declared by another plugin or theme, so you won\'t be able to use Postman until the conflict is resolved.', Postman::TEXT_DOMAIN ) );
+ printf ( '<p><span style="color:red">%s</span></p>', __ ( 'Postman: wp_mail has been declared by another plugin or theme, so you won\'t be able to use Postman until the conflict is resolved.', 'post-smtp' ) );
} else {
if ($this->options->getRunMode () != PostmanOptions::RUN_MODE_PRODUCTION) {
- printf ( '<p><span style="background-color:yellow">%s</span></p>', __ ( 'Postman is in <em>non-Production</em> mode and is dumping all emails.', Postman::TEXT_DOMAIN ) );
+ printf ( '<p><span style="background-color:yellow">%s</span></p>', __ ( 'Postman is in <em>non-Production</em> mode and is dumping all emails.', 'post-smtp' ) );
} else if (PostmanTransportRegistry::getInstance ()->getSelectedTransport ()->isConfiguredAndReady ()) {
- printf ( '<p class="wp-menu-image dashicons-before dashicons-email"> %s </p>', sprintf ( _n ( '<span style="color:green">Postman is configured</span> and has delivered <span style="color:green">%d</span> email.', '<span style="color:green">Postman is configured</span> and has delivered <span style="color:green">%d</span> emails.', PostmanState::getInstance ()->getSuccessfulDeliveries (), Postman::TEXT_DOMAIN ), PostmanState::getInstance ()->getSuccessfulDeliveries () ) );
+ printf ( '<p class="wp-menu-image dashicons-before dashicons-email"> %s </p>', sprintf ( _n ( '<span style="color:green">Postman is configured</span> and has delivered <span style="color:green">%d</span> email.', '<span style="color:green">Postman is configured</span> and has delivered <span style="color:green">%d</span> emails.', PostmanState::getInstance ()->getSuccessfulDeliveries (), 'post-smtp' ), PostmanState::getInstance ()->getSuccessfulDeliveries () ) );
} else {
- printf ( '<p><span style="color:red">%s</span></p>', __ ( 'Postman is <em>not</em> configured and is mimicking out-of-the-box WordPress email delivery.', Postman::TEXT_DOMAIN ) );
+ printf ( '<p><span style="color:red">%s</span></p>', __ ( 'Postman is <em>not</em> configured and is mimicking out-of-the-box WordPress email delivery.', 'post-smtp' ) );
}
$currentTransport = PostmanTransportRegistry::getInstance ()->getActiveTransport ();
$deliveryDetails = $currentTransport->getDeliveryDetails ( $this->options );
@@ -113,14 +113,14 @@ if (! class_exists ( "PostmanDashboardWidgetController" )) {
* Create the function to output the contents of our Dashboard Widget.
*/
public function printNetworkDashboardWidget() {
- printf ( '<p class="wp-menu-image dashicons-before dashicons-email"> %s</p>', __ ( 'Postman is operating in per-site mode.', Postman::TEXT_DOMAIN ) );
+ printf ( '<p class="wp-menu-image dashicons-before dashicons-email"> %s</p>', __ ( 'Postman is operating in per-site mode.', 'post-smtp' ) );
}
/**
* From http://www.hughlashbrooke.com/2014/02/wordpress-add-items-glance-widget/
* http://coffeecupweb.com/how-to-add-custom-post-types-to-at-a-glance-dashboard-widget-in-wordpress/
*
- * @param unknown $items
+ * @param mixed $items
* @return string
*/
function customizeAtAGlanceDashboardWidget($items = array()) {
@@ -143,7 +143,7 @@ if (! class_exists ( "PostmanDashboardWidgetController" )) {
$privated = intval ( $num_posts->private );
$post_type = get_post_type_object ( $type );
- $text = _n ( '%s ' . $post_type->labels->singular_name, '%s ' . $post_type->labels->name, $privated, Postman::TEXT_DOMAIN );
+ $text = _n ( '%s ' . $post_type->labels->singular_name, '%s ' . $post_type->labels->name, $privated, 'post-smtp' );
$text = sprintf ( $text, number_format_i18n ( $privated ) );
$items [] = sprintf ( '<a class="%1$s-count" href="%3$s">%2$s</a>', $type, $text, PostmanUtils::getEmailLogPageUrl () ) . "\n";