updated plugin WP Mail SMTP
version 2.0.0
This commit is contained in:
wp-content/plugins/wp-mail-smtp
assets
css
images
js
languages
src
Admin
Core.phpGeo.phpOptions.phpProcessor.phpProviders
SiteHealth.phpWP.phpvendor
autoload.php
wp-mail-smtp-0.11.2.phpwp_mail_smtp.phpcomposer
google
apiclient-services
src
apiclient
src
Google
auth
src
AccessToken.phpApplicationDefaultCredentials.php
Cache
Credentials
AppIdentityCredentials.phpGCECredentials.phpServiceAccountCredentials.phpServiceAccountJwtAccessCredentials.phpUserRefreshCredentials.php
FetchAuthTokenCache.phpGetQuotaProjectInterface.phpMiddleware
ProjectIdProviderInterface.phpSubscriber
guzzlehttp
guzzle
monolog
monolog
src
Monolog
Formatter
FluentdFormatter.phpHtmlFormatter.phpJsonFormatter.phpLineFormatter.phpMongoDBFormatter.phpNormalizerFormatter.php
Handler
BrowserConsoleHandler.phpBufferHandler.phpChromePHPHandler.phpCubeHandler.phpFilterHandler.phpFingersCrossedHandler.phpFlowdockHandler.phpIFTTTHandler.phpNewRelicHandler.phpPHPConsoleHandler.phpRedisHandler.phpSamplingHandler.php
Logger.phpUtils.phpSlack
SlackHandler.phpSlackWebhookHandler.phpphpseclib
phpseclib
phpseclib
Crypt
psr
log
Psr
sendinblue
api-v3-sdk
lib
Api
AccountApi.phpAttributesApi.phpContactsApi.phpEmailCampaignsApi.phpFoldersApi.phpListsApi.phpProcessApi.phpResellerApi.phpSMSCampaignsApi.phpSMTPApi.phpSendersApi.phpTransactionalSMSApi.phpWebhooksApi.php
ApiException.phpConfiguration.phpHeaderSelector.phpModel
AbTestCampaignResult.phpAddChildDomain.phpAddContactToList.phpAddCredits.phpCreateAttribute.phpCreateAttributeEnumeration.phpCreateChild.phpCreateContact.phpCreateEmailCampaign.phpCreateEmailCampaignRecipients.phpCreateEmailCampaignSender.phpCreateList.phpCreateModel.phpCreateReseller.phpCreateSender.phpCreateSenderIps.phpCreateSenderModel.phpCreateSmsCampaign.phpCreateSmsCampaignRecipients.phpCreateSmtpEmail.phpCreateSmtpTemplate.phpCreateSmtpTemplateSender.phpCreateUpdateContactModel.phpCreateUpdateFolder.phpCreateWebhook.phpCreatedProcessId.phpDeleteHardbounces.phpEmailExportRecipients.phpErrorModel.phpGetAccount.phpGetAccountMarketingAutomation.phpGetAccountPlan.phpGetAccountRelay.phpGetAccountRelayData.phpGetAggregatedReport.phpGetAttributes.phpGetAttributesAttributes.phpGetAttributesEnumeration.phpGetCampaignOverview.phpGetCampaignRecipients.phpGetCampaignStats.phpGetChildAccountCreationStatus.phpGetChildDomain.phpGetChildDomains.phpGetChildInfo.phpGetChildInfoApiKeys.phpGetChildInfoApiKeysV2.phpGetChildInfoApiKeysV3.phpGetChildInfoCredits.phpGetChildInfoStatistics.phpGetChildrenList.phpGetClient.phpGetContactCampaignStats.phpGetContactCampaignStatsClicked.phpGetContactCampaignStatsOpened.phpGetContactCampaignStatsTransacAttributes.phpGetContactCampaignStatsUnsubscriptions.phpGetContactDetails.phpGetContacts.phpGetDeviceBrowserStats.phpGetEmailCampaign.phpGetEmailCampaigns.phpGetEmailEventReport.phpGetEmailEventReportEvents.phpGetExtendedCampaignOverview.phpGetExtendedCampaignOverviewSender.phpGetExtendedCampaignStats.phpGetExtendedClient.phpGetExtendedClientAddress.phpGetExtendedContactDetails.phpGetExtendedContactDetailsStatistics.phpGetExtendedContactDetailsStatisticsClicked.phpGetExtendedContactDetailsStatisticsLinks.phpGetExtendedContactDetailsStatisticsMessagesSent.phpGetExtendedContactDetailsStatisticsOpened.phpGetExtendedContactDetailsStatisticsUnsubscriptions.phpGetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.phpGetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.phpGetExtendedList.phpGetExtendedListCampaignStats.phpGetFolder.phpGetFolderLists.phpGetFolders.phpGetIp.phpGetIpFromSender.phpGetIps.phpGetIpsFromSender.phpGetList.phpGetLists.phpGetProcess.phpGetProcesses.phpGetReports.phpGetReportsReports.phpGetSendersList.phpGetSendersListIps.phpGetSendersListSenders.phpGetSharedTemplateUrl.phpGetSmsCampaign.phpGetSmsCampaignOverview.phpGetSmsCampaignStats.phpGetSmsCampaigns.phpGetSmsEventReport.phpGetSmsEventReportEvents.phpGetSmtpTemplateOverview.phpGetSmtpTemplateOverviewSender.phpGetSmtpTemplates.phpGetSsoToken.phpGetStatsByBrowser.phpGetStatsByDevice.phpGetStatsByDomain.phpGetTransacAggregatedSmsReport.phpGetTransacBlockedContacts.phpGetTransacBlockedContactsContacts.phpGetTransacBlockedContactsReason.phpGetTransacEmailContent.phpGetTransacEmailContentEvents.phpGetTransacEmailsList.phpGetTransacEmailsListTransactionalEmails.phpGetTransacSmsReport.phpGetTransacSmsReportReports.phpGetWebhook.phpGetWebhooks.phpManageIp.phpModelInterface.phpPostContactInfo.phpPostContactInfoContacts.phpPostSendFailed.phpPostSendSmsTestFailed.phpRemainingCreditModel.phpRemainingCreditModelChild.phpRemainingCreditModelReseller.phpRemoveContactFromList.phpRemoveCredits.phpRequestContactExport.phpRequestContactExportCustomContactFilter.phpRequestContactImport.phpRequestContactImportNewList.phpRequestSMSRecipientExport.phpSendEmail.phpSendEmailAttachment.phpSendReport.phpSendReportEmail.phpSendSms.phpSendSmtpEmail.phpSendSmtpEmailAttachment.phpSendSmtpEmailBcc.phpSendSmtpEmailCc.phpSendSmtpEmailReplyTo.phpSendSmtpEmailSender.phpSendSmtpEmailTo.phpSendTemplateEmail.phpSendTestEmail.phpSendTestSms.phpSendTransacSms.phpUpdateAttribute.phpUpdateAttributeEnumeration.phpUpdateCampaignStatus.phpUpdateChild.phpUpdateChildAccountStatus.phpUpdateChildDomain.phpUpdateContact.phpUpdateEmailCampaign.phpUpdateEmailCampaignRecipients.phpUpdateEmailCampaignSender.phpUpdateList.phpUpdateSender.phpUpdateSmsCampaign.phpUpdateSmtpTemplate.phpUpdateSmtpTemplateSender.phpUpdateWebhook.php
ObjectSerializer.phpsymfony
polyfill-intl-idn
polyfill-mbstring
polyfill-php72
@ -1,4 +1,6 @@
|
||||
/* global WPMailSMTP, jQuery, wp_mail_smtp_about */
|
||||
/* eslint-disable no-prototype-builtins */
|
||||
/* global wp_mail_smtp_about */
|
||||
'use strict';
|
||||
|
||||
var WPMailSMTP = window.WPMailSMTP || {};
|
||||
WPMailSMTP.Admin = WPMailSMTP.Admin || {};
|
||||
@ -8,25 +10,14 @@ WPMailSMTP.Admin = WPMailSMTP.Admin || {};
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window, $ ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Private functions and properties.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
var __private = {};
|
||||
WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || ( function( document, window, $ ) {
|
||||
|
||||
/**
|
||||
* Public functions and properties.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @type {Object}
|
||||
* @type {object}
|
||||
*/
|
||||
var app = {
|
||||
|
||||
@ -35,7 +26,7 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
init: function () {
|
||||
init: function() {
|
||||
|
||||
// Do that when DOM is ready.
|
||||
$( document ).ready( app.ready );
|
||||
@ -46,7 +37,7 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
ready: function () {
|
||||
ready: function() {
|
||||
|
||||
app.pageHolder = $( '.wp-mail-smtp-page-about' );
|
||||
|
||||
@ -60,12 +51,12 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
bindActions: function () {
|
||||
bindActions: function() {
|
||||
|
||||
/*
|
||||
* Make plugins description the same height.
|
||||
*/
|
||||
jQuery('.wp-mail-smtp-admin-about-plugins .plugin-item .details').matchHeight();
|
||||
jQuery( '.wp-mail-smtp-admin-about-plugins .plugin-item .details' ).matchHeight();
|
||||
|
||||
/*
|
||||
* Install/Active the plugins.
|
||||
@ -85,27 +76,26 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
cssClass,
|
||||
statusText,
|
||||
buttonText,
|
||||
errorText,
|
||||
successText;
|
||||
|
||||
$btn.addClass( 'loading disabled' );
|
||||
$btn.text( wp_mail_smtp_about.plugin_processing );
|
||||
|
||||
if ( $btn.hasClass( 'status-inactive' ) ) {
|
||||
|
||||
// Activate.
|
||||
task = 'about_plugin_activate';
|
||||
cssClass = 'status-active button button-secondary disabled';
|
||||
statusText = wp_mail_smtp_about.plugin_active;
|
||||
buttonText = wp_mail_smtp_about.plugin_activated;
|
||||
errorText = wp_mail_smtp_about.plugin_activate;
|
||||
|
||||
} else if ( $btn.hasClass( 'status-download' ) ) {
|
||||
|
||||
// Install & Activate.
|
||||
task = 'about_plugin_install';
|
||||
cssClass = 'status-active button disabled';
|
||||
statusText = wp_mail_smtp_about.plugin_active;
|
||||
buttonText = wp_mail_smtp_about.plugin_activated;
|
||||
errorText = wp_mail_smtp_about.plugin_activate;
|
||||
|
||||
} else {
|
||||
return;
|
||||
@ -120,10 +110,10 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
};
|
||||
|
||||
$.post( wp_mail_smtp_about.ajax_url, data, function( res ) {
|
||||
var is_install_successful;
|
||||
var isInstallSuccessful;
|
||||
|
||||
if ( res.success ) {
|
||||
is_install_successful = true;
|
||||
isInstallSuccessful = true;
|
||||
if ( 'about_plugin_install' === task ) {
|
||||
$btn.attr( 'data-plugin', res.data.basename );
|
||||
successText = res.data.msg;
|
||||
@ -135,18 +125,18 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
} else {
|
||||
successText = res.data;
|
||||
}
|
||||
$plugin.find( '.actions' ).append( '<div class="msg success">'+successText+'</div>' );
|
||||
$plugin.find( '.actions' ).append( '<div class="msg success">' + successText + '</div>' );
|
||||
$plugin.find( 'span.status-label' )
|
||||
.removeClass( 'status-active status-inactive status-download' )
|
||||
.addClass( cssClass )
|
||||
.removeClass( 'button button-primary button-secondary disabled' )
|
||||
.text( statusText );
|
||||
.removeClass( 'status-active status-inactive status-download' )
|
||||
.addClass( cssClass )
|
||||
.removeClass( 'button button-primary button-secondary disabled' )
|
||||
.text( statusText );
|
||||
$btn
|
||||
.removeClass( 'status-active status-inactive status-download' )
|
||||
.removeClass( 'button button-primary button-secondary disabled' )
|
||||
.addClass( cssClass ).html( buttonText );
|
||||
} else {
|
||||
is_install_successful = false;
|
||||
isInstallSuccessful = false;
|
||||
|
||||
if (
|
||||
res.hasOwnProperty( 'data' ) &&
|
||||
@ -154,10 +144,11 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
res.data[ 0 ].hasOwnProperty( 'code' ) &&
|
||||
res.data[ 0 ].code === 'download_failed'
|
||||
) {
|
||||
|
||||
// Specific server-returned error.
|
||||
$plugin.find( '.actions' ).append( '<div class="msg error">' + wp_mail_smtp_about.plugin_install_error + '</div>' );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
// Generic error.
|
||||
$plugin.find( '.actions' ).append( '<div class="msg error">' + res.data + '</div>' );
|
||||
}
|
||||
@ -165,26 +156,26 @@ WPMailSMTP.Admin.About = WPMailSMTP.Admin.About || (function ( document, window,
|
||||
$btn.html( wp_mail_smtp_about.plugin_download_btn );
|
||||
}
|
||||
|
||||
if ( ! is_install_successful ) {
|
||||
if ( ! isInstallSuccessful ) {
|
||||
$btn.removeClass( 'disabled' );
|
||||
}
|
||||
$btn.removeClass( 'loading' );
|
||||
|
||||
// Automatically clear plugin messages after 3 seconds.
|
||||
setTimeout( function () {
|
||||
setTimeout( function() {
|
||||
$( '.plugin-item .msg' ).remove();
|
||||
}, 3000 );
|
||||
|
||||
}).fail( function( xhr ) {
|
||||
} ).fail( function( xhr ) {
|
||||
console.log( xhr.responseText );
|
||||
});
|
||||
});
|
||||
} );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
// Provide access to public functions/properties.
|
||||
return app;
|
||||
})( document, window, jQuery );
|
||||
}( document, window, jQuery ) );
|
||||
|
||||
// Initialize.
|
||||
WPMailSMTP.Admin.About.init();
|
||||
|
Reference in New Issue
Block a user