Version Description
- 2017-12-12 =
- Added: Automatic migration tool to move options from older storage format to a new one.
- Added: Added Gmail & G Suite email provider integration - without your email and password.
- Added: Added SendGrid email provider integration - using the API key only.
- Added: Added Mailgun email provider integration - using the API key and configured domain only.
- Added: New compatibility mode - for PHP 5.2 old plugin will be loaded, for PHP 5.3 and higher - new version of admin area and new functionality.
- Changed: The new look of the admin area.
- Changed: SMTP password field now has "password" type.
- Changed: SMTP password field does not display real password at all when using constants in
wp-config.php
to define it. - Changed: Escape properly all translations.
- Changed: More helpful test email content (with a mailer name).
Download this release
Release Info
Developer | jaredatch |
Plugin | ![]() |
Version | 1.0.0 |
Comparing to | |
See all releases |
Code changes from version 0.11.2 to 1.0.0
- assets/css/smtp-admin.min.css +3 -0
- assets/images/gmail.png +0 -0
- assets/images/logo.png +0 -0
- assets/images/mailgun.png +0 -0
- assets/images/pepipost.png +0 -0
- assets/images/php.png +0 -0
- assets/images/sendgrid.png +0 -0
- assets/images/smtp.png +0 -0
- assets/js/smtp-admin.js +36 -0
- assets/js/smtp-admin.min.js +1 -0
- class-wpms-am-notification.php +9 -27
- languages/wp-mail-smtp.pot +315 -47
- readme.txt +108 -43
- src/AM_Notification.php +452 -0
- src/Admin/Area.php +450 -0
- src/Admin/PageAbstract.php +66 -0
- src/Admin/PageInterface.php +45 -0
- src/Admin/Pages/Auth.php +56 -0
- src/Admin/Pages/Misc.php +99 -0
- src/Admin/Pages/Settings.php +236 -0
- src/Admin/Pages/Test.php +208 -0
- src/Core.php +213 -0
- src/MailCatcher.php +66 -0
- src/Migration.php +245 -0
- src/Options.php +469 -0
- src/Processor.php +169 -0
- src/Providers/AuthAbstract.php +22 -0
- src/Providers/AuthInterface.php +19 -0
- src/Providers/Gmail/Auth.php +299 -0
- src/Providers/Gmail/Mailer.php +173 -0
- src/Providers/Gmail/Options.php +131 -0
- src/Providers/Loader.php +178 -0
- src/Providers/Mail/Options.php +42 -0
- src/Providers/MailerAbstract.php +346 -0
- src/Providers/MailerInterface.php +139 -0
- src/Providers/Mailgun/Mailer.php +299 -0
- src/Providers/Mailgun/Options.php +106 -0
- src/Providers/OptionAbstract.php +291 -0
- src/Providers/OptionInterface.php +64 -0
- src/Providers/Pepipost/Options.php +29 -0
- src/Providers/SMTP/Options.php +45 -0
- src/Providers/Sendgrid/Mailer.php +294 -0
- src/Providers/Sendgrid/Options.php +89 -0
- src/WP.php +140 -0
- vendor/autoload.php +7 -0
- vendor/composer/ClassLoader.php +413 -0
- vendor/composer/LICENSE +21 -0
- vendor/composer/autoload_classmap.php +11 -0
- vendor/composer/autoload_files.php +27 -0
- vendor/composer/autoload_namespaces.php +11 -0
- vendor/composer/autoload_psr4.php +20 -0
- vendor/composer/autoload_real.php +70 -0
- vendor/composer/autoload_static.php +138 -0
- vendor/google/apiclient-services/LICENSE +203 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail.php +1136 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/AutoForwarding.php +48 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/BatchDeleteMessagesRequest.php +31 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/BatchModifyMessagesRequest.php +49 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Draft.php +46 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Filter.php +62 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/FilterAction.php +49 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/FilterCriteria.php +102 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ForwardingAddress.php +39 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/History.php +111 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryLabelAdded.php +47 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryLabelRemoved.php +47 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryMessageAdded.php +37 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/HistoryMessageDeleted.php +37 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ImapSettings.php +57 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Label.php +102 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListDraftsResponse.php +56 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListFiltersResponse.php +38 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListForwardingAddressesResponse.php +38 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListHistoryResponse.php +56 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListLabelsResponse.php +38 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListMessagesResponse.php +56 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListSendAsResponse.php +38 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListSmimeInfoResponse.php +38 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ListThreadsResponse.php +56 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Message.php +110 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePart.php +97 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePartBody.php +48 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/MessagePartHeader.php +39 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ModifyMessageRequest.php +40 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/ModifyThreadRequest.php +40 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/PopSettings.php +39 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Profile.php +57 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/Users.php +71 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php +130 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php +61 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php +120 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php +229 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessagesAttachments.php +44 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php +149 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsFilters.php +86 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php +97 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php +162 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAsSmimeInfo.php +115 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php +135 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/SendAs.php +109 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/SmimeInfo.php +84 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/SmtpMsa.php +66 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/Thread.php +65 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/VacationSettings.php +93 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/WatchRequest.php +49 -0
- vendor/google/apiclient-services/src/Google/Service/Gmail/WatchResponse.php +39 -0
- vendor/google/apiclient/LICENSE +203 -0
- vendor/google/apiclient/src/Google/AccessToken/Revoke.php +78 -0
- vendor/google/apiclient/src/Google/AccessToken/Verify.php +272 -0
- vendor/google/apiclient/src/Google/AuthHandler/AuthHandlerFactory.php +42 -0
- vendor/google/apiclient/src/Google/AuthHandler/Guzzle5AuthHandler.php +99 -0
- vendor/google/apiclient/src/Google/AuthHandler/Guzzle6AuthHandler.php +106 -0
- vendor/google/apiclient/src/Google/Client.php +1118 -0
- vendor/google/apiclient/src/Google/Collection.php +100 -0
- vendor/google/apiclient/src/Google/Exception.php +20 -0
- vendor/google/apiclient/src/Google/Http/Batch.php +249 -0
- vendor/google/apiclient/src/Google/Http/MediaFileUpload.php +351 -0
- vendor/google/apiclient/src/Google/Http/REST.php +182 -0
- vendor/google/apiclient/src/Google/Model.php +317 -0
- vendor/google/apiclient/src/Google/Service.php +56 -0
- vendor/google/apiclient/src/Google/Service/Exception.php +68 -0
- vendor/google/apiclient/src/Google/Service/Resource.php +296 -0
- vendor/google/apiclient/src/Google/Task/Exception.php +20 -0
- vendor/google/apiclient/src/Google/Task/Retryable.php +24 -0
- vendor/google/apiclient/src/Google/Task/Runner.php +281 -0
- vendor/google/apiclient/src/Google/Utils/UriTemplate.php +333 -0
- vendor/google/apiclient/src/Google/autoload.php +21 -0
- vendor/google/auth/COPYING +202 -0
- vendor/google/auth/LICENSE +203 -0
- vendor/google/auth/autoload.php +34 -0
- vendor/google/auth/src/ApplicationDefaultCredentials.php +173 -0
- vendor/google/auth/src/Cache/InvalidArgumentException.php +24 -0
- vendor/google/auth/src/Cache/Item.php +185 -0
- vendor/google/auth/src/Cache/MemoryCacheItemPool.php +154 -0
- vendor/google/auth/src/CacheTrait.php +83 -0
- vendor/google/auth/src/Credentials/AppIdentityCredentials.php +159 -0
- vendor/google/auth/src/Credentials/GCECredentials.php +219 -0
- vendor/google/auth/src/Credentials/IAMCredentials.php +89 -0
- vendor/google/auth/src/Credentials/ServiceAccountCredentials.php +177 -0
- vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php +131 -0
- vendor/google/auth/src/Credentials/UserRefreshCredentials.php +110 -0
- vendor/google/auth/src/CredentialsLoader.php +210 -0
- vendor/google/auth/src/FetchAuthTokenCache.php +108 -0
- vendor/google/auth/src/FetchAuthTokenInterface.php +55 -0
- vendor/google/auth/src/HttpHandler/Guzzle5HttpHandler.php +68 -0
- vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php +36 -0
- vendor/google/auth/src/HttpHandler/HttpHandlerFactory.php +47 -0
- vendor/google/auth/src/Middleware/AuthTokenMiddleware.php +126 -0
- vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php +175 -0
- vendor/google/auth/src/Middleware/SimpleMiddleware.php +93 -0
- vendor/google/auth/src/OAuth2.php +1335 -0
- vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php +118 -0
- vendor/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php +177 -0
- vendor/google/auth/src/Subscriber/SimpleSubscriber.php +90 -0
- vendor/guzzlehttp/guzzle/LICENSE +19 -0
- vendor/guzzlehttp/guzzle/src/Client.php +414 -0
- vendor/guzzlehttp/guzzle/src/ClientInterface.php +84 -0
- vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +314 -0
- vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +84 -0
- vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +90 -0
- vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +71 -0
- vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +404 -0
- vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +27 -0
- vendor/guzzlehttp/guzzle/src/Exception/ClientException.php +7 -0
- vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php +37 -0
- vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +4 -0
- vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +217 -0
- vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +27 -0
- vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +7 -0
- vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php +4 -0
- vendor/guzzlehttp/guzzle/src/Exception/TransferException.php +4 -0
- vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +559 -0
- vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +27 -0
- vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php +45 -0
- vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +197 -0
- vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +92 -0
- vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +189 -0
- vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +55 -0
- vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +533 -0
- vendor/guzzlehttp/guzzle/src/HandlerStack.php +273 -0
- vendor/guzzlehttp/guzzle/src/MessageFormatter.php +182 -0
- vendor/guzzlehttp/guzzle/src/Middleware.php +254 -0
- vendor/guzzlehttp/guzzle/src/Pool.php +123 -0
- vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +106 -0
- vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +237 -0
- vendor/guzzlehttp/guzzle/src/RequestOptions.php +255 -0
- vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +112 -0
- vendor/guzzlehttp/guzzle/src/TransferStats.php +126 -0
- vendor/guzzlehttp/guzzle/src/UriTemplate.php +241 -0
- vendor/guzzlehttp/guzzle/src/functions.php +331 -0
- vendor/guzzlehttp/guzzle/src/functions_include.php +6 -0
- vendor/guzzlehttp/promises/LICENSE +19 -0
- vendor/guzzlehttp/promises/src/AggregateException.php +16 -0
- vendor/guzzlehttp/promises/src/CancellationException.php +9 -0
- vendor/guzzlehttp/promises/src/Coroutine.php +151 -0
- vendor/guzzlehttp/promises/src/EachPromise.php +229 -0
- vendor/guzzlehttp/promises/src/FulfilledPromise.php +82 -0
- vendor/guzzlehttp/promises/src/Promise.php +280 -0
- vendor/guzzlehttp/promises/src/PromiseInterface.php +93 -0
- vendor/guzzlehttp/promises/src/PromisorInterface.php +15 -0
- vendor/guzzlehttp/promises/src/RejectedPromise.php +87 -0
- vendor/guzzlehttp/promises/src/RejectionException.php +47 -0
- vendor/guzzlehttp/promises/src/TaskQueue.php +66 -0
- vendor/guzzlehttp/promises/src/TaskQueueInterface.php +25 -0
- vendor/guzzlehttp/promises/src/functions.php +457 -0
- vendor/guzzlehttp/promises/src/functions_include.php +6 -0
- vendor/guzzlehttp/psr7/LICENSE +19 -0
- vendor/guzzlehttp/psr7/src/AppendStream.php +233 -0
- vendor/guzzlehttp/psr7/src/BufferStream.php +137 -0
- vendor/guzzlehttp/psr7/src/CachingStream.php +138 -0
- vendor/guzzlehttp/psr7/src/DroppingStream.php +42 -0
- vendor/guzzlehttp/psr7/src/FnStream.php +149 -0
- vendor/guzzlehttp/psr7/src/InflateStream.php +52 -0
- vendor/guzzlehttp/psr7/src/LazyOpenStream.php +39 -0
- vendor/guzzlehttp/psr7/src/LimitStream.php +155 -0
- vendor/guzzlehttp/psr7/src/MessageTrait.php +183 -0
- vendor/guzzlehttp/psr7/src/MultipartStream.php +153 -0
- vendor/guzzlehttp/psr7/src/NoSeekStream.php +22 -0
- vendor/guzzlehttp/psr7/src/PumpStream.php +165 -0
- vendor/guzzlehttp/psr7/src/Request.php +142 -0
- vendor/guzzlehttp/psr7/src/Response.php +132 -0
- vendor/guzzlehttp/psr7/src/ServerRequest.php +358 -0
- vendor/guzzlehttp/psr7/src/Stream.php +257 -0
- vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +149 -0
- vendor/guzzlehttp/psr7/src/StreamWrapper.php +121 -0
- vendor/guzzlehttp/psr7/src/UploadedFile.php +316 -0
- vendor/guzzlehttp/psr7/src/Uri.php +702 -0
- vendor/guzzlehttp/psr7/src/UriNormalizer.php +151 -0
assets/css/smtp-admin.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
#wpcontent{padding-left:0 !important;position:relative}@media (max-width: 320px){#wpcontent{padding-top:46px}}@media (max-width: 320px){#wpbody{padding-top:0}}#wp-mail-smtp-header{background-color:#f1f3f7;border-top:3px solid #FF982D;padding:20px}#wp-mail-smtp-header img{display:block;margin:0;max-width:242px}@media (max-width: 768px){#wp-mail-smtp-header img{max-width:200px}}#wp-mail-smtp{margin:0}#wp-mail-smtp .wp-mail-smtp-page-title{background-color:#fff;font-size:14px;margin:0 0 20px 0;padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-title a{border-bottom:2px solid #fff;box-shadow:none;color:#666;display:inline-block;margin-right:30px;padding:20px 0 18px 0;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-title a.active{border-bottom:2px solid #FF982D}#wp-mail-smtp .wp-mail-smtp-page-title a:hover{border-color:#999}#wp-mail-smtp .wp-mail-smtp-page{padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page *,#wp-mail-smtp .wp-mail-smtp-page *::before,#wp-mail-smtp .wp-mail-smtp-page *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-clear:before{content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-clear:after{clear:both;content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row{border-bottom:1px solid #e4e4e4;padding:30px 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row:first-of-type{padding-top:10px !important}@media (max-width: 767px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row{padding:20px 0}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.inactive{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading{padding:20px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading.no-desc h2,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading.no-desc h4{margin:0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.section-heading .wp-mail-smtp-setting-field{margin:0;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]{float:left;margin:1px 0 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label{margin:0 0 0 8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox .desc{margin:0 0 0 30px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label+.desc{margin:8px 0 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-text .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-password .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-number .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-email .wp-mail-smtp-setting-label{padding-top:8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-select .wp-mail-smtp-setting-label{padding-top:8px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-radio .wp-mail-smtp-setting-field input[type=radio]{margin:-3px 10px 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-radio .wp-mail-smtp-setting-field label{margin-right:30px;display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field label{vertical-align:middle;display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field label:hover .wp-mail-smtp-setting-toggle-switch{background-color:#999}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch{background-color:#83c11f}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px)}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label{display:inline-block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:checked+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label+.wp-mail-smtp-setting-toggle-unchecked-label{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-unchecked-label,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-checked-label{text-transform:uppercase;font-weight:700;font-size:13px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-checked-label{display:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-switch{position:relative;cursor:pointer;background-color:#ccc;border-radius:15px;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;vertical-align:middle;position:relative;display:inline-block;margin:0 5px 0 0;width:40px;height:20px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field .wp-mail-smtp-setting-toggle-switch:before{position:absolute;content:"";height:14px;width:14px;left:3px;top:3px;background-color:#fff;border-radius:50%;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer{padding-bottom:20px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer{display:inline-block;width:140px;margin-right:10px;margin-bottom:10px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:last-child{margin-right:0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image{background:#fff;text-align:center;border:2px solid #E5E5E5;border-radius:4px;height:76px;position:relative;margin-bottom:10px;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image img{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);opacity:0.6;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image{border-color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image{border-color:#ccc}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h2,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h4{color:#444;font-size:20px;font-weight:700;margin:0 0 6px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row h3{color:#444;font-size:24px;font-weight:600;margin:0 0 20px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p{margin:12px 0 0;font-size:14px;line-height:1.3}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p:first-of-type{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row p.desc{font-style:italic;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]{background-color:#fff;border:1px solid #ddd;border-radius:3px;box-shadow:none;color:#333;display:inline-block;vertical-align:middle;padding:7px 12px;margin:0 10px 0 0;width:400px;min-height:35px}@media (max-width: 1023px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]{width:300px}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number][readonly],#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password][readonly]{background-color:#f9f9f9}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number].small-text,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password].small-text{width:75px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number]:focus,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]:focus{border-color:#bbb}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=text]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=email]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=number]:disabled,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-row input[type=password]:disabled{opacity:0.6}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label{display:block;float:left;width:200px;padding:0}@media (max-width: 767px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label{float:none;width:100%;padding-bottom:15px}}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-label label{display:block;font-weight:600}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-field{display:block;margin:0 0 0 200px;max-width:800px}@media (max-width: 767px){#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-setting-field{margin:0}}#wp-mail-smtp .wp-mail-smtp-page p.wp-mail-smtp-submit{margin:0;padding:25px 0}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-mailer-options .wp-mail-smtp-mailer-option .wp-mail-smtp-setting-row.section-heading{padding:20px 0 !important}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-mailer-options .wp-mail-smtp-mailer-option blockquote{background:#E5E5E5;border-radius:4px;color:#666;font-size:14px;margin:20px 0;padding:15px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn{border:0;border-radius:3px;cursor:pointer;display:inline-block;margin:0;text-decoration:none;text-align:center;vertical-align:middle;white-space:nowrap;text-shadow:none;box-shadow:none;outline:none}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn .dashicons{font-size:16px;width:16px;height:16px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-block{display:block}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-md{font-size:13px;font-weight:600;padding:8px 12px;min-height:35px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-lg{font-size:16px;font-weight:600;padding:16px 28px}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange{background-color:#FF982D;border-color:#FF982D;color:#fff}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-orange:focus{background-color:#f97f00;border-color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey{background-color:#eee;border-color:#ccc;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-grey:focus{background-color:#d7d7d7;border-color:#ccc;color:#444}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:hover,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:active,#wp-mail-smtp .wp-mail-smtp-page .wp-mail-smtp-btn-light-grey:focus{background-color:#eee;color:#444}#wp-mail-smtp .wp-mail-smtp-page p{margin:0}#wp-mail-smtp .wp-mail-smtp-page .notice p{margin:0.5em 0}#wp-mail-smtp .wp-mail-smtp-page pre{white-space:pre-line}#wp-mail-smtp .wp-mail-smtp-page.active{display:block}
|
2 |
+
|
3 |
+
/*# sourceMappingURL=smtp-admin.min.css.map */
|
assets/images/gmail.png
ADDED
Binary file
|
assets/images/logo.png
ADDED
Binary file
|
assets/images/mailgun.png
ADDED
Binary file
|
assets/images/pepipost.png
ADDED
Binary file
|
assets/images/php.png
ADDED
Binary file
|
assets/images/sendgrid.png
ADDED
Binary file
|
assets/images/smtp.png
ADDED
Binary file
|
assets/js/smtp-admin.js
ADDED
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/* globals jQuery */
|
2 |
+
jQuery( document ).ready( function ( $ ) {
|
3 |
+
|
4 |
+
$( '.wp-mail-smtp-mailer input' ).click( function () {
|
5 |
+
if ( $( this ).prop( 'disabled' ) ) {
|
6 |
+
return false;
|
7 |
+
}
|
8 |
+
|
9 |
+
// Deselect the current mailer.
|
10 |
+
$( '.wp-mail-smtp-mailer' ).removeClass( 'active' );
|
11 |
+
// Select the correct one.
|
12 |
+
$( this ).parents( '.wp-mail-smtp-mailer' ).addClass( 'active' );
|
13 |
+
|
14 |
+
$( '.wp-mail-smtp-mailer-option' ).addClass( 'hidden' ).removeClass( 'active' );
|
15 |
+
$( '.wp-mail-smtp-mailer-option-' + $( this ).val() ).addClass( 'active' ).removeClass( 'hidden' );
|
16 |
+
} );
|
17 |
+
|
18 |
+
$( '.wp-mail-smtp-mailer-image' ).click( function () {
|
19 |
+
$( this ).parents( '.wp-mail-smtp-mailer' ).find( 'input' ).trigger( 'click' );
|
20 |
+
} );
|
21 |
+
|
22 |
+
$( '.wp-mail-smtp-setting-copy' ).click( function ( e ) {
|
23 |
+
e.preventDefault();
|
24 |
+
|
25 |
+
var target = $( '#' + $( this ).data( 'source_id' ) ).get(0);
|
26 |
+
|
27 |
+
target.select();
|
28 |
+
|
29 |
+
document.execCommand( 'Copy' );
|
30 |
+
} );
|
31 |
+
|
32 |
+
$( '#wp-mail-smtp-setting-smtp-auth' ).change(function() {
|
33 |
+
$( '#wp-mail-smtp-setting-row-smtp-user, #wp-mail-smtp-setting-row-smtp-pass' ).toggleClass( 'inactive' );
|
34 |
+
});
|
35 |
+
|
36 |
+
} );
|
assets/js/smtp-admin.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
jQuery(document).ready(function(i){i(".wp-mail-smtp-mailer input").click(function(){if(i(this).prop("disabled"))return!1;i(".wp-mail-smtp-mailer").removeClass("active"),i(this).parents(".wp-mail-smtp-mailer").addClass("active"),i(".wp-mail-smtp-mailer-option").addClass("hidden").removeClass("active"),i(".wp-mail-smtp-mailer-option-"+i(this).val()).addClass("active").removeClass("hidden")}),i(".wp-mail-smtp-mailer-image").click(function(){i(this).parents(".wp-mail-smtp-mailer").find("input").trigger("click")}),i(".wp-mail-smtp-setting-copy").click(function(t){t.preventDefault();i("#"+i(this).data("source_id")).get(0).select(),document.execCommand("Copy")}),i("#wp-mail-smtp-setting-smtp-auth").change(function(){i("#wp-mail-smtp-setting-row-smtp-user, #wp-mail-smtp-setting-row-smtp-pass").toggleClass("inactive")})});
|
class-wpms-am-notification.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
Â
* @author Benjamin Rojas
|
11 |
Â
* @license GPL-2.0+
|
12 |
Â
* @copyright Copyright (c) 2017, Retyp LLC
|
13 |
-
* @version 1.0.
|
14 |
Â
*/
|
15 |
Â
class WPMS_AM_Notification {
|
16 |
Â
/**
|
@@ -41,24 +41,6 @@ class WPMS_AM_Notification {
|
|
41 |
Â
*/
|
42 |
Â
public $plugin_version;
|
43 |
Â
|
44 |
-
/**
|
45 |
-
* The list of installed plugins.
|
46 |
-
*
|
47 |
-
* @since 1.0.0
|
48 |
-
*
|
49 |
-
* @var array
|
50 |
-
*/
|
51 |
-
public $plugin_list = array();
|
52 |
-
|
53 |
-
/**
|
54 |
-
* The list of installed themes.
|
55 |
-
*
|
56 |
-
* @since 1.0.0
|
57 |
-
*
|
58 |
-
* @var string
|
59 |
-
*/
|
60 |
-
public $theme_list = array();
|
61 |
-
|
62 |
Â
/**
|
63 |
Â
* Flag if a notice has been registered.
|
64 |
Â
*
|
@@ -93,7 +75,9 @@ class WPMS_AM_Notification {
|
|
93 |
Â
*/
|
94 |
Â
public function custom_post_type() {
|
95 |
Â
register_post_type( 'amn_' . $this->plugin, array(
|
96 |
-
'
|
Â
|
|
Â
|
|
97 |
Â
) );
|
98 |
Â
}
|
99 |
Â
|
@@ -111,7 +95,7 @@ class WPMS_AM_Notification {
|
|
111 |
Â
|
112 |
Â
if ( $last_checked < strtotime( 'today midnight' ) ) {
|
113 |
Â
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
114 |
-
$notification_id
|
115 |
Â
|
116 |
Â
if ( ! empty( $plugin_notifications ) ) {
|
117 |
Â
// Unset it from the array.
|
@@ -123,7 +107,7 @@ class WPMS_AM_Notification {
|
|
123 |
Â
'body' => array(
|
124 |
Â
'slug' => $this->plugin,
|
125 |
Â
'version' => $this->plugin_version,
|
126 |
-
'last_notification' => $notification_id
|
127 |
Â
),
|
128 |
Â
) ) );
|
129 |
Â
|
@@ -156,8 +140,6 @@ class WPMS_AM_Notification {
|
|
156 |
Â
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
157 |
Â
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
158 |
Â
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
159 |
-
update_post_meta( $new_notification_id, 'plugins', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->plugins ) : json_encode( $data->plugins ) );
|
160 |
-
update_post_meta( $new_notification_id, 'theme', sanitize_text_field( trim( $data->theme ) ) );
|
161 |
Â
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
162 |
Â
update_post_meta( $new_notification_id, 'viewed', 0 );
|
163 |
Â
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
@@ -188,8 +170,8 @@ class WPMS_AM_Notification {
|
|
188 |
Â
public function get_plugin_notifications( $limit = -1, $args = array() ) {
|
189 |
Â
return get_posts(
|
190 |
Â
array(
|
191 |
-
'
|
192 |
-
'post_type'
|
193 |
Â
) + $args
|
194 |
Â
);
|
195 |
Â
}
|
@@ -343,7 +325,7 @@ class WPMS_AM_Notification {
|
|
343 |
Â
*/
|
344 |
Â
public function get_plan_level() {
|
345 |
Â
// Prepare variables.
|
346 |
-
$key
|
347 |
Â
$level = '';
|
348 |
Â
$option = false;
|
349 |
Â
switch ( $this->plugin ) {
|
10 |
Â
* @author Benjamin Rojas
|
11 |
Â
* @license GPL-2.0+
|
12 |
Â
* @copyright Copyright (c) 2017, Retyp LLC
|
13 |
+
* @version 1.0.2
|
14 |
Â
*/
|
15 |
Â
class WPMS_AM_Notification {
|
16 |
Â
/**
|
41 |
Â
*/
|
42 |
Â
public $plugin_version;
|
43 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
44 |
Â
/**
|
45 |
Â
* Flag if a notice has been registered.
|
46 |
Â
*
|
75 |
Â
*/
|
76 |
Â
public function custom_post_type() {
|
77 |
Â
register_post_type( 'amn_' . $this->plugin, array(
|
78 |
+
'label' => $this->plugin . ' Announcements',
|
79 |
+
'can_export' => false,
|
80 |
+
'supports' => false,
|
81 |
Â
) );
|
82 |
Â
}
|
83 |
Â
|
95 |
Â
|
96 |
Â
if ( $last_checked < strtotime( 'today midnight' ) ) {
|
97 |
Â
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
98 |
+
$notification_id = null;
|
99 |
Â
|
100 |
Â
if ( ! empty( $plugin_notifications ) ) {
|
101 |
Â
// Unset it from the array.
|
107 |
Â
'body' => array(
|
108 |
Â
'slug' => $this->plugin,
|
109 |
Â
'version' => $this->plugin_version,
|
110 |
+
'last_notification' => $notification_id,
|
111 |
Â
),
|
112 |
Â
) ) );
|
113 |
Â
|
140 |
Â
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
141 |
Â
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
142 |
Â
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
Â
|
|
Â
|
|
143 |
Â
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
144 |
Â
update_post_meta( $new_notification_id, 'viewed', 0 );
|
145 |
Â
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
170 |
Â
public function get_plugin_notifications( $limit = -1, $args = array() ) {
|
171 |
Â
return get_posts(
|
172 |
Â
array(
|
173 |
+
'posts_per_page' => $limit,
|
174 |
+
'post_type' => 'amn_' . $this->plugin,
|
175 |
Â
) + $args
|
176 |
Â
);
|
177 |
Â
}
|
325 |
Â
*/
|
326 |
Â
public function get_plan_level() {
|
327 |
Â
// Prepare variables.
|
328 |
+
$key = '';
|
329 |
Â
$level = '';
|
330 |
Â
$option = false;
|
331 |
Â
switch ( $this->plugin ) {
|
languages/wp-mail-smtp.pot
CHANGED
@@ -14,190 +14,458 @@ msgstr ""
|
|
14 |
Â
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
Â
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
Â
|
17 |
-
#: wp_mail_smtp.php:
|
18 |
Â
msgid "Test mail to %s"
|
19 |
Â
msgstr ""
|
20 |
Â
|
21 |
-
#: wp_mail_smtp.php:
|
22 |
Â
msgid "This is a test email generated by the WP Mail SMTP WordPress plugin."
|
23 |
Â
msgstr ""
|
24 |
Â
|
25 |
-
#: wp_mail_smtp.php:
|
26 |
Â
msgid "Test Message Sent"
|
27 |
Â
msgstr ""
|
28 |
Â
|
29 |
-
#: wp_mail_smtp.php:
|
30 |
Â
msgid "The result was:"
|
31 |
Â
msgstr ""
|
32 |
Â
|
33 |
-
#: wp_mail_smtp.php:
|
34 |
Â
msgid "The full debugging output is shown below:"
|
35 |
Â
msgstr ""
|
36 |
Â
|
37 |
-
#: wp_mail_smtp.php:
|
38 |
Â
msgid "The SMTP debugging output is shown below:"
|
39 |
Â
msgstr ""
|
40 |
Â
|
41 |
-
#: wp_mail_smtp.php:
|
42 |
Â
msgid "Send Test"
|
43 |
Â
msgstr ""
|
44 |
Â
|
45 |
-
#: wp_mail_smtp.php:
|
46 |
Â
msgid "WP Mail SMTP Settings"
|
47 |
Â
msgstr ""
|
48 |
Â
|
49 |
-
#: wp_mail_smtp.php:
|
50 |
Â
msgid "From Email"
|
51 |
Â
msgstr ""
|
52 |
Â
|
53 |
-
#: wp_mail_smtp.php:
|
54 |
Â
msgid "You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used."
|
55 |
Â
msgstr ""
|
56 |
Â
|
57 |
-
#: wp_mail_smtp.php:
|
58 |
Â
msgid "<strong>Please Note:</strong> You appear to be using a version of WordPress prior to 2.3. Please ignore the From Name field and instead enter Name<email@domain.com> in this field."
|
59 |
Â
msgstr ""
|
60 |
Â
|
61 |
-
#: wp_mail_smtp.php:
|
62 |
Â
msgid "From Name"
|
63 |
Â
msgstr ""
|
64 |
Â
|
65 |
-
#: wp_mail_smtp.php:
|
66 |
Â
msgid "You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress."
|
67 |
Â
msgstr ""
|
68 |
Â
|
69 |
-
#: wp_mail_smtp.php:
|
70 |
Â
msgid "Mailer"
|
71 |
Â
msgstr ""
|
72 |
Â
|
73 |
-
#: wp_mail_smtp.php:
|
74 |
Â
msgid "Send all WordPress emails via SMTP."
|
75 |
Â
msgstr ""
|
76 |
Â
|
77 |
-
#: wp_mail_smtp.php:
|
78 |
Â
msgid "Use the PHP mail() function to send emails."
|
79 |
Â
msgstr ""
|
80 |
Â
|
81 |
-
#: wp_mail_smtp.php:
|
82 |
Â
msgid "Use Pepipost SMTP to send emails."
|
83 |
Â
msgstr ""
|
84 |
Â
|
85 |
-
#: wp_mail_smtp.php:
|
86 |
Â
msgid "Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s."
|
87 |
Â
msgstr ""
|
88 |
Â
|
89 |
-
#: wp_mail_smtp.php:
|
90 |
Â
msgid "Return Path"
|
91 |
Â
msgstr ""
|
92 |
Â
|
93 |
-
#: wp_mail_smtp.php:
|
94 |
Â
msgid "Set the return-path to match the From Email"
|
95 |
Â
msgstr ""
|
96 |
Â
|
97 |
-
#: wp_mail_smtp.php:
|
98 |
Â
msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent."
|
99 |
Â
msgstr ""
|
100 |
Â
|
101 |
-
#: wp_mail_smtp.php:
|
102 |
Â
msgid "Hide Announcements"
|
103 |
Â
msgstr ""
|
104 |
Â
|
105 |
-
#: wp_mail_smtp.php:
|
106 |
Â
msgid "Check this if you would like to hide plugin announcements and update details."
|
107 |
Â
msgstr ""
|
108 |
Â
|
109 |
-
#: wp_mail_smtp.php:
|
110 |
Â
msgid "Save Changes"
|
111 |
Â
msgstr ""
|
112 |
Â
|
113 |
-
#: wp_mail_smtp.php:
|
114 |
Â
msgid "SMTP Options"
|
115 |
Â
msgstr ""
|
116 |
Â
|
117 |
-
#: wp_mail_smtp.php:
|
118 |
Â
msgid "These options only apply if you have chosen to send mail by SMTP above."
|
119 |
Â
msgstr ""
|
120 |
Â
|
121 |
-
#: wp_mail_smtp.php:
|
122 |
Â
msgid "SMTP Host"
|
123 |
Â
msgstr ""
|
124 |
Â
|
125 |
-
#: wp_mail_smtp.php:
|
126 |
Â
msgid "SMTP Port"
|
127 |
Â
msgstr ""
|
128 |
Â
|
129 |
-
#: wp_mail_smtp.php:
|
130 |
Â
msgid "Encryption"
|
131 |
Â
msgstr ""
|
132 |
Â
|
133 |
-
#: wp_mail_smtp.php:
|
134 |
Â
msgid "No encryption."
|
135 |
Â
msgstr ""
|
136 |
Â
|
137 |
-
#: wp_mail_smtp.php:
|
138 |
Â
msgid "Use SSL encryption."
|
139 |
Â
msgstr ""
|
140 |
Â
|
141 |
-
#: wp_mail_smtp.php:
|
142 |
Â
msgid "Use TLS encryption."
|
143 |
Â
msgstr ""
|
144 |
Â
|
145 |
-
#: wp_mail_smtp.php:
|
146 |
Â
msgid "TLS is not the same as STARTTLS. For most servers SSL is the recommended option."
|
147 |
Â
msgstr ""
|
148 |
Â
|
149 |
-
#: wp_mail_smtp.php:
|
150 |
Â
msgid "Authentication"
|
151 |
Â
msgstr ""
|
152 |
Â
|
153 |
-
#: wp_mail_smtp.php:
|
154 |
Â
msgid "No: Do not use SMTP authentication."
|
155 |
Â
msgstr ""
|
156 |
Â
|
157 |
-
#: wp_mail_smtp.php:
|
158 |
Â
msgid "Yes: Use SMTP authentication."
|
159 |
Â
msgstr ""
|
160 |
Â
|
161 |
-
#: wp_mail_smtp.php:
|
162 |
Â
msgid "If this is set to no, the values below are ignored."
|
163 |
Â
msgstr ""
|
164 |
Â
|
165 |
-
#: wp_mail_smtp.php:
|
166 |
Â
msgid "Username"
|
167 |
Â
msgstr ""
|
168 |
Â
|
169 |
-
#: wp_mail_smtp.php:
|
170 |
Â
msgid "Password"
|
171 |
Â
msgstr ""
|
172 |
Â
|
173 |
-
#: wp_mail_smtp.php:
|
174 |
Â
msgid "This is in plain text because it must not be stored encrypted."
|
175 |
Â
msgstr ""
|
176 |
Â
|
177 |
-
#: wp_mail_smtp.php:
|
178 |
Â
msgid "Pepipost SMTP Options"
|
179 |
Â
msgstr ""
|
180 |
Â
|
181 |
-
#: wp_mail_smtp.php:
|
182 |
Â
msgid "You need to signup on %s to get the SMTP username/password."
|
183 |
Â
msgstr ""
|
184 |
Â
|
185 |
-
#: wp_mail_smtp.php:
|
186 |
Â
msgid "Send a Test Email"
|
187 |
Â
msgstr ""
|
188 |
Â
|
189 |
-
#: wp_mail_smtp.php:
|
190 |
Â
msgid "To"
|
191 |
Â
msgstr ""
|
192 |
Â
|
193 |
-
#: wp_mail_smtp.php:
|
194 |
Â
msgid "Type an email address here and then click Send Test to generate a test email."
|
195 |
Â
msgstr ""
|
196 |
Â
|
197 |
-
#: wp_mail_smtp.php:
|
198 |
Â
msgid "WP Mail SMTP"
|
199 |
Â
msgstr ""
|
200 |
Â
|
201 |
-
#: wp_mail_smtp.php:
|
202 |
Â
msgid "Settings"
|
203 |
Â
msgstr ""
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
14 |
Â
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
Â
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
Â
|
17 |
+
#: wp_mail_smtp.php:251
|
18 |
Â
msgid "Test mail to %s"
|
19 |
Â
msgstr ""
|
20 |
Â
|
21 |
+
#: wp_mail_smtp.php:252
|
22 |
Â
msgid "This is a test email generated by the WP Mail SMTP WordPress plugin."
|
23 |
Â
msgstr ""
|
24 |
Â
|
25 |
+
#: wp_mail_smtp.php:268
|
26 |
Â
msgid "Test Message Sent"
|
27 |
Â
msgstr ""
|
28 |
Â
|
29 |
+
#: wp_mail_smtp.php:269
|
30 |
Â
msgid "The result was:"
|
31 |
Â
msgstr ""
|
32 |
Â
|
33 |
+
#: wp_mail_smtp.php:272
|
34 |
Â
msgid "The full debugging output is shown below:"
|
35 |
Â
msgstr ""
|
36 |
Â
|
37 |
+
#: wp_mail_smtp.php:275
|
38 |
Â
msgid "The SMTP debugging output is shown below:"
|
39 |
Â
msgstr ""
|
40 |
Â
|
41 |
+
#: wp_mail_smtp.php:242, wp_mail_smtp.php:616
|
42 |
Â
msgid "Send Test"
|
43 |
Â
msgstr ""
|
44 |
Â
|
45 |
+
#: wp_mail_smtp.php:287, wp_mail_smtp.php:652
|
46 |
Â
msgid "WP Mail SMTP Settings"
|
47 |
Â
msgstr ""
|
48 |
Â
|
49 |
+
#: wp_mail_smtp.php:296, src/Admin/Pages/Settings.php:57
|
50 |
Â
msgid "From Email"
|
51 |
Â
msgstr ""
|
52 |
Â
|
53 |
+
#: wp_mail_smtp.php:303
|
54 |
Â
msgid "You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used."
|
55 |
Â
msgstr ""
|
56 |
Â
|
57 |
+
#: wp_mail_smtp.php:306
|
58 |
Â
msgid "<strong>Please Note:</strong> You appear to be using a version of WordPress prior to 2.3. Please ignore the From Name field and instead enter Name<email@domain.com> in this field."
|
59 |
Â
msgstr ""
|
60 |
Â
|
61 |
+
#: wp_mail_smtp.php:315, src/Admin/Pages/Settings.php:84
|
62 |
Â
msgid "From Name"
|
63 |
Â
msgstr ""
|
64 |
Â
|
65 |
+
#: wp_mail_smtp.php:321
|
66 |
Â
msgid "You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress."
|
67 |
Â
msgstr ""
|
68 |
Â
|
69 |
+
#: wp_mail_smtp.php:330, wp_mail_smtp.php:335, src/Admin/Pages/Settings.php:108
|
70 |
Â
msgid "Mailer"
|
71 |
Â
msgstr ""
|
72 |
Â
|
73 |
+
#: wp_mail_smtp.php:340
|
74 |
Â
msgid "Send all WordPress emails via SMTP."
|
75 |
Â
msgstr ""
|
76 |
Â
|
77 |
+
#: wp_mail_smtp.php:344
|
78 |
Â
msgid "Use the PHP mail() function to send emails."
|
79 |
Â
msgstr ""
|
80 |
Â
|
81 |
+
#: wp_mail_smtp.php:350
|
82 |
Â
msgid "Use Pepipost SMTP to send emails."
|
83 |
Â
msgstr ""
|
84 |
Â
|
85 |
+
#: wp_mail_smtp.php:356
|
86 |
Â
msgid "Looking for high inbox delivery? Try Pepipost with easy setup and free emails. Learn more %1$shere%2$s."
|
87 |
Â
msgstr ""
|
88 |
Â
|
89 |
+
#: wp_mail_smtp.php:371, wp_mail_smtp.php:376, src/Admin/Pages/Settings.php:141
|
90 |
Â
msgid "Return Path"
|
91 |
Â
msgstr ""
|
92 |
Â
|
93 |
+
#: wp_mail_smtp.php:381, src/Admin/Pages/Settings.php:149
|
94 |
Â
msgid "Set the return-path to match the From Email"
|
95 |
Â
msgstr ""
|
96 |
Â
|
97 |
+
#: wp_mail_smtp.php:385, src/Admin/Pages/Settings.php:151
|
98 |
Â
msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent."
|
99 |
Â
msgstr ""
|
100 |
Â
|
101 |
+
#: wp_mail_smtp.php:395, wp_mail_smtp.php:400, src/Admin/Pages/Misc.php:55
|
102 |
Â
msgid "Hide Announcements"
|
103 |
Â
msgstr ""
|
104 |
Â
|
105 |
+
#: wp_mail_smtp.php:405, src/Admin/Pages/Misc.php:62
|
106 |
Â
msgid "Check this if you would like to hide plugin announcements and update details."
|
107 |
Â
msgstr ""
|
108 |
Â
|
109 |
+
#: wp_mail_smtp.php:413, wp_mail_smtp.php:513, wp_mail_smtp.php:589
|
110 |
Â
msgid "Save Changes"
|
111 |
Â
msgstr ""
|
112 |
Â
|
113 |
+
#: wp_mail_smtp.php:418
|
114 |
Â
msgid "SMTP Options"
|
115 |
Â
msgstr ""
|
116 |
Â
|
117 |
+
#: wp_mail_smtp.php:420
|
118 |
Â
msgid "These options only apply if you have chosen to send mail by SMTP above."
|
119 |
Â
msgstr ""
|
120 |
Â
|
121 |
+
#: wp_mail_smtp.php:425, src/Providers/OptionAbstract.php:126
|
122 |
Â
msgid "SMTP Host"
|
123 |
Â
msgstr ""
|
124 |
Â
|
125 |
+
#: wp_mail_smtp.php:433, wp_mail_smtp.php:551, src/Providers/OptionAbstract.php:140
|
126 |
Â
msgid "SMTP Port"
|
127 |
Â
msgstr ""
|
128 |
Â
|
129 |
+
#: wp_mail_smtp.php:440, wp_mail_smtp.php:444, wp_mail_smtp.php:559, wp_mail_smtp.php:565, src/Providers/OptionAbstract.php:154
|
130 |
Â
msgid "Encryption"
|
131 |
Â
msgstr ""
|
132 |
Â
|
133 |
+
#: wp_mail_smtp.php:449, wp_mail_smtp.php:571
|
134 |
Â
msgid "No encryption."
|
135 |
Â
msgstr ""
|
136 |
Â
|
137 |
+
#: wp_mail_smtp.php:454, wp_mail_smtp.php:576
|
138 |
Â
msgid "Use SSL encryption."
|
139 |
Â
msgstr ""
|
140 |
Â
|
141 |
+
#: wp_mail_smtp.php:459, wp_mail_smtp.php:581
|
142 |
Â
msgid "Use TLS encryption."
|
143 |
Â
msgstr ""
|
144 |
Â
|
145 |
+
#: wp_mail_smtp.php:462, src/Providers/OptionAbstract.php:186
|
146 |
Â
msgid "TLS is not the same as STARTTLS. For most servers SSL is the recommended option."
|
147 |
Â
msgstr ""
|
148 |
Â
|
149 |
+
#: wp_mail_smtp.php:467, wp_mail_smtp.php:471, src/Providers/OptionAbstract.php:195
|
150 |
Â
msgid "Authentication"
|
151 |
Â
msgstr ""
|
152 |
Â
|
153 |
+
#: wp_mail_smtp.php:476
|
154 |
Â
msgid "No: Do not use SMTP authentication."
|
155 |
Â
msgstr ""
|
156 |
Â
|
157 |
+
#: wp_mail_smtp.php:481
|
158 |
Â
msgid "Yes: Use SMTP authentication."
|
159 |
Â
msgstr ""
|
160 |
Â
|
161 |
+
#: wp_mail_smtp.php:485
|
162 |
Â
msgid "If this is set to no, the values below are ignored."
|
163 |
Â
msgstr ""
|
164 |
Â
|
165 |
+
#: wp_mail_smtp.php:492, wp_mail_smtp.php:535
|
166 |
Â
msgid "Username"
|
167 |
Â
msgstr ""
|
168 |
Â
|
169 |
+
#: wp_mail_smtp.php:500, wp_mail_smtp.php:543
|
170 |
Â
msgid "Password"
|
171 |
Â
msgstr ""
|
172 |
Â
|
173 |
+
#: wp_mail_smtp.php:506
|
174 |
Â
msgid "This is in plain text because it must not be stored encrypted."
|
175 |
Â
msgstr ""
|
176 |
Â
|
177 |
+
#: wp_mail_smtp.php:520
|
178 |
Â
msgid "Pepipost SMTP Options"
|
179 |
Â
msgstr ""
|
180 |
Â
|
181 |
+
#: wp_mail_smtp.php:526
|
182 |
Â
msgid "You need to signup on %s to get the SMTP username/password."
|
183 |
Â
msgstr ""
|
184 |
Â
|
185 |
+
#: wp_mail_smtp.php:598, src/Admin/Pages/Test.php:48
|
186 |
Â
msgid "Send a Test Email"
|
187 |
Â
msgstr ""
|
188 |
Â
|
189 |
+
#: wp_mail_smtp.php:606
|
190 |
Â
msgid "To"
|
191 |
Â
msgstr ""
|
192 |
Â
|
193 |
+
#: wp_mail_smtp.php:610
|
194 |
Â
msgid "Type an email address here and then click Send Test to generate a test email."
|
195 |
Â
msgstr ""
|
196 |
Â
|
197 |
+
#: wp_mail_smtp.php:652, src/Admin/Area.php:127
|
198 |
Â
msgid "WP Mail SMTP"
|
199 |
Â
msgstr ""
|
200 |
Â
|
201 |
+
#: wp_mail_smtp.php:758, src/Admin/Area.php:363, src/Admin/Pages/Settings.php:25
|
202 |
Â
msgid "Settings"
|
203 |
Â
msgstr ""
|
204 |
+
|
205 |
+
#: src/Admin/Area.php:88
|
206 |
+
msgid "There was an error while processing the authentication request: %s. Please try again."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: src/Admin/Area.php:95
|
210 |
+
msgid "There was an error while processing the authentication request. Please try again."
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: src/Admin/Area.php:102
|
214 |
+
msgid "There was an error while processing the authentication request. Please make sure that you have Client ID and Client Secret both valid and saved."
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: src/Admin/Area.php:111
|
218 |
+
msgid "You have successfully linked the current site with you Google API project. Now you can start sending emails through Google."
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: src/Admin/Area.php:126
|
222 |
+
msgid "WP Mail SMTP Options"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: src/Admin/Area.php:199
|
226 |
+
msgid "Please rate <strong>WP Mail SMTP</strong> <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">★★★★★</a> on <a href=\"%2$s\" target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you from the WP Mail SMTP team!"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: src/Providers/OptionAbstract.php:164
|
230 |
+
msgid "None"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: src/Providers/OptionAbstract.php:173
|
234 |
+
msgid "SSL"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: src/Providers/OptionAbstract.php:182
|
238 |
+
msgid "TLS"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: src/Providers/OptionAbstract.php:205
|
242 |
+
msgid "On"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: src/Providers/OptionAbstract.php:206
|
246 |
+
msgid "Off"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: src/Providers/OptionAbstract.php:214
|
250 |
+
msgid "SMTP Username"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: src/Providers/OptionAbstract.php:228
|
254 |
+
msgid "SMTP Password"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: src/Providers/OptionAbstract.php:242
|
258 |
+
msgid "The password is stored in plain text. We highly recommend you setup your password in your WordPress configuration file for improved security; to do this add the lines below to your %s file."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: src/Providers/OptionAbstract.php:279
|
262 |
+
msgid "%1$s requires PHP %2$s to work and does not support your current PHP version %3$s. Please contact your host and request a PHP upgrade to the latest one."
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: src/Providers/OptionAbstract.php:286
|
266 |
+
msgid "Meanwhile you can switch to the \"Other SMTP\" Mailer option."
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: src/Admin/Pages/Misc.php:24
|
270 |
+
msgid "Misc"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: src/Admin/Pages/Misc.php:48
|
274 |
+
msgid "General"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: src/Admin/Pages/Misc.php:67, src/Admin/Pages/Settings.php:182
|
278 |
+
msgid "Save Settings"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: src/Admin/Pages/Misc.php:95, src/Admin/Pages/Settings.php:232
|
282 |
+
msgid "Settings were successfully saved."
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: src/Admin/Pages/Settings.php:50
|
286 |
+
msgid "Mail"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: src/Admin/Pages/Settings.php:66
|
290 |
+
msgid "You can specify the email address that emails should be sent from."
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: src/Admin/Pages/Settings.php:70
|
294 |
+
msgid "If you leave this blank, the default one will be used: %s."
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: src/Admin/Pages/Settings.php:76
|
298 |
+
msgid "Please note if you are sending using an email provider (Gmail, Yahoo, Hotmail, Outlook.com, etc) this setting should be your email address for that account."
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: src/Admin/Pages/Settings.php:93
|
302 |
+
msgid "You can specify the name that emails should be sent from."
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: src/Admin/Pages/Settings.php:97
|
306 |
+
msgid "If you leave this blank, the emails will be sent from %s."
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: src/Admin/Pages/Settings.php:152
|
310 |
+
msgid "If unchecked bounce messages may be lost."
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: src/Admin/Pages/Test.php:26
|
314 |
+
msgid "Email Test"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: src/Admin/Pages/Test.php:55
|
318 |
+
msgid "Send To"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: src/Admin/Pages/Test.php:60
|
322 |
+
msgid "Type an email address here and then click a button below to generate a test email."
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: src/Admin/Pages/Test.php:66
|
326 |
+
msgid "Send Email"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: src/Admin/Pages/Test.php:86
|
330 |
+
msgid "Test failed. Please use a valid email address and try to resend the test email."
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: src/Admin/Pages/Test.php:110
|
334 |
+
msgid "Test email to %s"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: src/Admin/Pages/Test.php:113
|
338 |
+
msgid "This email was sent by %s mailer, and generated by the WP Mail SMTP WordPress plugin."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: src/Admin/Pages/Test.php:126
|
342 |
+
msgid "Your email was sent successfully!"
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: src/Admin/Pages/Test.php:133
|
346 |
+
msgid "There was a problem while sending a test email."
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: src/Admin/Pages/Test.php:134
|
350 |
+
msgid "The related debugging output is shown below:"
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: src/Providers/Gmail/Options.php:25
|
354 |
+
msgid "Gmail"
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: src/Providers/Gmail/Options.php:29
|
358 |
+
msgid "Send emails using your Gmail or G Suite (formerly Google Apps) account, all while keeping your login credentials safe. Other Google SMTP methods require enabling less secure apps in your account and entering your password. However, this integration uses the Google API to improve email delivery issues while keeping your site secure.<br><br>Read our %1$sGmail documentation%2$s to learn how to configure Gmail or G Suite."
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: src/Providers/Gmail/Options.php:63
|
362 |
+
msgid "Client ID"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: src/Providers/Gmail/Options.php:77
|
366 |
+
msgid "Client Secret"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: src/Providers/Gmail/Options.php:91
|
370 |
+
msgid "Authorized redirect URI"
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: src/Providers/Gmail/Options.php:99
|
374 |
+
msgid "Copy URL to clipboard"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: src/Providers/Gmail/Options.php:104
|
378 |
+
msgid "This is the path on your site that you will be redirected to after you have authenticated with Google."
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: src/Providers/Gmail/Options.php:106
|
382 |
+
msgid "You need to copy this URL into \"Authorized redirect URIs\" field for you web application on Google APIs site for your project there."
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: src/Providers/Gmail/Options.php:116
|
386 |
+
msgid "Authorize"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: src/Providers/Gmail/Options.php:120
|
390 |
+
msgid "Allow plugin to send emails using your Google account"
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: src/Providers/Gmail/Options.php:123
|
394 |
+
msgid "Click the button above to confirm authorization."
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: src/Providers/Mail/Options.php:25
|
398 |
+
msgid "Default (none)"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: src/Providers/Mail/Options.php:37
|
402 |
+
msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup."
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: src/Providers/Mailgun/Options.php:25
|
406 |
+
msgid "Mailgun"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: src/Providers/Mailgun/Options.php:29
|
410 |
+
msgid "%1$sMailgun%2$s is one of the leading transactional email services trusted by over 10,000 website and application developers. They provide users 10,000 free emails per month.<br><br>Read our %3$sMailgun documentation%4$s to learn how to configure Mailgun and improve your email deliverability."
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: src/Providers/Mailgun/Options.php:57
|
414 |
+
msgid "Private API Key"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: src/Providers/Mailgun/Options.php:69
|
418 |
+
msgid "Follow this link to get an API Key from Mailgun: %s."
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: src/Providers/Mailgun/Options.php:71
|
422 |
+
msgid "Get a Private API Key"
|
423 |
+
msgstr ""
|
424 |
+
|
425 |
+
#: src/Providers/Mailgun/Options.php:82
|
426 |
+
msgid "Domain Name"
|
427 |
+
msgstr ""
|
428 |
+
|
429 |
+
#: src/Providers/Mailgun/Options.php:94
|
430 |
+
msgid "Follow this link to get a Domain Name from Mailgun: %s."
|
431 |
+
msgstr ""
|
432 |
+
|
433 |
+
#: src/Providers/Mailgun/Options.php:96
|
434 |
+
msgid "Get a Domain Name"
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#: src/Providers/Pepipost/Options.php:25
|
438 |
+
msgid "Pepipost"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: src/Providers/Sendgrid/Options.php:25
|
442 |
+
msgid "SendGrid"
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: src/Providers/Sendgrid/Options.php:29
|
446 |
+
msgid "%1$sSendGrid%2$s is one of the leading transactional email services, sending over 35 billion emails every month. They provide users 100 free emails per month.<br><br>Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability."
|
447 |
+
msgstr ""
|
448 |
+
|
449 |
+
#: src/Providers/Sendgrid/Options.php:57
|
450 |
+
msgid "API Key"
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: src/Providers/Sendgrid/Options.php:69
|
454 |
+
msgid "Follow this link to get an API Key from SendGrid: %s."
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: src/Providers/Sendgrid/Options.php:71
|
458 |
+
msgid "Create API Key"
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: src/Providers/Sendgrid/Options.php:79
|
462 |
+
msgid "To send emails you will need only a %s access level for this API key."
|
463 |
+
msgstr ""
|
464 |
+
|
465 |
+
#: src/Providers/SMTP/Options.php:25
|
466 |
+
msgid "Other SMTP"
|
467 |
+
msgstr ""
|
468 |
+
|
469 |
+
#: src/Providers/SMTP/Options.php:29
|
470 |
+
msgid "Use the SMTP details provided by your hosting provider or email service.<br><br>To see recommended settings for the popular services as well as troubleshooting tips, check out our %1$sSMTP documentation%2$s."
|
471 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,36 +1,93 @@
|
|
1 |
Â
=== WP Mail SMTP by WPForms ===
|
2 |
-
Contributors: wpforms,
|
3 |
-
|
4 |
-
|
5 |
-
Requires at least: 2.7
|
6 |
Â
Tested up to: 4.9
|
7 |
Â
Stable tag: trunk
|
Â
|
|
8 |
Â
|
9 |
Â
The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 700k sites.
|
10 |
Â
|
11 |
Â
== Description ==
|
12 |
Â
|
13 |
-
|
14 |
Â
|
15 |
-
You
|
16 |
Â
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
24 |
Â
|
25 |
-
|
26 |
Â
|
27 |
-
|
28 |
Â
|
29 |
-
|
30 |
Â
|
31 |
-
|
32 |
Â
|
33 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
34 |
Â
|
35 |
Â
= Credits =
|
36 |
Â
|
@@ -40,11 +97,9 @@ You can try the <a href="https://wordpress.org/plugins/wpforms-lite/" rel="frien
|
|
40 |
Â
|
41 |
Â
= What's Next =
|
42 |
Â
|
43 |
-
If you like this plugin, then consider checking out our other
|
44 |
Â
|
45 |
Â
* <a href="http://optinmonster.com/" rel="friend" title="OptinMonster">OptinMonster</a> - Get More Email Subscribers
|
46 |
-
* <a href="http://soliloquywp.com/" rel="friend" title="Soliloquy">Soliloquy</a> - Best WordPress Slider Plugin
|
47 |
-
* <a href="http://enviragallery.com/" rel="friend" title="Envira Gallery">Envira Gallery</a> - Best WordPress Gallery Plugin
|
48 |
Â
* <a href="https://www.monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - Best Google Analytics Plugin for WordPress
|
49 |
Â
|
50 |
Â
Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> to learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">WordPress Tutorials</a> and find out about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
|
@@ -54,28 +109,24 @@ Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeg
|
|
54 |
Â
1. Install WP Mail SMTP by WPForms either via the WordPress.org plugin repository or by uploading the files to your server. (See instructions on <a href="http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/" rel="friend">how to install a WordPress plugin</a>)
|
55 |
Â
2. Activate WP Mail SMTP by WPForms.
|
56 |
Â
3. Navigate to the Settings area of WP Mail SMTP in the WordPress admin.
|
57 |
-
4.
|
Â
|
|
58 |
Â
|
59 |
Â
== Frequently Asked Questions ==
|
60 |
Â
|
61 |
-
=
|
Â
|
|
Â
|
|
62 |
Â
|
63 |
-
|
64 |
Â
|
65 |
-
=
|
66 |
Â
|
67 |
-
|
68 |
Â
|
69 |
-
=
|
70 |
Â
|
71 |
-
|
72 |
-
Mailer: SMTP
|
73 |
-
SMTP Host: smtp.gmail.com
|
74 |
-
SMTP Port: 465
|
75 |
-
Encryption: SSL
|
76 |
-
Authentication: Yes
|
77 |
-
Username: your full gmail address
|
78 |
-
Password: your mail password
|
79 |
Â
|
80 |
Â
= Can you add feature x, y or z to the plugin? =
|
81 |
Â
|
@@ -86,21 +137,35 @@ By all means please contact us to discuss features or options you'd like to see
|
|
86 |
Â
|
87 |
Â
== Screenshots ==
|
88 |
Â
|
89 |
-
1.
|
90 |
-
2.
|
91 |
-
3.
|
92 |
-
4.
|
Â
|
|
Â
|
|
93 |
Â
|
94 |
Â
== Changelog ==
|
95 |
Â
|
96 |
-
=
|
97 |
-
* Added:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
98 |
Â
* Changed: Announcement feed data.
|
99 |
Â
|
100 |
-
=
|
101 |
Â
* Fixed: Older PHP compatibility fix.
|
102 |
Â
|
103 |
-
=
|
104 |
Â
* Added: Helper description to Return Path option.
|
105 |
Â
* Added: Filter `wp_mail_smtp_admin_test_email_smtp_debug` to increase the debug message verbosity.
|
106 |
Â
* Added: PHP 5.2 notice.
|
1 |
Â
=== WP Mail SMTP by WPForms ===
|
2 |
+
Contributors: wpforms, jaredatch, smub, slaFFik
|
3 |
+
Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, wp smtp
|
4 |
+
Requires at least: 3.6
|
Â
|
|
5 |
Â
Tested up to: 4.9
|
6 |
Â
Stable tag: trunk
|
7 |
+
Requires PHP: 5.3
|
8 |
Â
|
9 |
Â
The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 700k sites.
|
10 |
Â
|
11 |
Â
== Description ==
|
12 |
Â
|
13 |
+
= WordPress Mail SMTP Plugin =
|
14 |
Â
|
15 |
+
Having problems with your WordPress site not sending emails? You're not alone. Over 700,000 websites use WP Mail SMTP to fix their email deliverability issues.
|
16 |
Â
|
17 |
+
WP Mail SMTP fixes your email deliverability by reconfiguring the wp_mail() PHP function to use a proper SMTP provider.
|
18 |
+
|
19 |
+
= What is SMTP? =
|
20 |
+
|
21 |
+
SMTP (Simple Mail Transfer Protocol) is an industry standard for sending emails. SMTP helps increase email deliverability by using proper authentication.
|
22 |
+
|
23 |
+
Popular email clients like Gmail, Yahoo, Outlook, etc are constantly improving their services to reduce email spam. One of the things their spam tools look for is whether an email is originating from the location it claims to be originating from.
|
24 |
+
|
25 |
+
If the proper authentication isn't there, then the emails either go in your SPAM folder or worst not get delivered at all.
|
26 |
+
|
27 |
+
This is a problem for a lot of WordPress sites because by default, WordPress uses the PHP mail function to send emails generated by WordPress or any contact form plugin like <a href="https://wpforms.com/" rel="friend">WPForms</a>.
|
28 |
+
|
29 |
+
The issue is that most <a href"http://www.wpbeginner.com/wordpress-hosting/" rel="friend">WordPress hosting companies</a> don't have their servers properly configured for sending PHP emails.
|
30 |
+
|
31 |
+
The combination of two causes your WordPress emails to not get delivered.
|
32 |
+
|
33 |
+
= How does WP Mail SMTP work? =
|
34 |
+
|
35 |
+
WP Mail SMTP plugin allows you to easily reconfigure the wp_mail() function to use a trusted SMTP provider.
|
36 |
+
|
37 |
+
This helps you fix all WordPress not sending email issues.
|
38 |
+
|
39 |
+
WP Mail SMTP plugin includes four different SMTP setup options:
|
40 |
+
|
41 |
+
1. Mailgun SMTP
|
42 |
+
2. SendGrid SMTP
|
43 |
+
3. Gmail SMTP
|
44 |
+
4. All Other SMTP
|
45 |
+
|
46 |
+
For all options, you can specify the "from name" and "email address" for outgoing emails.
|
47 |
+
|
48 |
+
Instead of having users use different SMTP plugins and workflows for different SMTP providers, we decided to bring it all in one. This is what makes WP Mail SMTP, the best SMTP solution for WordPress.
|
49 |
+
|
50 |
+
= Mailgun SMTP =
|
51 |
Â
|
52 |
+
Mailgun SMTP is a popular SMTP service provider that allows you to send large quantities of emails. They allow you to send your first 10,000 emails for free every month.
|
53 |
Â
|
54 |
+
WP Mail SMTP plugin offers a native integration with MailGun. All you have to do is connect your Mailgun account, and you will improve your email deliverability.
|
55 |
Â
|
56 |
+
Read our <a href="https://wpforms.com/how-to-send-wordpress-emails-with-mailgun/" rel="friend">Mailgun documentation</a> for more details.
|
57 |
Â
|
58 |
+
= Gmail SMTP =
|
59 |
Â
|
60 |
+
Often bloggers and small business owners don't want to use third-party SMTP services. Well you can use your Gmail or G Suite account for SMTP emails.
|
61 |
+
|
62 |
+
This allows you to use your <a href="http://www.wpbeginner.com/beginners-guide/how-to-setup-a-professional-email-address-with-gmail-and-google-apps/" rel="friend">professional email address</a> and improve email deliverability.
|
63 |
+
|
64 |
+
Unlike other Gmail SMTP plugins, our Gmail SMTP option uses OAuth to authenticate your Google account, keeping your login information 100% secure.
|
65 |
+
|
66 |
+
Read our <a href="https://wpforms.com/how-to-securely-send-wordpress-emails-using-gmail-smtp/" rel="friend">Gmail documentation</a> for more details.
|
67 |
+
|
68 |
+
= SendGrid SMTP =
|
69 |
+
|
70 |
+
SendGrid has a free SMTP plan that you can use to send up to 100 emails per day. With our native SendGrid SMTP integration, you can easily and securely set up SendGrid SMTP on your WordPress site.
|
71 |
+
|
72 |
+
Read our <a href="https://wpforms.com/fix-wordpress-email-notifications-with-sendgrid/" rel="friend">SendGrid documentation</a> for more details.
|
73 |
+
|
74 |
+
= Other SMTP =
|
75 |
+
|
76 |
+
WP Mail SMTP plugin also works with all major email services such as Gmail, Yahoo, Outlook, Microsoft Live, and any other email sending service that offers SMTP.
|
77 |
+
|
78 |
+
You can set the following options:
|
79 |
+
|
80 |
+
* Specify an SMTP host.
|
81 |
+
* Specify an SMTP port.
|
82 |
+
* Choose SSL / TLS encryption.
|
83 |
+
* Choose to use SMTP authentication or not.
|
84 |
+
* Specify an SMTP username and password.
|
85 |
+
|
86 |
+
WP Mail SMTP also gives you the option to insert your password in your wp-config.php file, so it's not visible in your WordPress settings.
|
87 |
+
|
88 |
+
To see recommended settings for the popular services as well as troubleshooting tips, check out our <a href="https://wpforms.com/docs/how-to-set-up-smtp-using-the-wp-mail-smtp-plugin/" rel="friend">SMTP documentation</a>.
|
89 |
+
|
90 |
+
We hope that you find WP Mail SMTP plugin helpful.
|
91 |
Â
|
92 |
Â
= Credits =
|
93 |
Â
|
97 |
Â
|
98 |
Â
= What's Next =
|
99 |
Â
|
100 |
+
If you like this plugin, then please consider checking out our other popular plugins:
|
101 |
Â
|
102 |
Â
* <a href="http://optinmonster.com/" rel="friend" title="OptinMonster">OptinMonster</a> - Get More Email Subscribers
|
Â
|
|
Â
|
|
103 |
Â
* <a href="https://www.monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - Best Google Analytics Plugin for WordPress
|
104 |
Â
|
105 |
Â
Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> to learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">WordPress Tutorials</a> and find out about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
|
109 |
Â
1. Install WP Mail SMTP by WPForms either via the WordPress.org plugin repository or by uploading the files to your server. (See instructions on <a href="http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/" rel="friend">how to install a WordPress plugin</a>)
|
110 |
Â
2. Activate WP Mail SMTP by WPForms.
|
111 |
Â
3. Navigate to the Settings area of WP Mail SMTP in the WordPress admin.
|
112 |
+
4. Choose your SMTP option (Mailgun SMTP, SendGrid SMTP, Gmail SMTP, or Other SMTP) and follow the instructions to set it up.
|
113 |
+
5. Want to support us? Consider trying <a href="https://wpforms.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="WPForms">WPForms Pro</a> - the best WordPress contact form plugin!
|
114 |
Â
|
115 |
Â
== Frequently Asked Questions ==
|
116 |
Â
|
117 |
+
= Can I use this plugin to send email via Gmail, G Suite, Outlook.com, Office 365, Hotmail, Yahoo, or AOL SMTP? =
|
118 |
+
|
119 |
+
Yes! We have extensive documentation that covers setting up SMTP most popular email services.
|
120 |
Â
|
121 |
+
<a href="How to Set Up WordPress SMTP Using WP Mail SMTP by WPForms" rel="friend">Read our docs</a> to see the correct SMTP settings for each service.
|
122 |
Â
|
123 |
+
= Help! I need support or have an issue. =
|
124 |
Â
|
125 |
+
Please read <a href="https://wordpress.org/support/topic/wp-mail-smtp-support-policy/">our support policy</a> for more information.
|
126 |
Â
|
127 |
+
= I found a bug, now what? =
|
128 |
Â
|
129 |
+
If you've stumbled upon a bug, the best place to report it is in the <a href="https://github.com/awesomemotive/wp-mail-smtp">WP Mail SMTP GitHub repository</a>. GitHub is where the plugin is actively developed, and posting there will get your issue quickly seen by our developers (myself and Slava). Once posted, we'll review your bug report and triage the bug. When creating an issue, the more details you can add to your report, the faster the bug can be solved.
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
130 |
Â
|
131 |
Â
= Can you add feature x, y or z to the plugin? =
|
132 |
Â
|
137 |
Â
|
138 |
Â
== Screenshots ==
|
139 |
Â
|
140 |
+
1. WP Mail SMTP Settings page
|
141 |
+
2. Gmail / G Suite settings
|
142 |
+
3. Mailgun settings
|
143 |
+
4. SendGrid settings
|
144 |
+
5. SMTP settings
|
145 |
+
6. Send a Test Email
|
146 |
Â
|
147 |
Â
== Changelog ==
|
148 |
Â
|
149 |
+
= 1.0.0 - 2017-12-12 =
|
150 |
+
* Added: Automatic migration tool to move options from older storage format to a new one.
|
151 |
+
* Added: Added Gmail & G Suite email provider integration - without your email and password.
|
152 |
+
* Added: Added SendGrid email provider integration - using the API key only.
|
153 |
+
* Added: Added Mailgun email provider integration - using the API key and configured domain only.
|
154 |
+
* Added: New compatibility mode - for PHP 5.2 old plugin will be loaded, for PHP 5.3 and higher - new version of admin area and new functionality.
|
155 |
+
* Changed: The new look of the admin area.
|
156 |
+
* Changed: SMTP password field now has "password" type.
|
157 |
+
* Changed: SMTP password field does not display real password at all when using constants in `wp-config.php` to define it.
|
158 |
+
* Changed: Escape properly all translations.
|
159 |
+
* Changed: More helpful test email content (with a mailer name).
|
160 |
+
|
161 |
+
= 0.11.2 - 2017-11-28 =
|
162 |
+
* Added: Setting to hide announcement feed.
|
163 |
Â
* Changed: Announcement feed data.
|
164 |
Â
|
165 |
+
= 0.11.1 - 2017-10-30 =
|
166 |
Â
* Fixed: Older PHP compatibility fix.
|
167 |
Â
|
168 |
+
= 0.11 - 2017-10-30 =
|
169 |
Â
* Added: Helper description to Return Path option.
|
170 |
Â
* Added: Filter `wp_mail_smtp_admin_test_email_smtp_debug` to increase the debug message verbosity.
|
171 |
Â
* Added: PHP 5.2 notice.
|
src/AM_Notification.php
ADDED
@@ -0,0 +1,452 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPMailSMTP;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Awesome Motive Notifications
|
7 |
+
*
|
8 |
+
* This creates a custom post type (if it doesn't exist) and calls the API to
|
9 |
+
* retrieve notifications for this product.
|
10 |
+
*
|
11 |
+
* @package AwesomeMotive
|
12 |
+
* @author Benjamin Rojas
|
13 |
+
* @license GPL-2.0+
|
14 |
+
* @copyright Copyright (c) 2017, Retyp LLC
|
15 |
+
* @version 1.0.2
|
16 |
+
*/
|
17 |
+
class AM_Notification {
|
18 |
+
/**
|
19 |
+
* The api url we are calling.
|
20 |
+
*
|
21 |
+
* @since 1.0.0
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
public $api_url = 'https://api.awesomemotive.com/v1/notification/';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* A unique slug for this plugin.
|
29 |
+
* (Not the WordPress plugin slug)
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
public $plugin;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* The current plugin version.
|
39 |
+
*
|
40 |
+
* @since 1.0.0
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
public $plugin_version;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Flag if a notice has been registered.
|
48 |
+
*
|
49 |
+
* @since 1.0.0
|
50 |
+
*
|
51 |
+
* @var bool
|
52 |
+
*/
|
53 |
+
public static $registered = false;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Construct.
|
57 |
+
*
|
58 |
+
* @since 1.0.0
|
59 |
+
*
|
60 |
+
* @param string $plugin The plugin slug.
|
61 |
+
* @param mixed $version The version of the plugin.
|
62 |
+
*/
|
63 |
+
public function __construct( $plugin = '', $version = 0 ) {
|
64 |
+
$this->plugin = $plugin;
|
65 |
+
$this->plugin_version = $version;
|
66 |
+
|
67 |
+
add_action( 'init', array( $this, 'custom_post_type' ) );
|
68 |
+
add_action( 'admin_init', array( $this, 'get_remote_notifications' ), 100 );
|
69 |
+
add_action( 'admin_notices', array( $this, 'display_notifications' ) );
|
70 |
+
add_action( 'wp_ajax_am_notification_dismiss', array( $this, 'dismiss_notification' ) );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Registers a custom post type.
|
75 |
+
*
|
76 |
+
* @since 1.0.0
|
77 |
+
*/
|
78 |
+
public function custom_post_type() {
|
79 |
+
register_post_type( 'amn_' . $this->plugin, array(
|
80 |
+
'label' => $this->plugin . ' Announcements',
|
81 |
+
'can_export' => false,
|
82 |
+
'supports' => false,
|
83 |
+
) );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Retrieve the remote notifications if the time has expired.
|
88 |
+
*
|
89 |
+
* @since 1.0.0
|
90 |
+
*/
|
91 |
+
public function get_remote_notifications() {
|
92 |
+
if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
$last_checked = get_option( '_amn_' . $this->plugin . '_last_checked', strtotime( '-1 week' ) );
|
97 |
+
|
98 |
+
if ( $last_checked < strtotime( 'today midnight' ) ) {
|
99 |
+
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
100 |
+
$notification_id = null;
|
101 |
+
|
102 |
+
if ( ! empty( $plugin_notifications ) ) {
|
103 |
+
// Unset it from the array.
|
104 |
+
$notification = $plugin_notifications[0];
|
105 |
+
$notification_id = get_post_meta( $notification->ID, 'notification_id', true );
|
106 |
+
}
|
107 |
+
|
108 |
+
$response = wp_remote_retrieve_body( wp_remote_post( $this->api_url, array(
|
109 |
+
'body' => array(
|
110 |
+
'slug' => $this->plugin,
|
111 |
+
'version' => $this->plugin_version,
|
112 |
+
'last_notification' => $notification_id,
|
113 |
+
),
|
114 |
+
) ) );
|
115 |
+
|
116 |
+
$data = json_decode( $response );
|
117 |
+
|
118 |
+
if ( ! empty( $data->id ) ) {
|
119 |
+
$notifications = array();
|
120 |
+
|
121 |
+
foreach ( (array) $data->slugs as $slug ) {
|
122 |
+
$notifications = array_merge(
|
123 |
+
$notifications,
|
124 |
+
(array) get_posts(
|
125 |
+
array(
|
126 |
+
'post_type' => 'amn_' . $slug,
|
127 |
+
'post_status' => 'all',
|
128 |
+
'meta_key' => 'notification_id',
|
129 |
+
'meta_value' => $data->id,
|
130 |
+
)
|
131 |
+
)
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
+
if ( empty( $notifications ) ) {
|
136 |
+
$new_notification_id = wp_insert_post( array(
|
137 |
+
'post_content' => wp_kses_post( $data->content ),
|
138 |
+
'post_type' => 'amn_' . $this->plugin,
|
139 |
+
) );
|
140 |
+
|
141 |
+
update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
|
142 |
+
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
143 |
+
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
144 |
+
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
145 |
+
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
146 |
+
update_post_meta( $new_notification_id, 'viewed', 0 );
|
147 |
+
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
148 |
+
update_post_meta( $new_notification_id, 'plans', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->plans ) : json_encode( $data->plans ) );
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
// Possibly revoke notifications.
|
153 |
+
if ( ! empty( $data->revoked ) ) {
|
154 |
+
$this->revoke_notifications( $data->revoked );
|
155 |
+
}
|
156 |
+
|
157 |
+
// Set the option now so we can't run this again until after 24 hours.
|
158 |
+
update_option( '_amn_' . $this->plugin . '_last_checked', strtotime( 'today midnight' ) );
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get local plugin notifications that have already been set.
|
164 |
+
*
|
165 |
+
* @since 1.0.0
|
166 |
+
*
|
167 |
+
* @param integer $limit Set the limit for how many posts to retrieve.
|
168 |
+
* @param array $args Any top-level arguments to add to the array.
|
169 |
+
*
|
170 |
+
* @return WP_Post[] WP_Post that match the query.
|
171 |
+
*/
|
172 |
+
public function get_plugin_notifications( $limit = -1, $args = array() ) {
|
173 |
+
return get_posts(
|
174 |
+
array(
|
175 |
+
'posts_per_page' => $limit,
|
176 |
+
'post_type' => 'amn_' . $this->plugin,
|
177 |
+
) + $args
|
178 |
+
);
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Display any notifications that should be displayed.
|
183 |
+
*
|
184 |
+
* @since 1.0.0
|
185 |
+
*/
|
186 |
+
public function display_notifications() {
|
187 |
+
if ( ! current_user_can( apply_filters( 'am_notifications_display', 'manage_options' ) ) ) {
|
188 |
+
return;
|
189 |
+
}
|
190 |
+
|
191 |
+
$plugin_notifications = $this->get_plugin_notifications( -1, array(
|
192 |
+
'post_status' => 'all',
|
193 |
+
'meta_key' => 'viewed',
|
194 |
+
'meta_value' => '0',
|
195 |
+
) );
|
196 |
+
|
197 |
+
$plugin_notifications = $this->validate_notifications( $plugin_notifications );
|
198 |
+
|
199 |
+
if ( ! empty( $plugin_notifications ) && ! self::$registered ) {
|
200 |
+
foreach ( $plugin_notifications as $notification ) {
|
201 |
+
$dismissable = get_post_meta( $notification->ID, 'dismissable', true );
|
202 |
+
$type = get_post_meta( $notification->ID, 'type', true );
|
203 |
+
?>
|
204 |
+
<div class="am-notification am-notification-<?php echo $notification->ID; ?> notice notice-<?php echo $type; ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
|
205 |
+
<?php echo $notification->post_content; ?>
|
206 |
+
</div>
|
207 |
+
<script type="text/javascript">
|
208 |
+
jQuery(document).ready(function ($) {
|
209 |
+
$(document).on('click', '.am-notification-<?php echo $notification->ID; ?> button.notice-dismiss', function (event) {
|
210 |
+
$.post(ajaxurl, {
|
211 |
+
action: 'am_notification_dismiss',
|
212 |
+
notification_id: '<?php echo $notification->ID; ?>'
|
213 |
+
});
|
214 |
+
});
|
215 |
+
});
|
216 |
+
</script>
|
217 |
+
<?php
|
218 |
+
}
|
219 |
+
|
220 |
+
self::$registered = true;
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Validate the notifications before displaying them.
|
226 |
+
*
|
227 |
+
* @since 1.0.0
|
228 |
+
*
|
229 |
+
* @param array $plugin_notifications An array of plugin notifications.
|
230 |
+
*
|
231 |
+
* @return array A filtered array of plugin notifications.
|
232 |
+
*/
|
233 |
+
public function validate_notifications( $plugin_notifications ) {
|
234 |
+
global $pagenow;
|
235 |
+
|
236 |
+
foreach ( $plugin_notifications as $key => $notification ) {
|
237 |
+
// Location validation.
|
238 |
+
$location = (array) json_decode( get_post_meta( $notification->ID, 'location', true ) );
|
239 |
+
$continue = false;
|
240 |
+
if ( ! in_array( 'everywhere', $location, true ) ) {
|
241 |
+
if ( in_array( 'index.php', $location, true ) && 'index.php' === $pagenow ) {
|
242 |
+
$continue = true;
|
243 |
+
}
|
244 |
+
|
245 |
+
if ( in_array( 'plugins.php', $location, true ) && 'plugins.php' === $pagenow ) {
|
246 |
+
$continue = true;
|
247 |
+
}
|
248 |
+
|
249 |
+
if ( ! $continue ) {
|
250 |
+
unset( $plugin_notifications[ $key ] );
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
// Plugin validation (OR conditional).
|
255 |
+
$plugins = (array) json_decode( get_post_meta( $notification->ID, 'plugins', true ) );
|
256 |
+
$continue = false;
|
257 |
+
if ( ! empty( $plugins ) ) {
|
258 |
+
foreach ( $plugins as $plugin ) {
|
259 |
+
if ( is_plugin_active( $plugin ) ) {
|
260 |
+
$continue = true;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
if ( ! $continue ) {
|
265 |
+
unset( $plugin_notifications[ $key ] );
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
// Theme validation.
|
270 |
+
$theme = get_post_meta( $notification->ID, 'theme', true );
|
271 |
+
$continue = (string) wp_get_theme() === $theme;
|
272 |
+
|
273 |
+
if ( ! empty( $theme ) && ! $continue ) {
|
274 |
+
unset( $plugin_notifications[ $key ] );
|
275 |
+
}
|
276 |
+
|
277 |
+
// Version validation.
|
278 |
+
$version = get_post_meta( $notification->ID, 'version', true );
|
279 |
+
$continue = false;
|
280 |
+
if ( ! empty( $version ) ) {
|
281 |
+
if ( version_compare( $this->plugin_version, $version, '<=' ) ) {
|
282 |
+
$continue = true;
|
283 |
+
}
|
284 |
+
|
285 |
+
if ( ! $continue ) {
|
286 |
+
unset( $plugin_notifications[ $key ] );
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
// Expiration validation.
|
291 |
+
$expiration = get_post_meta( $notification->ID, 'expiration', true );
|
292 |
+
$continue = false;
|
293 |
+
if ( ! empty( $expiration ) ) {
|
294 |
+
if ( $expiration > time() ) {
|
295 |
+
$continue = true;
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( ! $continue ) {
|
299 |
+
unset( $plugin_notifications[ $key ] );
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
// Plan validation.
|
304 |
+
$plans = (array) json_decode( get_post_meta( $notification->ID, 'plans', true ) );
|
305 |
+
$continue = false;
|
306 |
+
if ( ! empty( $plans ) ) {
|
307 |
+
$level = $this->get_plan_level();
|
308 |
+
if ( in_array( $level, $plans, true ) ) {
|
309 |
+
$continue = true;
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( ! $continue ) {
|
313 |
+
unset( $plugin_notifications[ $key ] );
|
314 |
+
}
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
return $plugin_notifications;
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Grab the current plan level.
|
323 |
+
*
|
324 |
+
* @since 1.0.0
|
325 |
+
*
|
326 |
+
* @return string The current plan level.
|
327 |
+
*/
|
328 |
+
public function get_plan_level() {
|
329 |
+
// Prepare variables.
|
330 |
+
$key = '';
|
331 |
+
$level = '';
|
332 |
+
$option = false;
|
333 |
+
switch ( $this->plugin ) {
|
334 |
+
case 'wpforms' :
|
335 |
+
$option = get_option( 'wpforms_license' );
|
336 |
+
$key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
|
337 |
+
$level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
|
338 |
+
|
339 |
+
// Possibly check for a constant.
|
340 |
+
if ( empty( $key ) && defined( 'WPFORMS_LICENSE_KEY' ) ) {
|
341 |
+
$key = WPFORMS_LICENSE_KEY;
|
342 |
+
}
|
343 |
+
break;
|
344 |
+
case 'mi' :
|
345 |
+
$option = get_option( 'monsterinsights_license' );
|
346 |
+
$key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
|
347 |
+
$level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
|