summaryrefslogtreecommitdiff
path: root/Postman/Postman-Controller/PostmanDashboardWidgetController.php
diff options
context:
space:
mode:
authoryehuda <yehuda@myinbox.in>2019-05-16 12:15:39 +0300
committeryehuda <yehuda@myinbox.in>2019-05-16 12:15:39 +0300
commit6b0c4d5d97cac613ad8218fc9f0779eec63c28e3 (patch)
tree3ac2513ad5cb08650b03f55d837cf6b1d578dd21 /Postman/Postman-Controller/PostmanDashboardWidgetController.php
parentc88e7ad0b42cefd8fb7b509c8c2e355f567d9434 (diff)
parent09ad01149ef5981407149bc3c9502058482fb419 (diff)
downloadPost-SMTP-6b0c4d5d97cac613ad8218fc9f0779eec63c28e3.zip
Merge remote-tracking branch 'origin/dev'
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";