summaryrefslogtreecommitdiff
path: root/Postman/PostmanViewController.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/PostmanViewController.php')
-rw-r--r--Postman/PostmanViewController.php98
1 files changed, 52 insertions, 46 deletions
diff --git a/Postman/PostmanViewController.php b/Postman/PostmanViewController.php
index e170987..0aa4370 100644
--- a/Postman/PostmanViewController.php
+++ b/Postman/PostmanViewController.php
@@ -48,7 +48,7 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
check_ajax_referer( 'postsmtp', 'security' );
$version = sanitize_text_field($_POST['version']);
- $result = update_option('postman_release_version_'. $version, true );
+ $result = update_option('postman_release_version', true );
}
function delete_lock_file() {
@@ -302,7 +302,7 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
*/
private function displayTopNavigation() {
$version = PostmanState::getInstance()->getVersion();
- $show = get_option('postman_release_version_'. $version );
+ $show = get_option('postman_release_version' );
printf( '<h2>%s</h2>', sprintf( __( '%s Setup', 'post-smtp' ), __( 'Post SMTP', 'post-smtp' ) ) );
if ( ! $show ) {
@@ -316,50 +316,56 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
</button>
</div>';
}
-
- print '<div id="postman-main-menu" class="welcome-panel">';
- print '<div class="welcome-panel-content">';
- print '<div class="welcome-panel-column-container">';
- print '<div class="welcome-panel-column">';
- printf( '<h4>%s</h4>', __( 'Configuration', 'post-smtp' ) );
- printf( '<a class="button button-primary button-hero" href="%s">%s</a>', $this->getPageUrl( PostmanConfigurationController::CONFIGURATION_WIZARD_SLUG ), __( 'Start the Wizard', 'post-smtp' ) );
- printf( '<p class="">%s <a href="%s" class="configure_manually">%s</a></p>', __( 'or', 'post-smtp' ), $this->getPageUrl( PostmanConfigurationController::CONFIGURATION_SLUG ), __( 'Show All Settings', 'post-smtp' ) );
- print '</div>';
- print '<div class="welcome-panel-column">';
- printf( '<h4>%s</h4>', _x( 'Actions', 'Main Menu', 'post-smtp' ) );
- print '<ul>';
-
- // Grant permission with Google
- PostmanTransportRegistry::getInstance()->getSelectedTransport()->printActionMenuItem();
-
- if ( PostmanWpMailBinder::getInstance()->isBound() ) {
- printf( '<li><a href="%s" class="welcome-icon send_test_email">%s</a></li>', $this->getPageUrl( PostmanSendTestEmailController::EMAIL_TEST_SLUG ), __( 'Send a Test Email', 'post-smtp' ) );
- } else {
- printf( '<li><div class="welcome-icon send_test_email">%s</div></li>', __( 'Send a Test Email', 'post-smtp' ) );
- }
-
- // import-export-reset menu item
- if ( ! $this->options->isNew() || true ) {
- $purgeLinkPattern = '<li><a href="%1$s" class="welcome-icon oauth-authorize">%2$s</a></li>';
- } else {
- $purgeLinkPattern = '<li>%2$s</li>';
- }
- $importTitle = __( 'Import', 'post-smtp' );
- $exportTile = __( 'Export', 'post-smtp' );
- $resetTitle = __( 'Reset Plugin', 'post-smtp' );
- $importExportReset = sprintf( '%s/%s/%s', $importTitle, $exportTile, $resetTitle );
- printf( $purgeLinkPattern, $this->getPageUrl( PostmanAdminController::MANAGE_OPTIONS_PAGE_SLUG ), sprintf( '%s', $importExportReset ) );
- print '</ul>';
- print '</div>';
- print '<div class="welcome-panel-column welcome-panel-last">';
- printf( '<h4>%s</h4>', _x( 'Troubleshooting', 'Main Menu', 'post-smtp' ) );
- print '<ul>';
- printf( '<li><a href="%s" class="welcome-icon run-port-test">%s</a></li>', $this->getPageUrl( PostmanConnectivityTestController::PORT_TEST_SLUG ), __( 'Connectivity Test', 'post-smtp' ) );
- printf( '<li><a href="%s" class="welcome-icon run-port-test">%s</a></li>', $this->getPageUrl( PostmanDiagnosticTestController::DIAGNOSTICS_SLUG ), __( 'Diagnostic Test', 'post-smtp' ) );
- printf( '<li><a href="%s" data-security="%s" class="welcome-icon release-lock-file">%s</a></li>', '#', wp_create_nonce( "postman" ), __( 'Release Lock File Error', 'post-smtp' ) );
- printf( '<li><a href="https://postmansmtp.com/forums/" class="welcome-icon postman_support">%s</a></li>', __( 'Online Support', 'post-smtp' ) );
- printf( '<li><img class="align-middle" src="' . plugins_url( 'style/images/new.gif', dirname( __DIR__ ) . '/postman-smtp.php' ) . '"><a target="blank" class="align-middle" href="https://postmansmtp.com/category/guides/" class="welcome-icon postman_guides">%s</a></li>', __( 'Guides', 'post-smtp' ) );
- print '</ul></div></div></div></div>';
+ echo '<div class="twitter-wrap">';
+ print '<div id="postman-main-menu" class="welcome-panel">';
+ print '<div class="welcome-panel-content">';
+ print '<div class="welcome-panel-column-container">';
+ print '<div class="welcome-panel-column">';
+ printf( '<h4>%s</h4>', __( 'Configuration', 'post-smtp' ) );
+ printf( '<a class="button button-primary button-hero" href="%s">%s</a>', $this->getPageUrl( PostmanConfigurationController::CONFIGURATION_WIZARD_SLUG ), __( 'Start the Wizard', 'post-smtp' ) );
+ printf( '<p class="">%s <a href="%s" class="configure_manually">%s</a></p>', __( 'or', 'post-smtp' ), $this->getPageUrl( PostmanConfigurationController::CONFIGURATION_SLUG ), __( 'Show All Settings', 'post-smtp' ) );
+ print '</div>';
+ print '<div class="welcome-panel-column">';
+ printf( '<h4>%s</h4>', _x( 'Actions', 'Main Menu', 'post-smtp' ) );
+ print '<ul>';
+
+ // Grant permission with Google
+ PostmanTransportRegistry::getInstance()->getSelectedTransport()->printActionMenuItem();
+
+ if ( PostmanWpMailBinder::getInstance()->isBound() ) {
+ printf( '<li><a href="%s" class="welcome-icon send_test_email">%s</a></li>', $this->getPageUrl( PostmanSendTestEmailController::EMAIL_TEST_SLUG ), __( 'Send a Test Email', 'post-smtp' ) );
+ } else {
+ printf( '<li><div class="welcome-icon send_test_email">%s</div></li>', __( 'Send a Test Email', 'post-smtp' ) );
+ }
+
+ // import-export-reset menu item
+ if ( ! $this->options->isNew() || true ) {
+ $purgeLinkPattern = '<li><a href="%1$s" class="welcome-icon oauth-authorize">%2$s</a></li>';
+ } else {
+ $purgeLinkPattern = '<li>%2$s</li>';
+ }
+ $importTitle = __( 'Import', 'post-smtp' );
+ $exportTile = __( 'Export', 'post-smtp' );
+ $resetTitle = __( 'Reset Plugin', 'post-smtp' );
+ $importExportReset = sprintf( '%s/%s/%s', $importTitle, $exportTile, $resetTitle );
+ printf( $purgeLinkPattern, $this->getPageUrl( PostmanAdminController::MANAGE_OPTIONS_PAGE_SLUG ), sprintf( '%s', $importExportReset ) );
+ print '</ul>';
+ print '</div>';
+ print '<div class="welcome-panel-column welcome-panel-last">';
+ printf( '<h4>%s</h4>', _x( 'Troubleshooting', 'Main Menu', 'post-smtp' ) );
+ print '<ul>';
+ printf( '<li><a href="%s" class="welcome-icon run-port-test">%s</a></li>', $this->getPageUrl( PostmanConnectivityTestController::PORT_TEST_SLUG ), __( 'Connectivity Test', 'post-smtp' ) );
+ printf( '<li><a href="%s" class="welcome-icon run-port-test">%s</a></li>', $this->getPageUrl( PostmanDiagnosticTestController::DIAGNOSTICS_SLUG ), __( 'Diagnostic Test', 'post-smtp' ) );
+ printf( '<li><a href="%s" data-security="%s" class="welcome-icon release-lock-file">%s</a></li>', '#', wp_create_nonce( "postman" ), __( 'Release Lock File Error', 'post-smtp' ) );
+ printf( '<li><a href="https://postmansmtp.com/forums/" class="welcome-icon postman_support">%s</a></li>', __( 'Online Support', 'post-smtp' ) );
+ printf( '<li><img class="align-middle" src="' . plugins_url( 'style/images/new.gif', dirname( __DIR__ ) . '/postman-smtp.php' ) . '"><a target="blank" class="align-middle" href="https://postmansmtp.com/category/guides/" class="welcome-icon postman_guides">%s</a></li>', __( 'Guides', 'post-smtp' ) );
+ print '</ul></div></div></div></div>';
+ ?>
+ <div class="twitter-iframe-wrap">
+ <a class="twitter-timeline" data-height="304" href="https://twitter.com/PostSMTP?ref_src=twsrc%5Etfw">Tweets by PostSMTP</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
+ </div>
+ </div>
+ <?php
}
}
}