diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2018-04-04 19:17:51 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2018-04-04 19:17:51 +0000 |
commit | 62b95f35576ea9b9178b900f9480fed0466211a2 (patch) | |
tree | 746cfdf1c0cdc8408b312870f881ed3684d8d60b /Postman/PostmanViewController.php | |
parent | a83767b57bb15075e775f2336cfd77225b155799 (diff) | |
download | Post-SMTP-62b95f35576ea9b9178b900f9480fed0466211a2.zip |
notification & new gmail client
Diffstat (limited to 'Postman/PostmanViewController.php')
-rw-r--r-- | Postman/PostmanViewController.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Postman/PostmanViewController.php b/Postman/PostmanViewController.php index 991ea8a..35fb80a 100644 --- a/Postman/PostmanViewController.php +++ b/Postman/PostmanViewController.php @@ -36,10 +36,23 @@ if ( ! class_exists( 'PostmanViewController' ) ) { // initialize the scripts, stylesheets and form fields add_action( 'admin_init', array( $this, 'registerStylesAndScripts' ), 0 ); + add_action( 'wp_ajax_delete_lock_file', array( $this, 'delete_lock_file' ) ); //add_action( 'admin_init', array( $this, 'do_activation_redirect' ) ); } + function delete_lock_file() { + check_ajax_referer( 'postman', 'security' ); + + if ( ! PostmanUtils::lockFileExists() ) { + echo __('No lock file found.', Postman::TEXT_DOMAIN ); + die(); + } + + echo PostmanUtils::deleteLockFile() == true ? __('Success', Postman::TEXT_DOMAIN ) : __('Failed, try again.', Postman::TEXT_DOMAIN ); + die(); + } + function do_activation_redirect() { // Bail if no activation redirect @@ -317,6 +330,7 @@ if ( ! class_exists( 'PostmanViewController' ) ) { print '<ul>'; printf( '<li><a href="%s" class="welcome-icon run-port-test">%s</a></li>', $this->getPageUrl( PostmanConnectivityTestController::PORT_TEST_SLUG ), __( 'Connectivity Test', Postman::TEXT_DOMAIN ) ); printf( '<li><a href="%s" class="welcome-icon run-port-test">%s</a></li>', $this->getPageUrl( PostmanDiagnosticTestController::DIAGNOSTICS_SLUG ), __( 'Diagnostic Test', Postman::TEXT_DOMAIN ) ); + 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', Postman::TEXT_DOMAIN ) ); printf( '<li><a href="https://postmansmtp.com/forums/" class="welcome-icon postman_support">%s</a></li>', __( 'Online Support', Postman::TEXT_DOMAIN ) ); 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', Postman::TEXT_DOMAIN ) ); print '</ul></div></div></div></div>'; |