summaryrefslogtreecommitdiff
path: root/Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php')
-rw-r--r--Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php29
1 files changed, 14 insertions, 15 deletions
diff --git a/Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php b/Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php
index c526113..82eb558 100644
--- a/Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php
+++ b/Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php
@@ -12,7 +12,7 @@ class PostmanDiagnosticTestController {
/**
* Constructor
*
- * @param unknown $rootPluginFilenameAndPath
+ * @param mixed $rootPluginFilenameAndPath
*/
public function __construct( $rootPluginFilenameAndPath ) {
assert( ! empty( $rootPluginFilenameAndPath ) );
@@ -77,7 +77,7 @@ class PostmanDiagnosticTestController {
* Register the Diagnostics screen
*/
public function addDiagnosticsSubmenu() {
- $page = add_submenu_page( null, sprintf( __( '%s Setup', Postman::TEXT_DOMAIN ), __( 'Postman SMTP', Postman::TEXT_DOMAIN ) ), __( 'Postman SMTP', Postman::TEXT_DOMAIN ), Postman::MANAGE_POSTMAN_CAPABILITY_NAME, PostmanDiagnosticTestController::DIAGNOSTICS_SLUG, array(
+ $page = add_submenu_page( null, sprintf( __( '%s Setup', 'post-smtp' ), __( 'Postman SMTP', 'post-smtp' ) ), __( 'Postman SMTP', 'post-smtp' ), Postman::MANAGE_POSTMAN_CAPABILITY_NAME, PostmanDiagnosticTestController::DIAGNOSTICS_SLUG, array(
$this,
'outputDiagnosticsContent',
) );
@@ -98,14 +98,14 @@ class PostmanDiagnosticTestController {
// test features
print '<div class="wrap">';
- PostmanViewController::outputChildPageHeader( __( 'Diagnostic Test', Postman::TEXT_DOMAIN ) );
+ PostmanViewController::outputChildPageHeader( __( 'Diagnostic Test', 'post-smtp' ) );
- printf( '<h4>%s</h4>', __( 'Are you having issues with Postman?', Postman::TEXT_DOMAIN ) );
+ printf( '<h4>%s</h4>', __( 'Are you having issues with Postman?', 'post-smtp' ) );
/* translators: where %1$s and %2$s are the URLs to the Troubleshooting and Support Forums on WordPress.org */
- printf( '<p style="margin:0 10px">%s</p>', sprintf( __( 'Please check the <a href="%1$s">troubleshooting and error messages</a> page and the <a href="%2$s">support forum</a>.', Postman::TEXT_DOMAIN ), 'https://wordpress.org/plugins/post-smtp/other_notes/', 'https://wordpress.org/support/plugin/post-smtp' ) );
- printf( '<h4>%s</h4>', __( 'Diagnostic Test', Postman::TEXT_DOMAIN ) );
- printf( '<p style="margin:0 10px">%s</p><br/>', sprintf( __( 'If you write for help, please include the following:', Postman::TEXT_DOMAIN ), 'https://wordpress.org/plugins/post-smtp/other_notes/', 'https://wordpress.org/support/plugin/post-smtp' ) );
- printf( '<textarea readonly="readonly" id="diagnostic-text" cols="80" rows="15">%s</textarea>', _x( 'Checking..', 'The "please wait" message', Postman::TEXT_DOMAIN ) );
+ printf( '<p style="margin:0 10px">%s</p>', sprintf( __( 'Please check the <a href="%1$s">troubleshooting and error messages</a> page and the <a href="%2$s">support forum</a>.', 'post-smtp' ), 'https://wordpress.org/plugins/post-smtp/other_notes/', 'https://wordpress.org/support/plugin/post-smtp' ) );
+ printf( '<h4>%s</h4>', __( 'Diagnostic Test', 'post-smtp' ) );
+ printf( '<p style="margin:0 10px">%s</p><br/>', sprintf( __( 'If you write for help, please include the following:', 'post-smtp' ), 'https://wordpress.org/plugins/post-smtp/other_notes/', 'https://wordpress.org/support/plugin/post-smtp' ) );
+ printf( '<textarea readonly="readonly" id="diagnostic-text" cols="80" rows="15">%s</textarea>', _x( 'Checking..', 'The "please wait" message', 'post-smtp' ) );
print '</div>';
}
}
@@ -210,6 +210,7 @@ class PostmanGetDiagnosticsViaAjax {
public function getDiagnostics() {
$curl = curl_version();
$transportRegistry = PostmanTransportRegistry::getInstance();
+ $this->addToDiagnostics( 'Mailer', PostmanOptions::getInstance()->getSmtpMailer() );
$this->addToDiagnostics( 'HostName', PostmanUtils::getServerName() );
$this->addToDiagnostics( 'cURL Version', $curl['version'] );
$this->addToDiagnostics( 'OpenSSL Version', $curl['ssl_version'] );
@@ -219,17 +220,15 @@ class PostmanGetDiagnosticsViaAjax {
$this->addToDiagnostics( 'WordPress', (is_multisite() ? 'Multisite ' : '') . get_bloginfo( 'version' ) . ' ' . get_locale() . ' ' . get_bloginfo( 'charset', 'display' ) );
$this->addToDiagnostics( 'WordPress Theme', wp_get_theme() );
$this->addToDiagnostics( 'WordPress Plugins', $this->getActivePlugins() );
- {
- $bindResult = apply_filters( 'postman_wp_mail_bind_status', null );
- $wp_mail_file_name = 'n/a';
+
+ $bindResult = apply_filters( 'postman_wp_mail_bind_status', null );
+ $wp_mail_file_name = 'n/a';
if ( class_exists( 'ReflectionFunction' ) ) {
$wp_mail = new ReflectionFunction( 'wp_mail' );
$wp_mail_file_name = realpath( $wp_mail->getFileName() );
}
- if ( ! $bindResult ['bound'] ) {
- $this->addToDiagnostics( 'WordPress wp_mail Owner', $wp_mail_file_name );
- }
- }
+
+ $this->addToDiagnostics( 'WordPress wp_mail Owner', $wp_mail_file_name );
$this->addToDiagnostics( 'WordPress wp_mail Filter(s)', $this->getFilters( 'wp_mail' ) );
$this->addToDiagnostics( 'WordPress wp_mail_from Filter(s)', $this->getFilters( 'wp_mail_from' ) );
$this->addToDiagnostics( 'WordPress wp_mail_from_name Filter(s)', $this->getFilters( 'wp_mail_from_name' ) );