diff --git a/wp-content/plugins/wp-mail-smtp/assets/css/smtp-admin.min.css b/wp-content/plugins/wp-mail-smtp/assets/css/smtp-admin.min.css index 4d1ce1f..ceda3ed 100644 --- a/wp-content/plugins/wp-mail-smtp/assets/css/smtp-admin.min.css +++ b/wp-content/plugins/wp-mail-smtp/assets/css/smtp-admin.min.css @@ -1,3 +1,3 @@ -#wpcontent{padding-left:0 !important;position:relative}@media (max-width: 600px){#wpcontent{padding-top:46px}}@media (max-width: 600px){#wpbody{padding-top:0}}body.toplevel_page_wp-mail-smtp div.jconfirm *,body.toplevel_page_wp-mail-smtp div.jconfirm *::before,body.toplevel_page_wp-mail-smtp div.jconfirm *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box-container div.jconfirm-box{border-radius:0;box-shadow:0 2px 6px rgba(0,0,0,0.2)}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box-container div.jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.4);top:8px;right:8px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box-container div.jconfirm-box div.jconfirm-closeIcon:hover{color:rgba(0,0,0,0.8)}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c{margin:0 0 26px 0 !important;padding:0 !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin:0 !important;color:#c4c4c4 !important;-webkit-transition:none !important;transition:none !important;-webkit-transform:none !important;-ms-transform:none !important;transform:none !important;font-size:45px !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i:empty{display:none}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c svg{height:35px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-title{display:block;color:#333}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c+span.jconfirm-title{margin-top:20px !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content-pane{margin-bottom:0;display:block}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content-pane .jconfirm-content{overflow:inherit}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content{font-size:16px;color:#555;line-height:1.4}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content.lite-upgrade p{font-size:18px;padding:0 20px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p{margin:0 0 16px;font-size:18px;line-height:1.5}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p:last-of-type{margin:0}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p.large{font-size:18px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p.small{font-size:14px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content .already-purchased{font-size:12px;color:#ccc;text-decoration:none}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content .already-purchased:hover{text-decoration:underline}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-buttons .already-purchased{display:block;font-size:12px;color:#aaa;text-decoration:none;padding-top:20px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-buttons .already-purchased:hover{color:#999;text-decoration:underline}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note{text-align:center;margin:30px 0 0}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note p{background-color:#faffac;margin:0 -30px;padding:24px 60px 20px;font-size:15px;color:#4d4d4d;position:relative}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note p:after{content:'\f058';display:inline-block;font:normal normal normal 14px/1 FontAwesome;background-color:#fff;font-size:26px;border-radius:50%;padding:5px 6px;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:-20px;right:50%;margin-right:-18px;color:#3abc01}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note span{font-weight:700;color:#3abc01}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note a{color:#aaa;display:block;margin-top:12px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box input[type=text]{display:block;width:99%;border:1px solid #d6d6d6;padding:10px;box-shadow:none;margin:20px auto 0 auto}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-confirm{background-color:#FF982D;color:#fff;outline:none}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-confirm:hover{background-color:#f97f00;border-color:#f97f00}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button,body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-default{color:#666}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-block{display:block;text-align:center;width:100%;margin:0 0 10px 0 !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-normal-case{text-transform:none !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .error{display:none;color:red}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .wpforms-error{border:1px solid #ebccd1 !important}#screen-meta-links,#screen-meta{display:none}#wp-mail-smtp-header-temp{position:absolute;margin:0;top:-1px;left:20px;right:20px;z-index:99}#wp-mail-smtp-header{border-top:3px solid #FF982D;padding:20px}#wp-mail-smtp-header img{display:block;margin:0;max-width:242px}@media (max-width: 782px){#wp-mail-smtp-header img{max-width:200px}}#wp-mail-smtp{margin:0}#wp-mail-smtp .wp-mail-smtp-hide{display:none}#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.tab{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.tab.active{border-bottom:2px solid #FF982D}#wp-mail-smtp .wp-mail-smtp-page-title a.tab:hover{border-color:#999}#wp-mail-smtp .wp-mail-smtp-page-title a.action{padding:5px;border:0;min-height:auto;color:#fff;margin:-10px 0 0 20px}#wp-mail-smtp .wp-mail-smtp-page-title .page-title{background-color:#fff;display:inline-block;font-size:23px;margin:0;padding:15px 20px 15px 0}#wp-mail-smtp .wp-mail-smtp-page-content{padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-content *,#wp-mail-smtp .wp-mail-smtp-page-content *::before,#wp-mail-smtp .wp-mail-smtp-page-content *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-clear:before{content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-clear:after{clear:both;content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row:first-of-type{padding-top:10px !important}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row{padding:20px 0}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.inactive{display:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row .wp-mail-smtp-setting-mid-row-sep{background:#e4e4e4;height:1px;border:0;margin:15px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading{padding:20px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading.no-desc h2,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading.no-desc h4{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading .wp-mail-smtp-setting-field{margin:0;max-width:1005px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label{margin:0 0 0 8px;vertical-align:baseline}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox .desc{margin:0 0 0 30px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-text .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-password .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-number .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .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-content .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-content .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-content .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-content .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:#46B450}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch{background-color:#a0daa5;cursor:default}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-unchecked-label{color:#aaa}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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:400;color:#777;font-size:13px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer{padding-bottom:20px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer{display:inline-block;width:140px;margin-right:12px;margin-bottom:12px;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image{background:#fff;text-align:center;border:2px solid #E5E5E5;border-radius:4px;cursor:pointer;height:76px;position:relative;margin-bottom:10px;-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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image.is-recommended{background-image:url(../images/recommended.svg);background-repeat:no-repeat;background-size:60%;background-position:top right -2px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image img{max-width:90%;max-height:40px;display:block;position:relative;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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer.wp-mail-smtp-mailer-smtp .wp-mail-smtp-mailer-image img{max-height:30px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image{border-color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image{border-color:#ccc}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row h2,#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row h2{margin-bottom:15px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row p{margin:12px 0 0;font-size:14px;line-height:1.5em}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p:first-of-type{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.desc{font-style:italic;color:#777}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.buttonned{margin-top:30px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice{margin:5px 0 15px;box-sizing:border-box;background:#fff;border-left:4px solid transparent;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice.inline-error{border-color:#dc3232;margin-bottom:5px;padding:10px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice.inline-edu-notice{border-color:#809EB0;line-height:1.5em;padding:10px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice a.wp-mail-smtp-mailer-notice-dismiss{float:right;color:#999DA1;margin:0 0 10px 10px;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice a.wp-mail-smtp-mailer-notice-dismiss:hover{color:#666a6e}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row ul{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row ul.list li{margin-left:20px;list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list th{padding:5px 5px 5px 0;text-align:left}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.email{padding-right:2em}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.status{width:100px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a{border-bottom:1px solid;display:inline-block;margin-right:5px;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]{color:#a00}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:hover,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:active,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:focus{color:#400}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page-content .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;line-height:1.3}@media (max-width: 959px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]{width:300px}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password][readonly]{background-color:#f9f9f9}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password].small-text{width:75px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]:focus{border-color:#bbb}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]:disabled{opacity:0.6}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label{display:block;float:left;width:205px;padding:0 20px 0 0}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label{float:none;width:100%;padding-bottom:15px}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label label{display:block;font-weight:600}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-field{display:block;margin:0 0 0 205px;max-width:800px}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-field{margin:0}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-submit{margin:0;padding:25px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-submit .help-text{margin-left:10px;vertical-align:middle}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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;width:1005px}#wp-mail-smtp .wp-mail-smtp-page-content.wp-mail-smtp-page-general p{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 0 15px;padding:1px 12px}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-success{border-left-color:#46b450}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-warning{border-left-color:#ffb900}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-error{border-left-color:#dc3232}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-info{border-left-color:#00a0d2}#wp-mail-smtp .wp-mail-smtp-page-content .notice p,#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline p{margin:0.5em 0;padding:2px}#wp-mail-smtp .wp-mail-smtp-page-content pre{white-space:pre-line}#wp-mail-smtp .wp-mail-smtp-page-content.active{display:block}#wp-mail-smtp .wp-mail-smtp-page-content .connected-as{margin-left:30px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug{background-color:#fff;padding:25px 20px 1px 25px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug h2{color:#444;margin:1.4em 0 0.8em;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol{font-size:14px;color:#555;margin:0 0 1.1em 1.8em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li{margin:0 0 8px 0;line-height:1.5}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li:last-of-type,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li ul,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li ul{list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug a:hover{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .dashicons-star-filled{color:#FF982D;width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .price-off{color:green;font-weight:bold}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle{text-decoration:none;color:#444}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle:hover{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle .dashicons{font-size:15px;height:15px;width:15px;padding-top:3px;border:0;outline:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log{border-left:3px solid #ffb900;padding:0 0 0 20px;margin:0 0 10px 0;font-size:12px;display:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log pre{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-note{display:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner{background-color:#fff;padding:25px 20px;border:1px solid #dadada;margin:10px 0 0 0;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .wp-mail-smtp-pro-banner-dismiss{position:absolute;right:10px;top:10px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .wp-mail-smtp-pro-banner-dismiss button{background:none;border:none;color:#a9a9a9;cursor:pointer;margin:0;padding:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner h2{color:#444;margin-top:0;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner p:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits{margin:0 0 16px 0;overflow:auto;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul{margin:0;padding:0;width:50%;float:left}@media (max-width: 600px){#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul{width:100%;float:none}}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li{margin:0;padding:0 0 2px 16px;color:#555;font-size:14px;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li:before{content:'+';position:absolute;top:-1px;left:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li.arrow-right:before{content:'→'}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:hover,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:active,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:focus{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .stars{text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .stars .dashicons{width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .price-off{color:green;font-weight:bold}#wp-mail-smtp .wp-mail-smtp-admin-columns>div[class*="-column-"]{float:left}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-20{width:20%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-33{width:33.33333%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-40{width:40%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-50{width:50%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-60{width:60%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-80{width:80%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-last{float:right !important}#wp-mail-smtp .wp-mail-smtp-admin-columns:after{content:"";display:table;clear:both}#wp-mail-smtp .wp-mail-smtp-page-upsell{display:flex;align-items:center;justify-content:center;height:auto;flex-direction:column}#wp-mail-smtp .wp-mail-smtp-page-upsell>*{width:800px}#wp-mail-smtp .wp-mail-smtp-page-upsell *,#wp-mail-smtp .wp-mail-smtp-page-upsell *::before,#wp-mail-smtp .wp-mail-smtp-page-upsell *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page-upsell h2{font-size:24px;color:#444444;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell h3{font-size:16px;font-weight:normal;color:#72777C;line-height:1.5em;margin-top:0;margin-bottom:25px;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features{margin-bottom:40px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:stretch;align-content:flex-start}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature{display:flex;flex-direction:row;width:360px;align-items:flex-start;align-content:flex-start;margin-right:60px;margin-top:40px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature:nth-of-type(1){margin-top:20px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature:nth-of-type(2){margin-top:20px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature:nth-of-type(even){margin-right:0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-image{width:65px;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-image img{display:block;margin:5px auto 0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-content{margin-left:20px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-content h4{font-size:15px;margin:0 0 0.5em}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-content p{color:#72777C;margin:0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-images{margin-bottom:20px;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-images img{width:380px;height:auto;margin-right:20px;border:5px solid #fff;border-radius:5px;box-shadow:0 0 10px 5px rgba(0,0,0,0.15)}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-images img:last-child{margin-right:0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-button{text-align:center}.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-btn .dashicons{font-size:16px;width:16px;height:16px}.wp-mail-smtp-btn:disabled{opacity:0.5;cursor:not-allowed}.wp-mail-smtp-btn.wp-mail-smtp-btn-md{font-size:13px;font-weight:600;padding:8px 12px;min-height:35px}.wp-mail-smtp-btn.wp-mail-smtp-btn-lg{font-size:16px;font-weight:600;padding:16px 28px}.wp-mail-smtp-btn.wp-mail-smtp-btn-orange{background-color:#FF982D;border-color:#FF982D;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:focus{background-color:#f97f00;border-color:#f97f00}.wp-mail-smtp-btn.wp-mail-smtp-btn-red{background-color:#DC3232;border-color:#DC3232;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-red:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-red:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-red:focus{background-color:darkred;border-color:darkred}.wp-mail-smtp-btn.wp-mail-smtp-btn-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:focus{background-color:#d7d7d7;border-color:#ccc;color:#444}.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:focus{background-color:#eee;color:#444}.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish{background-color:#738e9e;border:1px solid #738e9e;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish:focus{background-color:#395360;border-color:#395360;color:#fff} +#wpcontent{padding-left:0 !important;position:relative}@media (max-width: 600px){#wpcontent{padding-top:46px}}@media (max-width: 600px){#wpbody{padding-top:0}}body.toplevel_page_wp-mail-smtp div.jconfirm *,body.toplevel_page_wp-mail-smtp div.jconfirm *::before,body.toplevel_page_wp-mail-smtp div.jconfirm *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box-container div.jconfirm-box{border-radius:0;box-shadow:0 2px 6px rgba(0,0,0,0.2)}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box-container div.jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.4);top:8px;right:8px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box-container div.jconfirm-box div.jconfirm-closeIcon:hover{color:rgba(0,0,0,0.8)}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c{margin:0 0 26px 0 !important;padding:0 !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin:0 !important;color:#c4c4c4 !important;-webkit-transition:none !important;transition:none !important;-webkit-transform:none !important;-ms-transform:none !important;transform:none !important;font-size:45px !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i:empty{display:none}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c svg{height:35px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-title{display:block;color:#444}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-title-c .jconfirm-icon-c+span.jconfirm-title{margin-top:20px !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content-pane{margin-bottom:0;display:block}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content-pane .jconfirm-content{overflow:inherit}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content{font-size:16px;color:#777;line-height:1.4}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content.lite-upgrade p{font-size:18px;padding:0 20px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p{margin:0 0 20px;font-size:16px;line-height:1.5}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p:last-of-type{margin:0}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p.large{font-size:18px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content p.small{font-size:14px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content .already-purchased{font-size:12px;color:#ccc;text-decoration:none}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-content .already-purchased:hover{text-decoration:underline}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-buttons .already-purchased{display:block;font-size:12px;color:#aaa;text-decoration:none;padding-top:20px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box div.jconfirm-buttons .already-purchased:hover{color:#999;text-decoration:underline}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note{text-align:center;margin:30px 0 0}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note p{background-color:#faffac;margin:0 -30px;padding:24px 60px 20px;font-size:15px;color:#4d4d4d;position:relative}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note p:after{content:url(../images/font-awesome/check-circle-solid-green.svg);width:40px;height:40px;background-color:#fff;border-radius:50%;padding:5px 6px;position:absolute;top:-20px;right:50%;margin-right:-18px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note span{font-weight:700;color:#3abc01}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .discount-note a{color:#aaa;display:block;margin-top:12px}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box input[type=text]{display:block;width:99%;border:1px solid #d6d6d6;padding:10px;box-shadow:none;margin:20px auto 0 auto}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-confirm{background-color:#FF982D;color:#fff;outline:none}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-confirm:hover{background-color:#f97f00;border-color:#f97f00}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button,body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-default{color:#666}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-block{display:block;text-align:center;width:100%;margin:0 0 10px 0 !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box button.btn-normal-case{text-transform:none !important}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .error{display:none;color:red}body.toplevel_page_wp-mail-smtp div.jconfirm div.jconfirm-box .wpforms-error{border:1px solid #ebccd1 !important}#screen-meta-links,#screen-meta{display:none}#wp-mail-smtp-header-temp{position:absolute;margin:0;top:-1px;left:20px;right:20px;z-index:99}#wp-mail-smtp-header{border-top:3px solid #FF982D;padding:20px}#wp-mail-smtp-header img{display:block;margin:0;max-width:242px}@media (max-width: 782px){#wp-mail-smtp-header img{max-width:200px}}#wp-mail-smtp{margin:0}#wp-mail-smtp .wp-mail-smtp-hide{display:none}#wp-mail-smtp .wp-mail-smtp-page-title{height:58px;background-color:#fff;font-size:14px;margin:0 0 20px 0;padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-title a.tab{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.tab.active{border-bottom:2px solid #FF982D}#wp-mail-smtp .wp-mail-smtp-page-title a.tab:hover{border-color:#999}#wp-mail-smtp .wp-mail-smtp-page-title a.action{padding:5px;border:0;min-height:auto;color:#fff;margin:-10px 0 0 20px}#wp-mail-smtp .wp-mail-smtp-page-title .page-title{background-color:#fff;display:inline-block;font-size:23px;margin:0;padding:20px 20px 20px 0}#wp-mail-smtp .wp-mail-smtp-page-content{padding:0 20px}#wp-mail-smtp .wp-mail-smtp-page-content *,#wp-mail-smtp .wp-mail-smtp-page-content *::before,#wp-mail-smtp .wp-mail-smtp-page-content *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-clear:before{content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-clear:after{clear:both;content:" ";display:table}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row:first-of-type{padding-top:10px !important}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row{padding:20px 0}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.inactive{display:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row .wp-mail-smtp-setting-mid-row-sep{background:#e4e4e4;height:1px;border:0;margin:15px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading{padding:20px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading.no-desc h2,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading.no-desc h4{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.section-heading .wp-mail-smtp-setting-field{margin:0;max-width:1005px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox input[type=checkbox]+label{margin:0 0 0 8px;vertical-align:baseline}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox .desc{margin:0 0 0 30px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-text .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-password .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-number .wp-mail-smtp-setting-label,#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .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-content .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-content .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-content .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-content .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:#46B450}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch{background-color:#a0daa5;cursor:default}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-checked-label,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-checkbox-toggle .wp-mail-smtp-setting-field input[type=checkbox]:disabled+.wp-mail-smtp-setting-toggle-switch+.wp-mail-smtp-setting-toggle-unchecked-label{color:#aaa}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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:400;color:#777;font-size:13px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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-content .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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer{padding-bottom:20px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer{display:inline-block;width:140px;margin-right:12px;margin-bottom:12px;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image{background:#fff;text-align:center;border:2px solid #E5E5E5;border-radius:4px;cursor:pointer;height:76px;position:relative;margin-bottom:10px;-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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image.is-recommended{background-image:url(../images/recommended.svg);background-repeat:no-repeat;background-size:60%;background-position:top right -2px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer .wp-mail-smtp-mailer-image img{max-width:90%;max-height:40px;display:block;position:relative;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-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer.wp-mail-smtp-mailer-smtp .wp-mail-smtp-mailer-image img{max-height:30px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image{border-color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer.active .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image{border-color:#ccc}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row.wp-mail-smtp-setting-row-mailer .wp-mail-smtp-mailers .wp-mail-smtp-mailer:hover .wp-mail-smtp-mailer-image img{opacity:1}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row h2,#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row h2{margin-bottom:15px}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .wp-mail-smtp-setting-row p{margin:12px 0 0;font-size:14px;line-height:1.5em}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p:first-of-type{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.desc{font-style:italic;color:#777}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.buttonned{margin-top:30px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice{margin:5px 0 15px;box-sizing:border-box;background:#fff;border-left:4px solid transparent;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice.inline-error{border-color:#dc3232;margin-bottom:5px;padding:10px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice.inline-edu-notice{border-color:#809EB0;line-height:1.5em;padding:10px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice a.wp-mail-smtp-mailer-notice-dismiss{float:right;color:#999DA1;margin:0 0 10px 10px;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row p.inline-notice a.wp-mail-smtp-mailer-notice-dismiss:hover{color:#666a6e}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row ul{margin:8px 0 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row ul.list li{margin-left:20px;list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list th{padding:5px 5px 5px 0;text-align:left}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.email{padding-right:2em}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.status{width:100px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a{border-bottom:1px solid;display:inline-block;margin-right:5px;text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]{color:#a00}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:hover,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:active,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row table.actions-list td.actions a[class*=delete]:focus{color:#400}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page-content .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;line-height:1.3}@media (max-width: 959px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]{width:300px}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number][readonly],#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password][readonly]{background-color:#f9f9f9}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number].small-text,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password].small-text{width:75px}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number]:focus,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]:focus{border-color:#bbb}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=text]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=email]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=number]:disabled,#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-row input[type=password]:disabled{opacity:0.6}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label{display:block;float:left;width:205px;padding:0 20px 0 0}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label{float:none;width:100%;padding-bottom:15px}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-label label{display:block;font-weight:600}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-field{display:block;margin:0 0 0 205px;max-width:800px}@media (max-width: 781px){#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-setting-field{margin:0}}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-submit{margin:0;padding:25px 0}#wp-mail-smtp .wp-mail-smtp-page-content .wp-mail-smtp-submit .help-text{margin-left:10px;vertical-align:middle}#wp-mail-smtp .wp-mail-smtp-page-content .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-content .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;width:1005px}#wp-mail-smtp .wp-mail-smtp-page-content.wp-mail-smtp-page-general p{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 0 15px;padding:1px 12px}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-success{border-left-color:#46b450}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-warning{border-left-color:#ffb900}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-error{border-left-color:#dc3232}#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline.notice-info{border-left-color:#00a0d2}#wp-mail-smtp .wp-mail-smtp-page-content .notice p,#wp-mail-smtp .wp-mail-smtp-page-content .notice-inline p{margin:0.5em 0;padding:2px}#wp-mail-smtp .wp-mail-smtp-page-content pre{white-space:pre-line}#wp-mail-smtp .wp-mail-smtp-page-content.active{display:block}#wp-mail-smtp .wp-mail-smtp-page-content .connected-as{margin-left:30px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug{background-color:#fff;padding:25px 20px 1px 25px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug h2{color:#444;margin:1.4em 0 0.8em;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol{font-size:14px;color:#555;margin:0 0 1.1em 1.8em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li{margin:0 0 8px 0;line-height:1.5}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li:last-of-type,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ul li ul,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug ol li ul{list-style-type:disc}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug a:hover{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .dashicons-star-filled{color:#FF982D;width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .price-off{color:green;font-weight:bold}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle{text-decoration:none;color:#444}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle:hover{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-toggle .dashicons{font-size:15px;height:15px;width:15px;padding-top:3px;border:0;outline:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log{border-left:3px solid #ffb900;padding:0 0 0 20px;margin:0 0 10px 0;font-size:12px;display:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log pre{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-debug .error-log-note{display:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner{background-color:#fff;padding:25px 20px;border:1px solid #dadada;margin:10px 0 0 0;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .wp-mail-smtp-pro-banner-dismiss{position:absolute;right:10px;top:10px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .wp-mail-smtp-pro-banner-dismiss button{background:none;border:none;color:#a9a9a9;cursor:pointer;margin:0;padding:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner h2{color:#444;margin-top:0;font-size:16px;font-weight:700}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner p{font-size:14px;color:#555;margin-bottom:1.1em}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner p:last-of-type{margin:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits{margin:0 0 16px 0;overflow:auto;max-width:1000px}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul{margin:0;padding:0;width:50%;float:left}@media (max-width: 600px){#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul{width:100%;float:none}}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li{margin:0;padding:0 0 2px 16px;color:#555;font-size:14px;position:relative}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li:before{content:'+';position:absolute;top:-1px;left:0}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .benefits ul li.arrow-right:before{content:'→'}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a{color:#FF982D}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:hover,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:active,#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner a:focus{color:#f97f00}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .stars{text-decoration:none}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .stars .dashicons{width:16px;height:16px;font-size:16px;vertical-align:text-top}#wp-mail-smtp .wp-mail-smtp-page-content #wp-mail-smtp-pro-banner .price-off{color:green;font-weight:bold}#wp-mail-smtp .wp-mail-smtp-admin-columns>div[class*="-column-"]{float:left}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-20{width:20%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-33{width:33.33333%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-40{width:40%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-50{width:50%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-60{width:60%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-80{width:80%}#wp-mail-smtp .wp-mail-smtp-admin-columns .wp-mail-smtp-admin-column-last{float:right !important}#wp-mail-smtp .wp-mail-smtp-admin-columns:after{content:"";display:table;clear:both}#wp-mail-smtp .wp-mail-smtp-page-upsell{display:flex;align-items:center;justify-content:center;height:auto;flex-direction:column}#wp-mail-smtp .wp-mail-smtp-page-upsell>*{width:800px}#wp-mail-smtp .wp-mail-smtp-page-upsell *,#wp-mail-smtp .wp-mail-smtp-page-upsell *::before,#wp-mail-smtp .wp-mail-smtp-page-upsell *::after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-mail-smtp .wp-mail-smtp-page-upsell h2{font-size:24px;color:#444444;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell h3{font-size:16px;font-weight:normal;color:#72777C;line-height:1.5em;margin-top:0;margin-bottom:6px;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features{margin-bottom:40px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:stretch;align-content:flex-start}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature{display:flex;flex-direction:row;width:360px;align-items:flex-start;align-content:flex-start;margin-right:60px;margin-top:40px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature:nth-of-type(1){margin-top:20px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature:nth-of-type(2){margin-top:20px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature:nth-of-type(even){margin-right:0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-image{display:flex;align-items:center}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-image svg{height:64px;width:64px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-image .st0{fill:#C3D0D7}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-image .st1{fill:#809DB0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-content{margin-left:20px}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-content h4{font-size:15px;margin:0 0 0.5em}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-content .wp-mail-smtp-page-upsell-features .wp-mail-smtp-page-upsell-feature .wp-mail-smtp-page-upsell-feature-content p{color:#72777C;margin:0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-images{margin-top:20px;margin-bottom:30px;text-align:center}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-images img{width:380px;height:auto;margin-right:30px;border:5px solid #fff;border-radius:5px;box-shadow:0 5px 15px rgba(0,0,0,0.1);float:left}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-images img:last-child{margin-right:0}#wp-mail-smtp .wp-mail-smtp-page-upsell .wp-mail-smtp-page-upsell-button{text-align:center}.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-btn .dashicons{font-size:16px;width:16px;height:16px}.wp-mail-smtp-btn:disabled{opacity:0.5;cursor:not-allowed}.wp-mail-smtp-btn.wp-mail-smtp-btn-md{font-size:13px;font-weight:600;padding:8px 12px;min-height:35px}.wp-mail-smtp-btn.wp-mail-smtp-btn-lg{font-size:16px;font-weight:600;padding:16px 28px}.wp-mail-smtp-btn.wp-mail-smtp-btn-orange{background-color:#FF982D;border-color:#FF982D;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-orange:focus{background-color:#f97f00;border-color:#f97f00}.wp-mail-smtp-btn.wp-mail-smtp-btn-red{background-color:#DC3232;border-color:#DC3232;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-red:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-red:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-red:focus{background-color:darkred;border-color:darkred}.wp-mail-smtp-btn.wp-mail-smtp-btn-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-grey:focus{background-color:#d7d7d7;border-color:#ccc;color:#444}.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey{background-color:#f5f5f5;border:1px solid #ccc;color:#666}.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-light-grey:focus{background-color:#eee;color:#444}.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish{background-color:#738e9e;border:1px solid #738e9e;color:#fff}.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish:hover,.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish:active,.wp-mail-smtp-btn.wp-mail-smtp-btn-blueish:focus{background-color:#395360;border-color:#395360;color:#fff} /*# sourceMappingURL=smtp-admin.min.css.map */ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/control/admin.png b/wp-content/plugins/wp-mail-smtp/assets/images/control/admin.png deleted file mode 100644 index 243b3d0..0000000 Binary files a/wp-content/plugins/wp-mail-smtp/assets/images/control/admin.png and /dev/null differ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/control/comments.png b/wp-content/plugins/wp-mail-smtp/assets/images/control/comments.png deleted file mode 100644 index 3e9eaf0..0000000 Binary files a/wp-content/plugins/wp-mail-smtp/assets/images/control/comments.png and /dev/null differ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/control/personal.png b/wp-content/plugins/wp-mail-smtp/assets/images/control/personal.png deleted file mode 100644 index 08ce029..0000000 Binary files a/wp-content/plugins/wp-mail-smtp/assets/images/control/personal.png and /dev/null differ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/control/update.png b/wp-content/plugins/wp-mail-smtp/assets/images/control/update.png deleted file mode 100644 index 4e20269..0000000 Binary files a/wp-content/plugins/wp-mail-smtp/assets/images/control/update.png and /dev/null differ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/control/user_new.png b/wp-content/plugins/wp-mail-smtp/assets/images/control/user_new.png deleted file mode 100644 index f63bffc..0000000 Binary files a/wp-content/plugins/wp-mail-smtp/assets/images/control/user_new.png and /dev/null differ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/control/users.png b/wp-content/plugins/wp-mail-smtp/assets/images/control/users.png deleted file mode 100644 index c547d3f..0000000 Binary files a/wp-content/plugins/wp-mail-smtp/assets/images/control/users.png and /dev/null differ diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/check-circle-solid-green.svg b/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/check-circle-solid-green.svg new file mode 100644 index 0000000..5eaf778 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/check-circle-solid-green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/exclamation-circle-regular-red.svg b/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/exclamation-circle-regular-red.svg new file mode 100644 index 0000000..8287a13 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/exclamation-circle-regular-red.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/exclamation-circle-solid-orange.svg b/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/exclamation-circle-solid-orange.svg new file mode 100644 index 0000000..7bcfc2a --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/assets/images/font-awesome/exclamation-circle-solid-orange.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/assets/js/smtp-admin.js b/wp-content/plugins/wp-mail-smtp/assets/js/smtp-admin.js index 71d2abd..b5c1e43 100644 --- a/wp-content/plugins/wp-mail-smtp/assets/js/smtp-admin.js +++ b/wp-content/plugins/wp-mail-smtp/assets/js/smtp-admin.js @@ -168,6 +168,7 @@ WPMailSMTP.Admin.Settings = WPMailSMTP.Admin.Settings || ( function( document, w } ); app.triggerExitNotice(); + app.beforeSaveChecks(); }, education: { @@ -178,6 +179,7 @@ WPMailSMTP.Admin.Settings = WPMailSMTP.Admin.Settings || ( function( document, w escapeKey: true, animationBounce: 1, theme: 'modern', + type: 'blue', animateFromElement: false, draggable: false, closeIcon: true, @@ -263,6 +265,54 @@ WPMailSMTP.Admin.Settings = WPMailSMTP.Admin.Settings || ( function( document, w $( 'form', $settingPages ).on( 'submit', function() { app.pluginSettingsChanged = false; } ); + }, + + /** + * Perform any checks before the settings are saved. + * + * Checks: + * - warn users if they try to save the settings with the default (PHP) mailer selected. + * + * @since 2.1.0 + */ + beforeSaveChecks: function() { + + $( 'form', app.pageHolder ).on( 'submit', function() { + if ( $( '.wp-mail-smtp-mailer input:checked', app.pageHolder ).val() === 'mail' ) { + var $thisForm = $( this ); + + $.alert( { + backgroundDismiss: false, + escapeKey: false, + animationBounce: 1, + theme: 'modern', + type: 'orange', + animateFromElement: false, + draggable: false, + closeIcon: false, + useBootstrap: false, + icon: '">' + wp_mail_smtp.default_mailer_notice.icon_alt + ''+wp_mail_smtp.education.upgrade_icon_lock+''+wp_mail_smtp.education.upgrade_bonus+wp_mail_smtp.education.upgrade_doc+"")},buttons:{confirm:{text:wp_mail_smtp.education.upgrade_button,btnClass:"btn-confirm",keys:["enter"],action:function(){e.open(wp_mail_smtp.education.upgrade_url+"&utm_content="+encodeURI(t.val()),"_blank")}}}})}},mailers:{smtp:{bindActions:function(){a("#wp-mail-smtp-setting-smtp-auth").change(function(){a("#wp-mail-smtp-setting-row-smtp-user, #wp-mail-smtp-setting-row-smtp-pass").toggleClass("inactive")}),a("#wp-mail-smtp-setting-row-smtp-encryption input").change(function(){var t=a(this),i=a("#wp-mail-smtp-setting-smtp-port",n.pageHolder);"tls"===t.val()?(i.val("587"),a("#wp-mail-smtp-setting-row-smtp-autotls").addClass("inactive")):("ssl"===t.val()?i.val("465"):i.val("25"),a("#wp-mail-smtp-setting-row-smtp-autotls").removeClass("inactive"))})}}},triggerExitNotice:function(){var t=a(".wp-mail-smtp-page-general:not( .wp-mail-smtp-tab-test )");a(e).on("beforeunload",function(){if(n.pluginSettingsChanged)return wp_mail_smtp.text_settings_not_saved}),a(":input:not( #wp-mail-smtp-setting-license-key )",t).on("change",function(){n.pluginSettingsChanged=!0}),a("form",t).on("submit",function(){n.pluginSettingsChanged=!1})}};return n}(document,window,jQuery),WPMailSMTP.Admin.Settings.init(); \ No newline at end of file +"use strict";var WPMailSMTP=window.WPMailSMTP||{};WPMailSMTP.Admin=WPMailSMTP.Admin||{},WPMailSMTP.Admin.Settings=WPMailSMTP.Admin.Settings||function(e,i,a){var n={pluginSettingsChanged:!1,init:function(){a(e).ready(n.ready)},ready:function(){n.pageHolder=a(".wp-mail-smtp-tab-settings"),a("#screen-meta-links, #screen-meta").prependTo("#wp-mail-smtp-header-temp").show(),n.bindActions()},bindActions:function(){a(".wp-mail-smtp-mailer-image",n.pageHolder).click(function(){a(this).parents(".wp-mail-smtp-mailer").find("input").trigger("click")}),a(".wp-mail-smtp-mailer input",n.pageHolder).click(function(){var t=a(this);if(t.prop("disabled"))return t.hasClass("educate")&&n.education.upgradeMailer(t),!1;a(".wp-mail-smtp-mailer",n.pageHolder).removeClass("active"),a(this).parents(".wp-mail-smtp-mailer").addClass("active"),a(".wp-mail-smtp-mailer-option",n.pageHolder).addClass("hidden").removeClass("active"),a(".wp-mail-smtp-mailer-option-"+a(this).val(),n.pageHolder).addClass("active").removeClass("hidden")}),n.mailers.smtp.bindActions(),a("#wp-mail-smtp-pro-banner-dismiss",n.pageHolder).on("click",function(){a.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"wp_mail_smtp_ajax",task:"pro_banner_dismiss"}}).always(function(){a("#wp-mail-smtp-pro-banner",n.pageHolder).fadeOut("fast")})}),a(".js-wp-mail-smtp-mailer-notice-dismiss",n.pageHolder).on("click",function(t){t.preventDefault();var e=a(this),i=e.parents(".inline-notice");if(e.hasClass("disabled"))return!1;a.ajax({url:ajaxurl,dataType:"json",type:"POST",data:{action:"wp_mail_smtp_ajax",task:"notice_dismiss",notice:i.data("notice"),mailer:i.data("mailer")},beforeSend:function(){e.addClass("disabled")}}).always(function(){i.fadeOut("fast",function(){e.removeClass("disabled")})})}),a("#wp-mail-smtp-debug .error-log-toggle").on("click",function(t){t.preventDefault(),a("#wp-mail-smtp-debug .error-log-toggle").find(".dashicons").toggleClass("dashicons-arrow-right-alt2 dashicons-arrow-down-alt2"),a("#wp-mail-smtp-debug .error-log").slideToggle(),a("#wp-mail-smtp-debug .error-log-note").toggle()}),a(".js-wp-mail-smtp-provider-remove",n.pageHolder).on("click",function(){return confirm(wp_mail_smtp.text_provider_remove)}),a(".wp-mail-smtp-setting-copy",n.pageHolder).click(function(t){t.preventDefault(),a("#"+a(this).data("source_id")).get(0).select(),e.execCommand("Copy")}),n.triggerExitNotice(),n.beforeSaveChecks()},education:{upgradeMailer:function(t){a.alert({backgroundDismiss:!0,escapeKey:!0,animationBounce:1,theme:"modern",type:"blue",animateFromElement:!1,draggable:!1,closeIcon:!0,useBootstrap:!1,title:wp_mail_smtp.education.upgrade_title.replace(/%name%/g,t.siblings("label").text().trim()),icon:'">'+wp_mail_smtp.education.upgrade_icon_lock+''+wp_mail_smtp.education.upgrade_bonus+wp_mail_smtp.education.upgrade_doc+"")},buttons:{confirm:{text:wp_mail_smtp.education.upgrade_button,btnClass:"btn-confirm",keys:["enter"],action:function(){i.open(wp_mail_smtp.education.upgrade_url+"&utm_content="+encodeURI(t.val()),"_blank")}}}})}},mailers:{smtp:{bindActions:function(){a("#wp-mail-smtp-setting-smtp-auth").change(function(){a("#wp-mail-smtp-setting-row-smtp-user, #wp-mail-smtp-setting-row-smtp-pass").toggleClass("inactive")}),a("#wp-mail-smtp-setting-row-smtp-encryption input").change(function(){var t=a(this),e=a("#wp-mail-smtp-setting-smtp-port",n.pageHolder);"tls"===t.val()?(e.val("587"),a("#wp-mail-smtp-setting-row-smtp-autotls").addClass("inactive")):("ssl"===t.val()?e.val("465"):e.val("25"),a("#wp-mail-smtp-setting-row-smtp-autotls").removeClass("inactive"))})}}},triggerExitNotice:function(){var t=a(".wp-mail-smtp-page-general:not( .wp-mail-smtp-tab-test )");a(i).on("beforeunload",function(){if(n.pluginSettingsChanged)return wp_mail_smtp.text_settings_not_saved}),a(":input:not( #wp-mail-smtp-setting-license-key )",t).on("change",function(){n.pluginSettingsChanged=!0}),a("form",t).on("submit",function(){n.pluginSettingsChanged=!1})},beforeSaveChecks:function(){a("form",n.pageHolder).on("submit",function(){if("mail"===a(".wp-mail-smtp-mailer input:checked",n.pageHolder).val()){var t=a(this);return a.alert({backgroundDismiss:!1,escapeKey:!1,animationBounce:1,theme:"modern",type:"orange",animateFromElement:!1,draggable:!1,closeIcon:!1,useBootstrap:!1,icon:'">'+wp_mail_smtp.default_mailer_notice.icon_alt+'\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2020-05-07T15:56:11+03:00\n" +"POT-Creation-Date: 2020-06-08T15:01:32+03:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.4.0\n" "X-Domain: wp-mail-smtp\n" @@ -33,1449 +33,2045 @@ msgid "https://wpforms.com/" msgstr "" #. translators: %s - error code, returned by Google API. -#: src/Admin/Area.php:112 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:125 +#: src/Admin/Area.php:125 msgid "There was an error while processing the authentication request: %s. Please try again." msgstr "" -#: src/Admin/Area.php:120 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:133 +#: src/Admin/Area.php:133 msgid "There was an error while processing the authentication request. Please try again." msgstr "" -#: src/Admin/Area.php:127 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:140 +#: src/Admin/Area.php:140 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." msgstr "" -#: src/Admin/Area.php:136 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:149 +#: src/Admin/Area.php:149 msgid "You have successfully linked the current site with your Google API project. Now you can start sending emails through Gmail." msgstr "" -#: src/Admin/Area.php:142 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:155 +#: src/Admin/Area.php:155 msgid "You have successfully linked the current site with your Microsoft API project. Now you can start sending emails through Outlook." msgstr "" #. translators: %s - Mailer anchor link. -#: src/Admin/Area.php:174 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:186 +#: src/Admin/Area.php:186 msgid "Thanks for using WP Mail SMTP! To complete the plugin setup and start sending emails, please select and configure your Mailer." msgstr "" -#: src/Admin/Area.php:197 -#: src/Admin/Area.php:198 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:209 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:210 +#: build/wp-mail-smtp-pro/src/SiteHealth.php:40 +#: src/Admin/Area.php:209 +#: src/Admin/Area.php:210 #: src/SiteHealth.php:40 msgid "WP Mail SMTP" msgstr "" -#: src/Admin/Area.php:208 -#: src/Admin/Area.php:209 -#: src/Admin/Area.php:802 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:220 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:221 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:864 +#: src/Admin/Area.php:220 +#: src/Admin/Area.php:221 +#: src/Admin/Area.php:864 msgid "Settings" msgstr "" -#: src/Admin/Area.php:216 -#: src/Admin/Area.php:217 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:228 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:229 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:627 +#: build/wp-mail-smtp-pro/src/Admin/Pages/Logs.php:49 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:30 +#: src/Admin/Area.php:228 +#: src/Admin/Area.php:229 #: src/Admin/Pages/About.php:627 -#: src/Admin/Pages/Logs.php:40 -#: src/Admin/Pages/LogsTab.php:31 +#: src/Admin/Pages/Logs.php:49 +#: src/Admin/Pages/LogsTab.php:30 msgid "Email Log" msgstr "" -#: src/Admin/Area.php:226 -#: src/Admin/Area.php:227 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:238 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:239 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:105 +#: src/Admin/Area.php:238 +#: src/Admin/Area.php:239 #: src/Admin/Pages/About.php:105 msgid "About Us" msgstr "" -#: src/Admin/Area.php:270 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:302 +#: src/Admin/Area.php:302 msgid "Are you sure you want to reset the current provider connection? You will need to immediately create a new one to be able to send emails." msgstr "" -#: src/Admin/Area.php:271 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:303 +#: src/Admin/Area.php:303 msgid "Changes that you made to the settings are not saved!" msgstr "" -#: src/Admin/Area.php:274 -msgid "%name% is a PRO Feature" +#: build/wp-mail-smtp-pro/src/Admin/Area.php:305 +#: src/Admin/Area.php:305 +msgid "Heads up!" msgstr "" -#: src/Admin/Area.php:275 -msgid "Upgrade to Pro" -msgstr "" - -#: src/Admin/Area.php:279 -msgid "Bonus: WP Mail SMTP users get $50 off regular price,
applied at checkout." -msgstr "" - -#: src/Admin/Area.php:288 -msgid "Already purchased?" -msgstr "" - -#: src/Admin/Area.php:355 -#: src/Admin/Area.php:362 -#: src/Admin/Pages/About.php:308 -msgid "Activate" -msgstr "" - -#: src/Admin/Area.php:356 -#: src/Admin/Pages/About.php:300 -msgid "Activated" -msgstr "" - -#: src/Admin/Area.php:357 -#: src/Admin/Pages/About.php:297 -msgid "Active" -msgstr "" - -#: src/Admin/Area.php:358 -#: src/Admin/Pages/About.php:305 -msgid "Inactive" -msgstr "" - -#: src/Admin/Area.php:359 -msgid "Processing..." -msgstr "" - -#: src/Admin/Area.php:360 -msgid "Could not install a plugin. Please download from WordPress.org and install manually." -msgstr "" - -#: src/Admin/Area.php:361 -msgid "Install and Activate" -msgstr "" - -#: src/Admin/Area.php:363 -msgid "Download" -msgstr "" - -#. translators: %1$s - WP.org link; %2$s - same WP.org link. -#: src/Admin/Area.php:423 -msgid "Please rate WP Mail SMTP ★★★★★ on WordPress.org to help us spread the word. Thank you from the WP Mail SMTP team!" -msgstr "" - -#: src/Admin/Area.php:743 -msgid "WP Mail SMTP Pro related message was successfully dismissed." -msgstr "" - -#: src/Admin/Area.php:762 -msgid "Educational notice for this mailer was successfully dismissed." -msgstr "" - -#: src/Admin/Area.php:801 -msgid "Go to WP Mail SMTP Settings page" -msgstr "" - -#: src/Admin/Area.php:808 -msgid "Go to WP Mail SMTP Lite vs Pro comparison page" -msgstr "" - -#: src/Admin/Area.php:809 -msgid "Premium Support" +#: build/wp-mail-smtp-pro/src/Admin/Area.php:307 +#: src/Admin/Area.php:307 +msgid "

The Default (PHP) mailer is currently selected, but is not recommended because in most cases it does not resolve email delivery issues.

Please consider selecting and configuring one of the other mailers.

" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Area.php:312 +#: build/wp-mail-smtp-pro/src/Admin/PageAbstract.php:81 +#: src/Admin/Area.php:312 #: src/Admin/PageAbstract.php:81 msgid "Save Settings" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Area.php:313 +#: src/Admin/Area.php:313 +msgid "Cancel" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:314 +#: src/Admin/Area.php:314 +msgid "Warning icon" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:319 +#: src/Admin/Area.php:319 +msgid "%name% is a PRO Feature" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:320 +#: src/Admin/Area.php:320 +msgid "Upgrade to Pro" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:324 +#: src/Admin/Area.php:324 +msgid "Bonus: WP Mail SMTP users get $50 off regular price,
applied at checkout." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:333 +#: src/Admin/Area.php:333 +msgid "Already purchased?" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:400 +#: build/wp-mail-smtp-pro/src/Admin/Area.php:407 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:308 +#: src/Admin/Area.php:400 +#: src/Admin/Area.php:407 +#: src/Admin/Pages/About.php:308 +msgid "Activate" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:401 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:300 +#: src/Admin/Area.php:401 +#: src/Admin/Pages/About.php:300 +msgid "Activated" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:402 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:297 +#: src/Admin/Area.php:402 +#: src/Admin/Pages/About.php:297 +msgid "Active" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:403 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:305 +#: src/Admin/Area.php:403 +#: src/Admin/Pages/About.php:305 +msgid "Inactive" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:404 +#: src/Admin/Area.php:404 +msgid "Processing..." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:405 +#: src/Admin/Area.php:405 +msgid "Could not install a plugin. Please download from WordPress.org and install manually." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:406 +#: src/Admin/Area.php:406 +msgid "Install and Activate" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:408 +#: src/Admin/Area.php:408 +msgid "Download" +msgstr "" + +#. translators: %1$s - WP.org link; %2$s - same WP.org link. +#: build/wp-mail-smtp-pro/src/Admin/Area.php:468 +#: src/Admin/Area.php:468 +msgid "Please rate WP Mail SMTP ★★★★★ on WordPress.org to help us spread the word. Thank you from the WP Mail SMTP team!" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:805 +#: src/Admin/Area.php:805 +msgid "WP Mail SMTP Pro related message was successfully dismissed." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:824 +#: src/Admin/Area.php:824 +msgid "Educational notice for this mailer was successfully dismissed." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:863 +#: src/Admin/Area.php:863 +msgid "Go to WP Mail SMTP Settings page" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:870 +#: src/Admin/Area.php:870 +msgid "Go to WP Mail SMTP Lite vs Pro comparison page" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Area.php:871 +#: src/Admin/Area.php:871 +msgid "Premium Support" +msgstr "" + #. translators: %s - plugin current license type. +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:98 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:526 #: src/Admin/Pages/About.php:98 #: src/Admin/Pages/About.php:526 msgid "%s vs Pro" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:170 #: src/Admin/Pages/About.php:170 msgid "Hello and welcome to WP Mail SMTP, the easiest and most popular WordPress SMTP plugin. We build software that helps your site reliably deliver emails every time." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:174 #: src/Admin/Pages/About.php:174 msgid "Email deliverability has been a well-documented problem for all WordPress websites. However as WPForms grew, we became more aware of this painful issue that affects our users and the larger WordPress community. So we decided to solve this problem and make a solution that's beginner friendly." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:177 #: src/Admin/Pages/About.php:177 msgid "Our goal is to make reliable email deliverability easy for WordPress." msgstr "" #. translators: %1$s - WPForms URL, %2$s - WPBeginner URL, %3$s - OptinMonster URL, %4$s - MonsterInsights URL, %5$s - RafflePress URL +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:184 #: src/Admin/Pages/About.php:184 msgid "WP Mail SMTP is brought to you by the same team that's behind the most user friendly WordPress forms, WPForms, the largest WordPress resource site, WPBeginner, the most popular lead-generation software, OptinMonster, the best WordPress analytics plugin, MonsterInsights, and the most powerful WordPress contest plugin, RafflePress." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:202 #: src/Admin/Pages/About.php:202 msgid "Yup, we know a thing or two about building awesome products that customers love." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:208 #: src/Admin/Pages/About.php:208 msgid "The WPForms Team photo" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:210 #: src/Admin/Pages/About.php:210 msgid "The WPForms Team" msgstr "" #. translators: %s - status HTML text. +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:250 #: src/Admin/Pages/About.php:250 msgid "Status: %s" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:316 #: src/Admin/Pages/About.php:316 msgid "Not Installed" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:319 #: src/Admin/Pages/About.php:319 msgid "Install Plugin" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:340 #: src/Admin/Pages/About.php:340 msgid "MonsterInsights" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:341 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:347 #: src/Admin/Pages/About.php:341 #: src/Admin/Pages/About.php:347 msgid "MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:346 #: src/Admin/Pages/About.php:346 msgid "MonsterInsights Pro" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:354 #: src/Admin/Pages/About.php:354 msgid "OptinMonster" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:355 #: src/Admin/Pages/About.php:355 msgid "Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:361 #: src/Admin/Pages/About.php:361 msgid "Contact Forms by WPForms" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:362 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:368 #: src/Admin/Pages/About.php:362 #: src/Admin/Pages/About.php:368 msgid "The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:367 #: src/Admin/Pages/About.php:367 msgid "WPForms Pro" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:375 #: src/Admin/Pages/About.php:375 msgid "RafflePress" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:376 +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:382 #: src/Admin/Pages/About.php:376 #: src/Admin/Pages/About.php:382 msgid "Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:381 #: src/Admin/Pages/About.php:381 msgid "RafflePress Pro" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:401 #: src/Admin/Pages/About.php:401 msgid "Could not activate the plugin. Please activate it from the Plugins page." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:413 #: src/Admin/Pages/About.php:413 msgid "Plugin activated." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:430 #: src/Admin/Pages/About.php:430 msgid "Could not install the plugin." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:491 #: src/Admin/Pages/About.php:491 msgid "Plugin installed & activated." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:499 #: src/Admin/Pages/About.php:499 msgid "Plugin installed." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:534 #: src/Admin/Pages/About.php:534 msgid "Get the most out of WP Mail SMTP by upgrading to Pro and unlocking all of the powerful features." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:543 #: src/Admin/Pages/About.php:543 msgid "Feature" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:553 #: src/Admin/Pages/About.php:553 msgid "Pro" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:594 #: src/Admin/Pages/About.php:594 msgid "Get WP Mail SMTP Pro Today and Unlock all of these Powerful Features" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:601 #: src/Admin/Pages/About.php:601 msgid "Bonus: WP Mail SMTP Lite users get $50 off regular price, automatically applied at checkout." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:628 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:27 #: src/Admin/Pages/About.php:628 #: src/Admin/Pages/ControlTab.php:27 msgid "Email Controls" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:629 #: src/Admin/Pages/About.php:629 msgid "Additional Mailers" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:630 #: src/Admin/Pages/About.php:630 msgid "Customer Support" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:651 #: src/Admin/Pages/About.php:651 msgid "Emails are not logged" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:657 #: src/Admin/Pages/About.php:657 msgid "Complete Email Log management inside WordPress" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:665 #: src/Admin/Pages/About.php:665 msgid "No controls over whether default WordPress emails are sent" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:671 #: src/Admin/Pages/About.php:671 msgid "Complete Email Controls management for most default WordPress emails" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:679 #: src/Admin/Pages/About.php:679 msgid "Only default list of mailers" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:685 #: src/Admin/Pages/About.php:685 msgid "Additional mailers: Microsoft Outlook (with Office365 support) and Amazon SES" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:693 #: src/Admin/Pages/About.php:693 msgid "Limited Support" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:699 #: src/Admin/Pages/About.php:699 msgid "Priority Support" msgstr "" -#: src/Admin/Pages/ControlTab.php:46 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:48 +#: src/Admin/Pages/ControlTab.php:48 msgid "Comment Notifications" msgstr "" -#: src/Admin/Pages/ControlTab.php:47 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:49 +#: src/Admin/Pages/ControlTab.php:49 msgid "Manage emails sent when comments are published or awaiting moderation." msgstr "" -#: src/Admin/Pages/ControlTab.php:51 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:53 +#: src/Admin/Pages/ControlTab.php:53 msgid "Site Admin Email Change Notifications" msgstr "" -#: src/Admin/Pages/ControlTab.php:52 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:54 +#: src/Admin/Pages/ControlTab.php:54 msgid "Manage emails sent when site admin's account has been changed." msgstr "" -#: src/Admin/Pages/ControlTab.php:56 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:58 +#: src/Admin/Pages/ControlTab.php:58 msgid "User Change Notifications" msgstr "" -#: src/Admin/Pages/ControlTab.php:57 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:59 +#: src/Admin/Pages/ControlTab.php:59 msgid "Limit emails triggered by password changed/reset, email changed, and more." msgstr "" -#: src/Admin/Pages/ControlTab.php:61 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:63 +#: src/Admin/Pages/ControlTab.php:63 msgid "Personal Data Requests Notifications" msgstr "" -#: src/Admin/Pages/ControlTab.php:62 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:64 +#: src/Admin/Pages/ControlTab.php:64 msgid "Control emails for data requests and data removal actions." msgstr "" -#: src/Admin/Pages/ControlTab.php:66 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:68 +#: src/Admin/Pages/ControlTab.php:68 msgid "Automatic Update Notifications" msgstr "" -#: src/Admin/Pages/ControlTab.php:67 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:69 +#: src/Admin/Pages/ControlTab.php:69 msgid "Manage emails sent by the core automatic update process." msgstr "" -#: src/Admin/Pages/ControlTab.php:71 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:73 +#: src/Admin/Pages/ControlTab.php:73 msgid "New User Notifications" msgstr "" -#: src/Admin/Pages/ControlTab.php:72 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:74 +#: src/Admin/Pages/ControlTab.php:74 msgid "Toggle emails sent to both user and site administrator about new user accounts." msgstr "" -#: src/Admin/Pages/ControlTab.php:79 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:92 +#: src/Admin/Pages/ControlTab.php:92 msgid "Unlock Email Controls" msgstr "" -#: src/Admin/Pages/ControlTab.php:82 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:95 +#: src/Admin/Pages/ControlTab.php:95 msgid "Email Controls allows you to granularly manage emails sent by WordPress.
" msgstr "" -#: src/Admin/Pages/ControlTab.php:106 -#: src/Admin/Pages/Logs.php:77 +#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:119 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:67 +#: src/Admin/Pages/ControlTab.php:119 +#: src/Admin/Pages/LogsTab.php:67 msgid "Upgrade to WP Mail SMTP Pro" msgstr "" -#: src/Admin/Pages/Logs.php:63 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:53 +#: src/Admin/Pages/LogsTab.php:53 msgid "Unlock Email Logging" msgstr "" -#: src/Admin/Pages/Logs.php:66 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:56 +#: src/Admin/Pages/LogsTab.php:56 msgid "Keep track of every email sent from your WordPress site with email logging.
" msgstr "" -#: src/Admin/Pages/Logs.php:67 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:57 +#: src/Admin/Pages/LogsTab.php:57 msgid "Troubleshoot sending issues, recover lost emails, and more!" msgstr "" -#: src/Admin/Pages/Logs.php:71 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:61 +#: src/Admin/Pages/LogsTab.php:61 msgid "Logs Archive Page Screenshot" msgstr "" -#: src/Admin/Pages/Logs.php:72 +#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:62 +#: src/Admin/Pages/LogsTab.php:62 msgid "Logs Single Page Screenshot" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:24 #: src/Admin/Pages/MiscTab.php:24 msgid "Misc" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:56 #: src/Admin/Pages/MiscTab.php:56 msgid "Do Not Send" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:65 #: src/Admin/Pages/MiscTab.php:65 msgid "Check this if you would like to stop sending all emails." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:71 #: src/Admin/Pages/MiscTab.php:71 msgid "Some plugins, like BuddyPress and Events Manager, are using their own email delivery solutions. By default, this option does not block their emails, as those plugins do not use default wp_mail() function to send emails." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:79 #: src/Admin/Pages/MiscTab.php:79 msgid "You will need to consult with their documentation to switch them to use default WordPress email delivery." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:81 #: src/Admin/Pages/MiscTab.php:81 msgid "Test emails are allowed to be sent, regardless of this option." msgstr "" #. translators: %1$s - constant that was used; %2$s - file where it was used. +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:86 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:468 #: src/Admin/Pages/MiscTab.php:86 #: src/Providers/OptionsAbstract.php:468 msgid "The value of this field was set using a constant %1$s most likely inside %2$s of your WordPress installation." msgstr "" -#. translators: %s - file to put that constant in. -#: src/Admin/Pages/MiscTab.php:92 -msgid "If you want to enable this option using constants, put the lines below to your %s file:" +#. translators: %s - The URL to the constants support article. +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:93 +#: src/Admin/Pages/MiscTab.php:93 +msgid "Please read this support article if you want to enable this option using constants." msgstr "" -#: src/Admin/Pages/MiscTab.php:111 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:114 +#: src/Admin/Pages/MiscTab.php:114 msgid "Hide Announcements" msgstr "" -#: src/Admin/Pages/MiscTab.php:120 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:123 +#: src/Admin/Pages/MiscTab.php:123 msgid "Check this if you would like to hide plugin announcements and update details." msgstr "" -#: src/Admin/Pages/MiscTab.php:130 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:133 +#: src/Admin/Pages/MiscTab.php:133 msgid "Hide Email Delivery Errors" msgstr "" -#: src/Admin/Pages/MiscTab.php:146 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:149 +#: src/Admin/Pages/MiscTab.php:149 msgid "Check this if you would like to hide warnings alerting of email delivery errors." msgstr "" #. translators: %s - filter that was used to disabled. -#: src/Admin/Pages/MiscTab.php:153 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:156 +#: src/Admin/Pages/MiscTab.php:156 msgid "Email Delivery Errors were disabled using a %s filter." msgstr "" -#: src/Admin/Pages/MiscTab.php:162 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:165 +#: src/Admin/Pages/MiscTab.php:165 msgid "This is not recommended and should only be done for staging or development sites." msgstr "" -#: src/Admin/Pages/MiscTab.php:177 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:180 +#: src/Admin/Pages/MiscTab.php:180 msgid "Uninstall WP Mail SMTP" msgstr "" -#: src/Admin/Pages/MiscTab.php:185 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:188 +#: src/Admin/Pages/MiscTab.php:188 msgid "Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable." msgstr "" -#: src/Admin/Pages/MiscTab.php:220 +#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:223 +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:540 +#: src/Admin/Pages/MiscTab.php:223 #: src/Admin/Pages/SettingsTab.php:540 msgid "Settings were successfully saved." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:36 #: src/Admin/Pages/SettingsTab.php:36 msgid "General" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:64 #: src/Admin/Pages/SettingsTab.php:64 msgid "License" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:67 #: src/Admin/Pages/SettingsTab.php:67 msgid "Your license key provides access to updates and support." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:75 #: src/Admin/Pages/SettingsTab.php:75 msgid "License Key" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:85 #: src/Admin/Pages/SettingsTab.php:85 msgid "Mail" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:92 #: src/Admin/Pages/SettingsTab.php:92 msgid "From Email" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:103 #: src/Admin/Pages/SettingsTab.php:103 msgid "The email address which emails are sent from." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:104 #: src/Admin/Pages/SettingsTab.php:104 msgid "If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:107 #: src/Admin/Pages/SettingsTab.php:107 msgid "Please note that other plugins can change this, to prevent this use the setting below." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:119 #: src/Admin/Pages/SettingsTab.php:119 msgid "Force From Email" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:124 #: src/Admin/Pages/SettingsTab.php:124 msgid "Current provider will automatically force From Email to be the email address that you use to set up the connection below." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:128 #: src/Admin/Pages/SettingsTab.php:128 msgid "If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:138 #: src/Admin/Pages/SettingsTab.php:138 msgid "From Name" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:149 #: src/Admin/Pages/SettingsTab.php:149 msgid "The name which emails are sent from." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:161 #: src/Admin/Pages/SettingsTab.php:161 msgid "Force From Name" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:166 #: src/Admin/Pages/SettingsTab.php:166 msgid "Current provider doesn't support setting and forcing From Name. Emails will be sent on behalf of the account name used to setup the connection below." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:170 #: src/Admin/Pages/SettingsTab.php:170 msgid "If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:179 #: src/Admin/Pages/SettingsTab.php:179 msgid "Return Path" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:188 #: src/Admin/Pages/SettingsTab.php:188 msgid "Set the return-path to match the From Email" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:192 #: src/Admin/Pages/SettingsTab.php:192 msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:193 #: src/Admin/Pages/SettingsTab.php:193 msgid "If unchecked, bounce messages may be lost. Some providers may ignore this option." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:201 #: src/Admin/Pages/SettingsTab.php:201 msgid "Mailer" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:242 #: src/Admin/Pages/SettingsTab.php:242 msgid "Don't see what you're looking for?" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:244 #: src/Admin/Pages/SettingsTab.php:244 msgid "Suggest a Mailer" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:272 #: src/Admin/Pages/SettingsTab.php:272 msgid "Dismiss this notice" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:314 #: src/Admin/Pages/SettingsTab.php:314 msgid "You're using WP Mail SMTP Lite - no license needed. Enjoy!" msgstr "" #. translators: %s - WPMailSMTP.com upgrade URL. +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:320 #: src/Admin/Pages/SettingsTab.php:320 msgid "To unlock more features consider upgrading to PRO." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:339 #: src/Admin/Pages/SettingsTab.php:339 msgid "As a valued WP Mail SMTP Lite user you receive $50 off, automatically applied at checkout!" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:400 #: src/Admin/Pages/SettingsTab.php:400 msgid "Get WP Mail SMTP Pro and Unlock all the Powerful Features" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:404 #: src/Admin/Pages/SettingsTab.php:404 msgid "Thanks for being a loyal WP Mail SMTP user. Upgrade to WP Mail SMTP Pro to unlock more awesome features and experience why WP Mail SMTP is the most popular SMTP plugin." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:408 #: src/Admin/Pages/SettingsTab.php:408 msgid "We know that you will truly love WP Mail SMTP. It's used by over 1,000,000 websites." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:411 #: src/Admin/Pages/SettingsTab.php:411 msgid "Pro Features:" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:415 #: src/Admin/Pages/SettingsTab.php:415 msgid "Manage Notifications - control which emails your site sends" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:416 #: src/Admin/Pages/SettingsTab.php:416 msgid "Email Logging - keep track of every email sent from your site" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:417 #: src/Admin/Pages/SettingsTab.php:417 msgid "Office 365 - send emails using your Office 365 account" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:418 #: src/Admin/Pages/SettingsTab.php:418 msgid "Amazon SES - harness the power of AWS" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:419 #: src/Admin/Pages/SettingsTab.php:419 msgid "Outlook.com - send emails using your Outlook.com account" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:420 #: src/Admin/Pages/SettingsTab.php:420 msgid "Access to our world class support team" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:423 #: src/Admin/Pages/SettingsTab.php:423 msgid "White Glove Setup - sit back and relax while we handle everything for you" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:424 #: src/Admin/Pages/SettingsTab.php:424 msgid "Install WP Mail SMTP Pro plugin" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:425 #: src/Admin/Pages/SettingsTab.php:425 msgid "Set up domain name verification (DNS)" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:426 #: src/Admin/Pages/SettingsTab.php:426 msgid "Configure Mailgun service" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:427 #: src/Admin/Pages/SettingsTab.php:427 msgid "Set up WP Mail SMTP Pro plugin" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:428 #: src/Admin/Pages/SettingsTab.php:428 msgid "Test and verify email delivery" msgstr "" #. translators: %s - WPMailSMTP.com URL. +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:436 #: src/Admin/Pages/SettingsTab.php:436 msgid "Get WP Mail SMTP Pro Today and Unlock all the Powerful Features »" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:454 #: src/Admin/Pages/SettingsTab.php:454 msgid "Bonus: WP Mail SMTP users get $50 off regular price, automatically applied at checkout." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:37 #: src/Admin/Pages/TestTab.php:37 msgid "Email Test" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:59 #: src/Admin/Pages/TestTab.php:59 msgid "Send a Test Email" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:66 #: src/Admin/Pages/TestTab.php:66 msgid "Send To" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:72 #: src/Admin/Pages/TestTab.php:72 msgid "Enter email address where test email will be sent." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:80 #: src/Admin/Pages/TestTab.php:80 msgid "HTML" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:86 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:264 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:286 #: src/Admin/Pages/TestTab.php:86 #: src/Providers/OptionsAbstract.php:264 #: src/Providers/OptionsAbstract.php:286 msgid "On" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:87 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:265 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:287 #: src/Admin/Pages/TestTab.php:87 #: src/Providers/OptionsAbstract.php:265 #: src/Providers/OptionsAbstract.php:287 msgid "Off" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:90 #: src/Admin/Pages/TestTab.php:90 msgid "Send this email in HTML or in plain text format." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:110 #: src/Admin/Pages/TestTab.php:110 msgid "You cannot send an email. Mailer is not properly configured. Please check your settings." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:114 #: src/Admin/Pages/TestTab.php:114 msgid "Send Email" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:142 #: src/Admin/Pages/TestTab.php:142 msgid "Test failed. Please use a valid email address and try to resend the test email." msgstr "" #. translators: %s - email address a test email will be sent to. +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:154 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:160 #: src/Admin/Pages/TestTab.php:154 #: src/Admin/Pages/TestTab.php:160 msgid "Test email to %s" msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:186 #: src/Admin/Pages/TestTab.php:186 msgid "Test plain text email was sent successfully!" msgstr "" #. translators: %s - "HTML" in bold. +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:190 #: src/Admin/Pages/TestTab.php:190 msgid "Test %s email was sent successfully! Please check your inbox to make sure it is delivered." msgstr "" -#: src/Admin/Pages/TestTab.php:498 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:510 +#: src/Admin/Pages/TestTab.php:510 msgid "SSL certificate issue." msgstr "" -#: src/Admin/Pages/TestTab.php:499 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:511 +#: src/Admin/Pages/TestTab.php:511 msgid "This means your web server cannot reliably make secure connections (make requests to HTTPS sites)." msgstr "" -#: src/Admin/Pages/TestTab.php:500 -#: src/Admin/Pages/TestTab.php:551 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:512 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:560 +#: src/Admin/Pages/TestTab.php:512 +#: src/Admin/Pages/TestTab.php:560 msgid "Typically this error is returned when web server is not configured properly." msgstr "" -#: src/Admin/Pages/TestTab.php:503 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:515 +#: src/Admin/Pages/TestTab.php:515 msgid "Contact your web hosting provider and inform them your site has an issue with SSL certificates." msgstr "" -#: src/Admin/Pages/TestTab.php:504 -#: src/Admin/Pages/TestTab.php:555 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:516 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:564 +#: src/Admin/Pages/TestTab.php:516 +#: src/Admin/Pages/TestTab.php:564 msgid "The exact error you can provide them is in the Error log, available at the bottom of this page." msgstr "" -#: src/Admin/Pages/TestTab.php:505 -#: src/Admin/Pages/TestTab.php:556 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:517 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:565 +#: src/Admin/Pages/TestTab.php:517 +#: src/Admin/Pages/TestTab.php:565 msgid "Ask them to resolve the issue then try again." msgstr "" -#: src/Admin/Pages/TestTab.php:516 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:528 +#: src/Admin/Pages/TestTab.php:528 msgid "Could not connect to host." msgstr "" #. translators: %s - SMTP host address. -#: src/Admin/Pages/TestTab.php:520 -#: src/Admin/Pages/TestTab.php:547 -#: src/Admin/Pages/TestTab.php:620 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:531 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:556 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:658 +#: src/Admin/Pages/TestTab.php:531 +#: src/Admin/Pages/TestTab.php:556 +#: src/Admin/Pages/TestTab.php:658 msgid "This means your web server was unable to connect to %s." msgstr "" -#: src/Admin/Pages/TestTab.php:523 -#: src/Admin/Pages/TestTab.php:550 -#: src/Admin/Pages/TestTab.php:623 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:534 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:559 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:661 +#: src/Admin/Pages/TestTab.php:534 +#: src/Admin/Pages/TestTab.php:559 +#: src/Admin/Pages/TestTab.php:661 msgid "This means your web server was unable to connect to the host server." msgstr "" -#: src/Admin/Pages/TestTab.php:524 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:535 +#: src/Admin/Pages/TestTab.php:535 msgid "Typically this error is returned your web server is blocking the connections or the SMTP host denying the request." msgstr "" #. translators: %s - SMTP host address. -#: src/Admin/Pages/TestTab.php:529 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:539 +#: src/Admin/Pages/TestTab.php:539 msgid "Contact your web hosting provider and ask them to verify your server can connect to %s. Additionally, ask them if a firewall or security policy may be preventing the connection." msgstr "" -#: src/Admin/Pages/TestTab.php:532 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:542 +#: src/Admin/Pages/TestTab.php:542 msgid "If using \"Other SMTP\" Mailer, triple check your SMTP settings including host address, email, and password." msgstr "" -#: src/Admin/Pages/TestTab.php:533 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:543 +#: src/Admin/Pages/TestTab.php:543 msgid "If using \"Other SMTP\" Mailer, contact your SMTP host to confirm they are accepting outside connections with the settings you have configured (address, username, port, security, etc)." msgstr "" -#: src/Admin/Pages/TestTab.php:543 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:553 +#: src/Admin/Pages/TestTab.php:553 msgid "Could not connect to your host." msgstr "" -#: src/Admin/Pages/TestTab.php:554 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:563 +#: src/Admin/Pages/TestTab.php:563 msgid "Contact your web hosting provider and inform them you are having issues making outbound connections." msgstr "" -#: src/Admin/Pages/TestTab.php:566 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:575 +#: src/Admin/Pages/TestTab.php:575 msgid "Could not authenticate your SMTP account." msgstr "" -#: src/Admin/Pages/TestTab.php:567 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:576 +#: src/Admin/Pages/TestTab.php:576 msgid "This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings." msgstr "" -#: src/Admin/Pages/TestTab.php:568 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:577 +#: src/Admin/Pages/TestTab.php:577 msgid "Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting." msgstr "" -#: src/Admin/Pages/TestTab.php:571 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:580 +#: src/Admin/Pages/TestTab.php:580 msgid "Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings." msgstr "" -#: src/Admin/Pages/TestTab.php:572 -#: src/Admin/Pages/TestTab.php:649 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:581 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:686 +#: src/Admin/Pages/TestTab.php:581 +#: src/Admin/Pages/TestTab.php:686 msgid "Contact your SMTP host to confirm you are using the correct username and password." msgstr "" -#: src/Admin/Pages/TestTab.php:573 -#: src/Admin/Pages/TestTab.php:650 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:582 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:687 +#: src/Admin/Pages/TestTab.php:582 +#: src/Admin/Pages/TestTab.php:687 msgid "Verify with your SMTP host that your account has permissions to send emails using outside connections." msgstr "" -#: src/Admin/Pages/TestTab.php:583 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:592 +#: src/Admin/Pages/TestTab.php:592 msgid "Error due to unsolicited and/or bulk e-mail." msgstr "" -#: src/Admin/Pages/TestTab.php:584 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:593 +#: src/Admin/Pages/TestTab.php:593 msgid "This means the connection to your SMTP host was made successfully, but the host rejected the email." msgstr "" -#: src/Admin/Pages/TestTab.php:585 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:594 +#: src/Admin/Pages/TestTab.php:594 msgid "Typically this error is returned when you are sending too many e-mails or e-mails that have been identified as spam." msgstr "" -#: src/Admin/Pages/TestTab.php:588 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:597 +#: src/Admin/Pages/TestTab.php:597 msgid "Check the emails that are sending are sending individually. Example: email is not sending to 30 recipients. You can install any WordPress e-mail logging plugin to do that." msgstr "" -#: src/Admin/Pages/TestTab.php:589 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:598 +#: src/Admin/Pages/TestTab.php:598 msgid "Contact your SMTP host to ask about sending/rate limits." msgstr "" -#: src/Admin/Pages/TestTab.php:590 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:599 +#: src/Admin/Pages/TestTab.php:599 msgid "Verify with them your SMTP account is in good standing and your account has not been flagged." msgstr "" -#: src/Admin/Pages/TestTab.php:600 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:609 +#: src/Admin/Pages/TestTab.php:609 msgid "Unauthenticated senders are not allowed." msgstr "" -#: src/Admin/Pages/TestTab.php:601 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:610 +#: src/Admin/Pages/TestTab.php:610 msgid "This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password." msgstr "" -#: src/Admin/Pages/TestTab.php:604 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:613 +#: src/Admin/Pages/TestTab.php:613 msgid "Go to WP Mail SMTP plugin Settings page." msgstr "" -#: src/Admin/Pages/TestTab.php:605 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:614 +#: src/Admin/Pages/TestTab.php:614 msgid "Enable Authentication" msgstr "" -#: src/Admin/Pages/TestTab.php:606 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:615 +#: src/Admin/Pages/TestTab.php:615 msgid "Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields." msgstr "" -#: src/Admin/Pages/TestTab.php:616 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:627 +#: src/Admin/Pages/TestTab.php:627 +msgid "Misconfigured server certificate." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:628 +#: src/Admin/Pages/TestTab.php:628 +msgid "This means OpenSSL on your server isn't able to verify the host certificate." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:629 +#: src/Admin/Pages/TestTab.php:629 +msgid "There are a few reasons why this is happening. It could be that the host certificate is misconfigured, or this server's OpenSSL is using an outdated CA bundle." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:632 +#: src/Admin/Pages/TestTab.php:632 +msgid "Verify that the host's SSL certificate is valid." +msgstr "" + +#. translators: %s - URL to the PHP openssl manual +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:635 +#: src/Admin/Pages/TestTab.php:635 +msgid "Contact your hosting support, show them the \"full Error Log for debugging\" below and share this link with them." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:655 +#: src/Admin/Pages/TestTab.php:655 msgid "Could not connect to the SMTP host." msgstr "" -#: src/Admin/Pages/TestTab.php:624 -#: src/Admin/Pages/TestTab.php:960 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:662 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1048 +#: src/Admin/Pages/TestTab.php:662 +#: src/Admin/Pages/TestTab.php:1048 msgid "Typically this error is returned for one of the following reasons:" msgstr "" -#: src/Admin/Pages/TestTab.php:625 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:663 +#: src/Admin/Pages/TestTab.php:663 msgid "SMTP settings are incorrect (wrong port, security setting, incorrect host)." msgstr "" -#: src/Admin/Pages/TestTab.php:626 -#: src/Admin/Pages/TestTab.php:962 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:664 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1050 +#: src/Admin/Pages/TestTab.php:664 +#: src/Admin/Pages/TestTab.php:1050 msgid "Your web server is blocking the connection." msgstr "" -#: src/Admin/Pages/TestTab.php:627 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:665 +#: src/Admin/Pages/TestTab.php:665 msgid "Your SMTP host is rejecting the connection." msgstr "" -#: src/Admin/Pages/TestTab.php:630 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:668 +#: src/Admin/Pages/TestTab.php:668 msgid "Triple check your SMTP settings including host address, email, and password, port, and security." msgstr "" #. translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption. -#: src/Admin/Pages/TestTab.php:634 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:671 +#: src/Admin/Pages/TestTab.php:671 msgid "Contact your web hosting provider and ask them to verify your server can connect to %1$s on port %2$s using %3$s encryption. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.
Note: this is the most common cause of this issue." msgstr "" -#: src/Admin/Pages/TestTab.php:647 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:684 +#: src/Admin/Pages/TestTab.php:684 msgid "no" msgstr "" -#: src/Admin/Pages/TestTab.php:660 -#: src/Admin/Pages/TestTab.php:675 -#: src/Admin/Pages/TestTab.php:691 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:697 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:712 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:728 +#: src/Admin/Pages/TestTab.php:697 +#: src/Admin/Pages/TestTab.php:712 +#: src/Admin/Pages/TestTab.php:728 msgid "Mailgun failed." msgstr "" -#: src/Admin/Pages/TestTab.php:661 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:698 +#: src/Admin/Pages/TestTab.php:698 msgid "It seems that you forgot to activate your Mailgun account." msgstr "" -#: src/Admin/Pages/TestTab.php:664 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:701 +#: src/Admin/Pages/TestTab.php:701 msgid "Check your inbox you used to create a Mailgun account. Click the activation link in an email from Mailgun." msgstr "" -#: src/Admin/Pages/TestTab.php:665 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:702 +#: src/Admin/Pages/TestTab.php:702 msgid "If you do not see activation email, go to your Mailgun control panel and resend the activation email." msgstr "" -#: src/Admin/Pages/TestTab.php:676 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:713 +#: src/Admin/Pages/TestTab.php:713 msgid "Typically this error is because there is an issue with your Mailgun settings, in many cases the API key." msgstr "" -#: src/Admin/Pages/TestTab.php:679 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:716 +#: src/Admin/Pages/TestTab.php:716 msgid "Verify your API key is correct." msgstr "" -#: src/Admin/Pages/TestTab.php:680 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:717 +#: src/Admin/Pages/TestTab.php:717 msgid "Go to your Mailgun account and view your API key." msgstr "" -#: src/Admin/Pages/TestTab.php:681 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:718 +#: src/Admin/Pages/TestTab.php:718 msgid "Note that the API key includes the \"key\" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting." msgstr "" -#: src/Admin/Pages/TestTab.php:692 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:729 +#: src/Admin/Pages/TestTab.php:729 msgid "Your Mailgun account does not have access to send emails." msgstr "" -#: src/Admin/Pages/TestTab.php:693 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:730 +#: src/Admin/Pages/TestTab.php:730 msgid "Typically this error is because you have not set up and/or complete domain name verification for your Mailgun account." msgstr "" #. translators: %s - Mailgun documentation URL. -#: src/Admin/Pages/TestTab.php:699 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:735 +#: src/Admin/Pages/TestTab.php:735 msgid "Go to our how-to guide for setting up Mailgun with WP Mail SMTP." msgstr "" -#: src/Admin/Pages/TestTab.php:710 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:746 +#: src/Admin/Pages/TestTab.php:746 msgid "Complete the steps in section \"2. Verify Your Domain\"." msgstr "" -#: src/Admin/Pages/TestTab.php:720 -#: src/Admin/Pages/TestTab.php:771 -#: src/Admin/Pages/TestTab.php:792 -#: src/Admin/Pages/TestTab.php:819 -#: src/Admin/Pages/TestTab.php:835 -#: src/Admin/Pages/TestTab.php:890 -#: src/Admin/Pages/TestTab.php:917 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:756 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:805 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:825 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:851 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:867 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:919 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:945 +#: src/Admin/Pages/TestTab.php:756 +#: src/Admin/Pages/TestTab.php:805 +#: src/Admin/Pages/TestTab.php:825 +#: src/Admin/Pages/TestTab.php:851 +#: src/Admin/Pages/TestTab.php:867 +#: src/Admin/Pages/TestTab.php:919 +#: src/Admin/Pages/TestTab.php:945 msgid "Google API Error." msgstr "" -#: src/Admin/Pages/TestTab.php:721 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:757 +#: src/Admin/Pages/TestTab.php:757 msgid "You have not properly configured Gmail mailer." msgstr "" -#: src/Admin/Pages/TestTab.php:722 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:758 +#: src/Admin/Pages/TestTab.php:758 msgid "Make sure that you have clicked the \"Allow plugin to send emails using your Google account\" button under Gmail settings." msgstr "" -#: src/Admin/Pages/TestTab.php:725 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:761 +#: src/Admin/Pages/TestTab.php:761 msgid "Go to plugin Settings page and click the \"Allow plugin to send emails using your Google account\" button." msgstr "" -#: src/Admin/Pages/TestTab.php:726 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:762 +#: src/Admin/Pages/TestTab.php:762 msgid "After the click you should be redirected to a Gmail authorization screen, where you will be asked a permission to send emails on your behalf." msgstr "" -#: src/Admin/Pages/TestTab.php:727 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:763 +#: src/Admin/Pages/TestTab.php:763 msgid "Please click \"Agree\", if you see that button. If not - you will need to enable less secure apps first:" msgstr "" #. translators: %s - Google support article URL. -#: src/Admin/Pages/TestTab.php:733 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:768 +#: src/Admin/Pages/TestTab.php:768 msgid "if you are using regular Gmail account, please read this article to proceed." msgstr "" #. translators: %s - Google support article URL. -#: src/Admin/Pages/TestTab.php:749 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:783 +#: src/Admin/Pages/TestTab.php:783 msgid "if you are using G Suite, please read this article to proceed." msgstr "" -#: src/Admin/Pages/TestTab.php:772 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:806 +#: src/Admin/Pages/TestTab.php:806 msgid "Typically this error is because address the email was sent to is invalid or was empty." msgstr "" -#: src/Admin/Pages/TestTab.php:775 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:809 +#: src/Admin/Pages/TestTab.php:809 msgid "Check the \"Send To\" email address used and confirm it is a valid email and was not empty." msgstr "" #. translators: 1 - correct email address example. 2 - incorrect email address example. -#: src/Admin/Pages/TestTab.php:778 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:811 +#: src/Admin/Pages/TestTab.php:811 msgid "It should be something like this: %1$s. These are incorrect values: %2$s." msgstr "" -#: src/Admin/Pages/TestTab.php:782 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:815 +#: src/Admin/Pages/TestTab.php:815 msgid "Make sure that the generated email has a TO header, useful when you are responsible for email creation." msgstr "" -#: src/Admin/Pages/TestTab.php:793 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:826 +#: src/Admin/Pages/TestTab.php:826 msgid "Unfortunately, this error can be due to many different reasons." msgstr "" #. translators: %s - Blog article URL. -#: src/Admin/Pages/TestTab.php:799 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:831 +#: src/Admin/Pages/TestTab.php:831 msgid "Please read this article to learn more about what can cause this error and how it can be resolved." msgstr "" -#: src/Admin/Pages/TestTab.php:820 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:852 +#: src/Admin/Pages/TestTab.php:852 msgid "Authentication code that Google returned to you has already been used on your previous auth attempt." msgstr "" -#: src/Admin/Pages/TestTab.php:823 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:855 +#: src/Admin/Pages/TestTab.php:855 msgid "Make sure that you are not trying to manually clean up the plugin options to retry the \"Allow...\" step." msgstr "" -#: src/Admin/Pages/TestTab.php:824 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:856 +#: src/Admin/Pages/TestTab.php:856 msgid "Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry." msgstr "" -#: src/Admin/Pages/TestTab.php:825 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:857 +#: src/Admin/Pages/TestTab.php:857 msgid "Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts." msgstr "" -#: src/Admin/Pages/TestTab.php:836 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:868 +#: src/Admin/Pages/TestTab.php:868 msgid "There are various reasons for that, please review the steps below." msgstr "" #. translators: %s - Google G Suite Admin area URL. -#: src/Admin/Pages/TestTab.php:842 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:873 +#: src/Admin/Pages/TestTab.php:873 msgid "Make sure that your G Suite trial period has not expired. You can check the status here." msgstr "" #. translators: %s - Google G Suite Admin area URL. -#: src/Admin/Pages/TestTab.php:856 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:886 +#: src/Admin/Pages/TestTab.php:886 msgid "Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in G Suite Admin area." msgstr "" #. translators: %s - Google Developers Console URL. -#: src/Admin/Pages/TestTab.php:870 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:899 +#: src/Admin/Pages/TestTab.php:899 msgid "Make sure that you have Gmail API enabled, and you can do that here." msgstr "" -#: src/Admin/Pages/TestTab.php:893 -#: src/Admin/Pages/TestTab.php:921 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:922 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:949 +#: src/Admin/Pages/TestTab.php:922 +#: src/Admin/Pages/TestTab.php:949 msgid "Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled." msgstr "" #. translators: %s - Gmail documentation URL. -#: src/Admin/Pages/TestTab.php:897 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:925 +#: src/Admin/Pages/TestTab.php:925 msgid "Please follow our Gmail tutorial to be sure that all the correct project and data is applied." msgstr "" -#: src/Admin/Pages/TestTab.php:918 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:946 +#: src/Admin/Pages/TestTab.php:946 msgid "You may have added a new API to a project" msgstr "" -#: src/Admin/Pages/TestTab.php:922 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:950 +#: src/Admin/Pages/TestTab.php:950 msgid "Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch." msgstr "" -#: src/Admin/Pages/TestTab.php:958 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:960 +#: src/Admin/Pages/TestTab.php:960 +msgid "SMTP.com API Error." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:961 +#: src/Admin/Pages/TestTab.php:961 +msgid "Your Sender Name option is incorrect." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:964 +#: src/Admin/Pages/TestTab.php:964 +msgid "Please make sure you entered an accurate Sender Name in WP Mail SMTP plugin settings." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:974 +#: src/Admin/Pages/TestTab.php:974 +msgid "GuzzleHttp requirements." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:975 +#: src/Admin/Pages/TestTab.php:975 +msgid "GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:978 +#: src/Admin/Pages/TestTab.php:978 +msgid "Edit your php.ini file on your hosting server." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:979 +#: src/Admin/Pages/TestTab.php:979 +msgid "(Recommended) Enable PHP extension: cURL, by adding \"extension=curl\" to the php.ini file (without the quotation marks) OR" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:980 +#: src/Admin/Pages/TestTab.php:980 +msgid "(If cURL can't be enabled on your hosting server) Enable PHP setting: allow_url_fopen, by adding \"allow_url_fopen = On\" to the php.ini file (without the quotation marks)" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:981 +#: src/Admin/Pages/TestTab.php:981 +msgid "If you don't know how to do the above we strongly suggest contacting your hosting support and provide them the \"full Error Log for debugging\" below and these steps. They should be able to fix this issue for you." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1003 +#: src/Admin/Pages/TestTab.php:1003 +msgid "PCRE library issue" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1004 +#: src/Admin/Pages/TestTab.php:1004 +msgid "It looks like your server is running PHP version 7.4.x with an outdated PCRE library (libpcre2) that has a known issue with email address validation." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1005 +#: src/Admin/Pages/TestTab.php:1005 +msgid "There is a known issue with PHP version 7.4.x, when using libpcre2 library version lower than 10.33." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1008 +#: src/Admin/Pages/TestTab.php:1008 +msgid "Contact your web hosting provider and inform them you are having issues with libpcre2 library on PHP 7.4." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1009 +#: src/Admin/Pages/TestTab.php:1009 +msgid "They should be able to resolve this issue for you." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1010 +#: src/Admin/Pages/TestTab.php:1010 +msgid "For a quick fix, until your web hosting resolves this, you can downgrade to PHP version 7.3 on your server." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1046 +#: src/Admin/Pages/TestTab.php:1046 msgid "An issue was detected." msgstr "" -#: src/Admin/Pages/TestTab.php:959 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1047 +#: src/Admin/Pages/TestTab.php:1047 msgid "This means your test email was unable to be sent." msgstr "" -#: src/Admin/Pages/TestTab.php:961 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1049 +#: src/Admin/Pages/TestTab.php:1049 msgid "Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc)." msgstr "" -#: src/Admin/Pages/TestTab.php:963 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1051 +#: src/Admin/Pages/TestTab.php:1051 msgid "Your host is rejecting the connection." msgstr "" -#: src/Admin/Pages/TestTab.php:966 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1054 +#: src/Admin/Pages/TestTab.php:1054 msgid "Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste)." msgstr "" -#: src/Admin/Pages/TestTab.php:968 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1056 +#: src/Admin/Pages/TestTab.php:1056 msgid "Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.
Note: this is the most common cause of this issue." msgstr "" -#: src/Admin/Pages/TestTab.php:974 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1062 +#: src/Admin/Pages/TestTab.php:1062 msgid "Try using a different mailer." msgstr "" -#: src/Admin/Pages/TestTab.php:993 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1081 +#: src/Admin/Pages/TestTab.php:1081 msgid "There was a problem while sending the test email." msgstr "" -#: src/Admin/Pages/TestTab.php:1003 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1091 +#: src/Admin/Pages/TestTab.php:1091 msgid "Recommended next steps:" msgstr "" -#: src/Admin/Pages/TestTab.php:1013 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1101 +#: src/Admin/Pages/TestTab.php:1101 msgid "Need support?" msgstr "" #. translators: %s - WPMailSMTP.com account area link. -#: src/Admin/Pages/TestTab.php:1021 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1109 +#: src/Admin/Pages/TestTab.php:1109 msgid "As a WP Mail SMTP Pro user you have access to WP Mail SMTP priority support. Please log in to your WPMailSMTP.com account and submit a support ticket." msgstr "" -#: src/Admin/Pages/TestTab.php:1038 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1126 +#: src/Admin/Pages/TestTab.php:1126 msgid "WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community." msgstr "" #. translators: %s - WPMailSMTP.com URL. -#: src/Admin/Pages/TestTab.php:1045 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1133 +#: src/Admin/Pages/TestTab.php:1133 msgid "To access our world class support, please upgrade to WP Mail SMTP Pro. Along with getting expert support, you will also get Notification controls, Email Logging, and integrations for Amazon SES, Office 365, and Outlook.com." msgstr "" -#: src/Admin/Pages/TestTab.php:1060 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1148 +#: src/Admin/Pages/TestTab.php:1148 msgid "Additionally, you can take advantage of our White Glove Setup. Sit back and relax while we handle everything for you! If you simply don't have time or maybe you feel a bit in over your head - we got you covered." msgstr "" -#: src/Admin/Pages/TestTab.php:1066 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1154 +#: src/Admin/Pages/TestTab.php:1154 msgid "As a valued WP Mail SMTP user, you will get $50 off regular pricing, automatically applied at checkout!" msgstr "" #. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPMailSMTP.com URL. -#: src/Admin/Pages/TestTab.php:1080 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1168 +#: src/Admin/Pages/TestTab.php:1168 msgid "Alternatively, we also offer limited support on the WordPress.org support forums. You can create a support thread there, but please understand that free support is not guaranteed and is limited to simple issues. If you have an urgent or complex issue, then please consider upgrading to WP Mail SMTP Pro to access our priority support ticket system." msgstr "" -#: src/Admin/Pages/TestTab.php:1101 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1189 +#: src/Admin/Pages/TestTab.php:1189 msgid "Click here to view the full Error Log for debugging" msgstr "" -#: src/Admin/Pages/TestTab.php:1110 +#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1198 +#: src/Admin/Pages/TestTab.php:1198 msgid "Please copy only the content of the error debug message above, identified with an orange left border, into the support forum topic if you experience any issues." msgstr "" +#: build/wp-mail-smtp-pro/src/Admin/Review.php:119 +#: src/Admin/Review.php:119 +msgid "Are you enjoying WP Mail SMTP?" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:121 +#: src/Admin/Review.php:121 +msgid "Yes" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:122 +#: src/Admin/Review.php:122 +msgid "Not Really" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:126 +#: src/Admin/Review.php:126 +msgid "We're sorry to hear you aren't enjoying WP Mail SMTP. We would love a chance to improve. Could you take a minute and let us know what we can do better?" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:129 +#: src/Admin/Review.php:129 +msgid "Give Feedback" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:132 +#: src/Admin/Review.php:132 +msgid "No thanks" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:137 +#: src/Admin/Review.php:137 +msgid "That’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:138 +#: src/Admin/Review.php:138 +msgid "~ Jared Atchison
Lead Developer, WP Mail SMTP" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:141 +#: src/Admin/Review.php:141 +msgid "Ok, you deserve it" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:143 +#: src/Admin/Review.php:143 +msgid "Nope, maybe later" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Admin/Review.php:144 +#: src/Admin/Review.php:144 +msgid "I already did" +msgstr "" + #. translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict. +#: build/wp-mail-smtp-pro/src/Conflicts.php:159 #: src/Conflicts.php:159 msgid "Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts." msgstr "" #. translators: %1$s - WP Mail SMTP plugin name; %2$s - WPMailSMTP.com URL to a related doc. -#: src/Core.php:342 +#: build/wp-mail-smtp-pro/src/Core.php:367 +#: src/Core.php:367 msgid "Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. Read more for additional information." msgstr "" -#: src/Core.php:356 +#: build/wp-mail-smtp-pro/src/Core.php:381 +#: src/Core.php:381 msgid "Please Note: Support for PHP 5.5 will be discontinued in 2020. After this, if no further action is taken, WP Mail SMTP functionality will be disabled." msgstr "" #. translators: %s - plugin name and its version. -#: src/Core.php:390 +#: build/wp-mail-smtp-pro/src/Core.php:415 +#: src/Core.php:415 msgid "EMAILING DISABLED: The %s is currently blocking all emails from being sent." msgstr "" #. translators: %1$s - constant name; %2$s - constant value. -#: src/Core.php:401 +#: build/wp-mail-smtp-pro/src/Core.php:426 +#: src/Core.php:426 msgid "To send emails, change the value of the %1$s constant to %2$s." msgstr "" #. translators: %s - plugin Misc settings page URL. -#: src/Core.php:412 +#: build/wp-mail-smtp-pro/src/Core.php:437 +#: src/Core.php:437 msgid "To send emails, go to plugin Misc settings and disable the \"Do Not Send\" option." msgstr "" #. translators: %s - plugin name and its version. -#: src/Core.php:444 +#: build/wp-mail-smtp-pro/src/Core.php:469 +#: src/Core.php:469 msgid "EMAIL DELIVERY ERROR: the plugin %s logged this error during the last time it tried to send an email:" msgstr "" -#: src/Core.php:474 +#: build/wp-mail-smtp-pro/src/Core.php:499 +#: src/Core.php:499 msgid "Consider running an email test after fixing it." msgstr "" +#. translators: %1$s - WP Mail SMTP, %2$s - error message. +#: build/wp-mail-smtp-pro/src/Migration.php:137 +#: src/Migration.php:137 +msgid "There was an error while upgrading the database. Please contact %1$s support with this information: %2$s." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Pro/Providers/Providers.php:158 +#: src/Pro/Providers/Providers.php:158 +msgid "OK" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Pro/SiteHealth.php:58 #: src/Pro/SiteHealth.php:58 msgid "Is wpmailsmtp.com reachable?" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/AmazonSES/Options.php:25 #: src/Providers/AmazonSES/Options.php:25 msgid "Amazon SES" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/AmazonSES/Options.php:39 #: src/Providers/AmazonSES/Options.php:39 msgid "We're sorry, the Amazon SES mailer is not available on your plan. Please upgrade to the PRO plan to unlock all these awesome features." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Auth.php:170 #: src/Providers/Gmail/Auth.php:170 msgid "There was an error while processing the Google authentication request. Please make sure that you have Client ID and Client Secret both valid and saved." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Mailer.php:258 +#: src/Providers/Gmail/Mailer.php:258 +msgid "Please re-grant Google app permissions!" +msgstr "" + +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Mailer.php:259 +#: src/Providers/Gmail/Mailer.php:259 +msgid "Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Mailer.php:260 +#: src/Providers/Gmail/Mailer.php:260 +msgid "Then click the “Allow plugin to send emails using your Google account” button and re-enable access." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:32 #: src/Providers/Gmail/Options.php:32 msgid "Gmail" msgstr "" #. translators: %s - URL to our Gmail doc. +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:35 #: src/Providers/Gmail/Options.php:35 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.

Read our Gmail documentation to learn how to configure Gmail or G Suite." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:48 #: src/Providers/Gmail/Options.php:48 msgid "The Gmail mailer works well for sites that send low numbers of emails. However, Gmail's API has rate limitations and a number of additional restrictions that can lead to challenges during setup. If you expect to send a high volume of emails, or if you find that your web host is not compatible with the Gmail API restrictions, then we recommend considering a different mailer option." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:72 #: src/Providers/Gmail/Options.php:72 msgid "Client ID" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:87 #: src/Providers/Gmail/Options.php:87 msgid "Client Secret" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:109 #: src/Providers/Gmail/Options.php:109 msgid "Authorized redirect URI" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:117 #: src/Providers/Gmail/Options.php:117 msgid "Copy URL to clipboard" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:122 #: src/Providers/Gmail/Options.php:122 msgid "Please copy this URL into the \"Authorized redirect URIs\" field of your Google web application." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:131 #: src/Providers/Gmail/Options.php:131 msgid "Authorization" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:159 #: src/Providers/Gmail/Options.php:159 msgid "Allow plugin to send emails using your Google account" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:162 #: src/Providers/Gmail/Options.php:162 msgid "Click the button above to confirm authorization." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:168 #: src/Providers/Gmail/Options.php:168 msgid "Remove Connection" msgstr "" #. translators: %s - email address, as received from Google API. +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:177 #: src/Providers/Gmail/Options.php:177 msgid "Connected as %s" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:184 #: src/Providers/Gmail/Options.php:184 msgid "Removing the connection will give you an ability to redo the connection or link to another Google account." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:192 #: src/Providers/Gmail/Options.php:192 msgid "You need to save settings with Client ID and Client Secret before you can proceed." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mail/Options.php:25 #: src/Providers/Mail/Options.php:25 msgid "Default (none)" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mail/Options.php:37 #: src/Providers/Mail/Options.php:37 msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:25 #: src/Providers/Mailgun/Options.php:25 msgid "Mailgun" msgstr "" #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag. +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:29 #: src/Providers/Mailgun/Options.php:29 msgid "%1$sMailgun%2$s is one of the leading transactional email services trusted by over 150,000+ businesses. They provide 5,000 free emails per month for 3 months.

Read our %3$sMailgun documentation%4$s to learn how to configure Mailgun and improve your email deliverability." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:57 #: src/Providers/Mailgun/Options.php:57 msgid "Private API Key" msgstr "" #. translators: %s - API key link. +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:76 #: src/Providers/Mailgun/Options.php:76 msgid "Follow this link to get an API Key from Mailgun: %s." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:78 #: src/Providers/Mailgun/Options.php:78 msgid "Get a Private API Key" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:89 #: src/Providers/Mailgun/Options.php:89 msgid "Domain Name" msgstr "" #. translators: %s - Domain Name link. +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:101 #: src/Providers/Mailgun/Options.php:101 msgid "Follow this link to get a Domain Name from Mailgun: %s." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:103 #: src/Providers/Mailgun/Options.php:103 msgid "Get a Domain Name" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:114 #: src/Providers/Mailgun/Options.php:114 msgid "Region" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:124 #: src/Providers/Mailgun/Options.php:124 msgid "US" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:133 #: src/Providers/Mailgun/Options.php:133 msgid "EU" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:137 #: src/Providers/Mailgun/Options.php:137 msgid "Define which endpoint you want to use for sending messages." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:138 #: src/Providers/Mailgun/Options.php:138 msgid "If you are operating under EU laws, you may be required to use EU region." msgstr "" #. translators: %s - URL to Mailgun.com page. +#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:143 #: src/Providers/Mailgun/Options.php:143 msgid "More information on Mailgun.com." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:186 #: src/Providers/OptionsAbstract.php:186 msgid "SMTP Host" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:200 #: src/Providers/OptionsAbstract.php:200 msgid "Encryption" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:210 #: src/Providers/OptionsAbstract.php:210 msgid "None" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:219 #: src/Providers/OptionsAbstract.php:219 msgid "SSL" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:228 #: src/Providers/OptionsAbstract.php:228 msgid "TLS" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:232 #: src/Providers/OptionsAbstract.php:232 msgid "For most servers TLS is the recommended option. If your SMTP provider offers both SSL and TLS options, we recommend using TLS." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:240 #: src/Providers/OptionsAbstract.php:240 msgid "SMTP Port" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:254 #: src/Providers/OptionsAbstract.php:254 msgid "Auto TLS" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:268 #: src/Providers/OptionsAbstract.php:268 msgid "By default TLS encryption is automatically used if the server supports it, which is recommended. In some cases, due to server misconfigurations, this can cause issues and may need to be disabled." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:276 #: src/Providers/OptionsAbstract.php:276 msgid "Authentication" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:295 #: src/Providers/OptionsAbstract.php:295 msgid "SMTP Username" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:309 #: src/Providers/OptionsAbstract.php:309 msgid "SMTP Password" msgstr "" #. translators: %s - constant name: WPMS_SMTP_PASS. +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:321 #: src/Providers/OptionsAbstract.php:321 msgid "To change the password you need to change the value of the constant there: %s" msgstr "" #. translators: %1$s - wp-config.php file, %2$s - WPMS_ON constant name. +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:329 #: src/Providers/OptionsAbstract.php:329 msgid "If you want to disable the use of constants, find in %1$s file the constant %2$s and turn if off:" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:339 #: src/Providers/OptionsAbstract.php:339 msgid "All the defined constants will stop working and you will be able to change all the values on this page." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:347 #: src/Providers/OptionsAbstract.php:347 -msgid "The password is stored in plain text. We highly recommend you set up your password in your WordPress configuration file for improved security." +msgid "The password will be stored in plain text. For improved security, we highly recommend using your site's WordPress configuration file to set your password." msgstr "" -#. translators: %s - wp-config.php. -#: src/Providers/OptionsAbstract.php:352 -msgid "To do this add the lines below to your %s file:" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:350 +#: src/Providers/OptionsAbstract.php:350 +msgid "Learn More" msgstr "" #. translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version. -#: src/Providers/OptionsAbstract.php:418 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:410 +#: src/Providers/OptionsAbstract.php:410 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." msgstr "" -#: src/Providers/OptionsAbstract.php:425 -#: src/Providers/OptionsAbstract.php:449 +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:417 +#: src/Providers/OptionsAbstract.php:417 msgid "Meanwhile you can switch to some other mailers." msgstr "" -#. translators: %s - Provider name. -#: src/Providers/OptionsAbstract.php:444 -msgid "%s requires a SSL certificate on a site to work and does not support your current installation. Please contact your host and request a SSL certificate or install a free one, like Let's Encrypt." +#. translators: %s - Provider name +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:436 +#: src/Providers/OptionsAbstract.php:436 +msgid "%s requires an SSL certificate, and so is not currently compatible with your site. Please contact your host to request a SSL certificate, or check out WPBeginner's tutorial on how to set up SSL." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:449 +#: src/Providers/OptionsAbstract.php:449 +msgid "If you'd prefer not to set up SSL, or need an SMTP solution in the meantime, please select a different mailer option." +msgstr "" + +#: build/wp-mail-smtp-pro/src/Providers/Outlook/Options.php:25 #: src/Providers/Outlook/Options.php:25 msgid "Outlook" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Outlook/Options.php:39 #: src/Providers/Outlook/Options.php:39 msgid "We're sorry, the Microsoft Outlook mailer is not available on your plan. Please upgrade to the PRO plan to unlock all these awesome features." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Pepipost/Options.php:25 #: src/Providers/Pepipost/Options.php:25 msgid "Pepipost SMTP" msgstr "" #. translators: %1$s - URL to pepipost.com site. +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:31 #: src/Providers/PepipostAPI/Options.php:31 msgid "Pepipost is a recommended transactional email service. Every month Pepipost delivers over 8 billion emails from 20,000+ customers. Their mission is to reliably send emails in the most efficient way and at the most disruptive pricing ever. Pepipost provides users 30,000 free emails the first 30 days." msgstr "" #. translators: %1$s - URL to wpmailsmtp.com doc. +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:34 #: src/Providers/PepipostAPI/Options.php:34 msgid "Read our Pepipost documentation to learn how to configure Pepipost and improve your email deliverability." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:53 #: src/Providers/PepipostAPI/Options.php:53 msgid "Get Started with Pepipost" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:61 #: src/Providers/PepipostAPI/Options.php:61 msgid "Pepipost" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:88 +#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:57 +#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:76 +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:83 #: src/Providers/PepipostAPI/Options.php:88 #: src/Providers/Sendgrid/Options.php:57 #: src/Providers/Sendinblue/Options.php:76 @@ -1484,180 +2080,222 @@ msgid "API Key" msgstr "" #. translators: %s - link to get an API Key. +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:107 +#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:95 #: src/Providers/PepipostAPI/Options.php:107 #: src/Providers/Sendinblue/Options.php:95 msgid "Follow this link to get an API Key: %s." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:109 #: src/Providers/PepipostAPI/Options.php:109 msgid "Get the API Key" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:25 #: src/Providers/Sendgrid/Options.php:25 msgid "SendGrid" msgstr "" #. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag. +#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:29 #: src/Providers/Sendgrid/Options.php:29 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 day.

Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability." msgstr "" #. translators: %s - API key link. +#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:76 #: src/Providers/Sendgrid/Options.php:76 msgid "Follow this link to get an API Key from SendGrid: %s." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:78 #: src/Providers/Sendgrid/Options.php:78 msgid "Create API Key" msgstr "" #. translators: %s - SendGrid access level. +#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:86 #: src/Providers/Sendgrid/Options.php:86 msgid "To send emails you will need only a %s access level for this API key." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:33 #: src/Providers/Sendinblue/Options.php:33 msgid "Sendinblue" msgstr "" #. translators: %1$s - URL to sendinblue.com site. +#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:37 #: src/Providers/Sendinblue/Options.php:37 msgid "Sendinblue serves 80,000+ growing companies around the world and sends over 30 million emails each day. They provide users 300 free emails per day." msgstr "" #. translators: %2$s - URL to wpmailsmtp.com doc. +#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:40 #: src/Providers/Sendinblue/Options.php:40 msgid "Read our Sendinblue documentation to learn how to configure Sendinblue and improve your email deliverability." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:97 #: src/Providers/Sendinblue/Options.php:97 msgid "Get v3 API Key" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTP/Options.php:25 #: src/Providers/SMTP/Options.php:25 msgid "Other SMTP" msgstr "" #. translators: %s - URL to SMTP documentation. +#: build/wp-mail-smtp-pro/src/Providers/SMTP/Options.php:29 #: src/Providers/SMTP/Options.php:29 msgid "Use the SMTP details provided by your hosting provider or email service.

To see recommended settings for the popular services as well as troubleshooting tips, check out our SMTP documentation." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Mailer.php:433 #: src/Providers/SMTPcom/Mailer.php:433 msgid "Api Key:" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Mailer.php:435 #: src/Providers/SMTPcom/Mailer.php:435 msgid "Channel:" msgstr "" #. translators: %s - URL to smtp.com site. +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:41 #: src/Providers/SMTPcom/Options.php:41 -msgid "SMTP.com is a recommended transactional email service. With over 22 years of email delivery expertise, SMTP.com has been around for almost as long as email itself. They are known among internet providers as one of the most reliable senders on the internet. Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 10,000 free emails the first 30 days." +msgid "SMTP.com is a recommended transactional email service. With a 22 years of track record of reliable email delivery, SMTP.com is a premiere solution for WordPress developers and website owners. SMTP.com has been around for almost as long as email itself. Their super simple integration interface makes it easy to get started while a powerful API and robust documentation make it a preferred choice among developers. Start a 30-day free trial with 50,000 emails." msgstr "" #. translators: %s - URL to wpmailsmtp.com doc page for stmp.com. +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:49 #: src/Providers/SMTPcom/Options.php:49 msgid "Read our SMTP.com documentation to learn how to configure SMTP.com and improve your email deliverability." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:59 #: src/Providers/SMTPcom/Options.php:59 msgid "Get Started with SMTP.com" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:67 #: src/Providers/SMTPcom/Options.php:67 msgid "SMTP.com" msgstr "" #. translators: %s - API key link. +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:101 #: src/Providers/SMTPcom/Options.php:101 msgid "Follow this link to get an API Key from SMTP.com: %s." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:103 #: src/Providers/SMTPcom/Options.php:103 msgid "Get API Key" msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:114 #: src/Providers/SMTPcom/Options.php:114 msgid "Sender Name" msgstr "" #. translators: %s - Channel/Sender Name link for smtp.com documentation. +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:130 #: src/Providers/SMTPcom/Options.php:130 msgid "Follow this link to get a Sender Name from SMTP.com: %s." msgstr "" +#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:132 #: src/Providers/SMTPcom/Options.php:132 msgid "Get Sender Name" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:67 #: src/SiteHealth.php:67 msgid "Is WP Mail SMTP mailer setup complete?" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:92 #: src/SiteHealth.php:92 msgid "Version" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:96 #: src/SiteHealth.php:96 msgid "License key type" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:100 #: src/SiteHealth.php:100 msgid "Debug" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:101 #: src/SiteHealth.php:101 msgid "No debug notices found." msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:131 #: src/SiteHealth.php:131 msgid "Current mailer" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:136 #: src/SiteHealth.php:136 msgid "WP Mail SMTP mailer setup is complete" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:145 #: src/SiteHealth.php:145 msgid "The WP Mail SMTP plugin mailer setup is complete. You can send a test email, to make sure it's working properly." msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:150 #: src/SiteHealth.php:150 msgid "Test email sending" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:158 #: src/SiteHealth.php:158 msgid "You currently have the default mailer selected, which means that you haven’t set up SMTP yet." msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:163 #: src/SiteHealth.php:163 msgid "WP Mail SMTP mailer setup is incomplete" msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:169 #: src/SiteHealth.php:169 msgid "The WP Mail SMTP plugin mailer setup is incomplete. Please click on the link below to access plugin settings and configure the mailer." msgstr "" +#: build/wp-mail-smtp-pro/src/SiteHealth.php:174 #: src/SiteHealth.php:174 msgid "Configure mailer" msgstr "" #. translators: %1$s - date, \a\t - specially escaped "at", %2$s - time. -#: src/WP.php:183 +#: build/wp-mail-smtp-pro/src/WP.php:190 +#: src/WP.php:190 msgid "%1$s \\a\\t %2$s" msgstr "" +#: build/wp-mail-smtp-pro/wp_mail_smtp.php:135 #: wp_mail_smtp.php:135 msgid "Please deactivate the free version of the WP Mail SMTP plugin before activating WP Mail SMTP Pro." msgstr "" #. translators: %1$s - WPBeginner URL for recommended WordPress hosting. +#: build/wp-mail-smtp-pro/wp_mail_smtp.php:163 #: wp_mail_smtp.php:163 msgid "Your site is running an insecure version of PHP that is no longer supported. Please contact your web hosting provider to update your PHP version or switch to a recommended WordPress hosting company." msgstr "" #. translators: %s - WPMailSMTP.com docs URL with more details. +#: build/wp-mail-smtp-pro/wp_mail_smtp.php:180 #: wp_mail_smtp.php:180 msgid "WP Mail SMTP plugin is disabled on your site until you fix the issue. Read more for additional information." msgstr "" diff --git a/wp-content/plugins/wp-mail-smtp/readme.txt b/wp-content/plugins/wp-mail-smtp/readme.txt index 8d2618d..af20fb5 100644 --- a/wp-content/plugins/wp-mail-smtp/readme.txt +++ b/wp-content/plugins/wp-mail-smtp/readme.txt @@ -3,7 +3,7 @@ Contributors: wpforms, jaredatch, smub, slaFFik Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, pepipost, sendinblue, wp smtp Requires at least: 4.9 Tested up to: 5.4 -Stable tag: 2.0.1 +Stable tag: 2.1.1 Requires PHP: 5.5.0 The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 1 million sites. @@ -62,7 +62,7 @@ SMTP.com is a recommended transactional email service. With over 22 years of email delivery expertise, SMTP.com has been around for almost as long as email itself. They are known among internet providers as one of the most reliable senders on the internet. -Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 10,000 free emails the first 30 days. +Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 50,000 free emails the first 30 days. Read our SMTP.com documentation for more details. @@ -229,6 +229,24 @@ By all means please contact us to discuss features or options you'd like to see == Changelog == += 2.1.1 - 2020-06-08 = +* Changed: Remove current automatic default reply-to address and add WP filter `wp_mail_smtp_processor_set_default_reply_to` for setting default reply-to addresses. +* Changed: Improve description for several options with links to an article about how to properly use constants. +* Fixed: PHP parse error connected to Monolog library on PHP versions < 7.x. + += 2.1.0 - 2020-06-04 = +* Added: Async/scheduled tasks management support. +* Added: New warning notification for selecting the "Default (none)" mailer and saving the plugin settings. +* Changed: Set the original From Email as Reply-To address if it was overwritten by the Force From Email option. +* Changed: The Force From Email option is now enabled by default, for new plugin installs. +* Changed: Reply-To header is now set when not provided, equals to From Name/Email. +* Fixed: Display a non-empty PHPMailer error when some non-SMTP mailers generate errors. +* Fixed: Display a more accurate message, when the "channel - not found" error is triggered by SMTP.com API. +* Fixed: Save and display debug errors for the "Other SMTP" mailer. +* Fixed: Improve the debug details for the "Invalid address (setFrom)" error in the Email Test tab. +* Fixed: Improve the debug details for SMTP CA verification fail, Gmail Guzzle requirements, and Gmail invalid grant errors. +* Fixed: Improve the uninstall cleanup procedure. + = 2.0.1 - 2020-05-07 = * Changed: Improved description of the "Do Not Send" plugin option. * Fixed: Due to Pepipost API changes we now convert new lines so they are preserved in plain text emails. diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php index d863acd..7c6f731 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php +++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php @@ -13,20 +13,26 @@ use WPMailSMTP\Options; class Area { /** + * Slug of the admin area page. + * * @since 1.0.0 * - * @var string Slug of the admin area page. + * @var string */ const SLUG = 'wp-mail-smtp'; /** + * Admin page unique hook. + * * @since 1.0.0 * - * @var string Admin page unique hook. + * @var string */ public $hook; /** + * List of admin area pages. + * * @since 1.0.0 * * @var PageAbstract[] @@ -34,11 +40,13 @@ class Area { private $pages; /** + * List of official registered pages. + * * @since 1.5.0 * - * @var array List of official registered pages. + * @var array */ - public static $pages_registered = array( 'general', 'logs', 'about' ); + public static $pages_registered = [ 'general', 'logs', 'about' ]; /** * Area constructor. @@ -46,6 +54,7 @@ class Area { * @since 1.0.0 */ public function __construct() { + $this->hooks(); } @@ -57,34 +66,39 @@ class Area { protected function hooks() { // Add the Settings link to a plugin on Plugins page. - add_filter( 'plugin_action_links_' . plugin_basename( WPMS_PLUGIN_FILE ), array( $this, 'add_plugin_action_link' ), 10, 1 ); + add_filter( 'plugin_action_links_' . plugin_basename( WPMS_PLUGIN_FILE ), [ $this, 'add_plugin_action_link' ], 10, 1 ); // Add the options page. - add_action( 'admin_menu', array( $this, 'add_admin_options_page' ) ); + add_action( 'admin_menu', [ $this, 'add_admin_options_page' ] ); + + // Register on load Email Log admin menu hook. + add_action( 'load-wp-mail-smtp_page_wp-mail-smtp-logs', [ $this, 'maybe_redirect_email_log_menu_to_email_log_settings_tab' ] ); // Admin footer text. - add_filter( 'admin_footer_text', array( $this, 'get_admin_footer' ), 1, 2 ); + add_filter( 'admin_footer_text', [ $this, 'get_admin_footer' ], 1, 2 ); // Enqueue admin area scripts and styles. - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); + add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] ); // Process the admin page forms actions. - add_action( 'admin_init', array( $this, 'process_actions' ) ); + add_action( 'admin_init', [ $this, 'process_actions' ] ); // Display custom notices based on the error/success codes. - add_action( 'admin_init', array( $this, 'display_custom_auth_notices' ) ); + add_action( 'admin_init', [ $this, 'display_custom_auth_notices' ] ); // Display notice instructing the user to complete plugin setup. - add_action( 'admin_init', array( $this, 'display_setup_notice' ) ); + add_action( 'admin_init', [ $this, 'display_setup_notice' ] ); // Outputs the plugin admin header. - add_action( 'in_admin_header', array( $this, 'display_admin_header' ), 100 ); + add_action( 'in_admin_header', [ $this, 'display_admin_header' ], 100 ); // Hide all unrelated to the plugin notices on the plugin admin pages. - add_action( 'admin_print_scripts', array( $this, 'hide_unrelated_notices' ) ); + add_action( 'admin_print_scripts', [ $this, 'hide_unrelated_notices' ] ); // Process all AJAX requests. - add_action( 'wp_ajax_wp_mail_smtp_ajax', array( $this, 'process_ajax' ) ); + add_action( 'wp_ajax_wp_mail_smtp_ajax', [ $this, 'process_ajax' ] ); + + ( new Review() )->hooks(); } /** @@ -107,8 +121,7 @@ class Area { switch ( $error ) { case 'google_access_denied': - WP::add_admin_notice( - /* translators: %s - error code, returned by Google API. */ + WP::add_admin_notice( /* translators: %s - error code, returned by Google API. */ sprintf( esc_html__( 'There was an error while processing the authentication request: %s. Please try again.', 'wp-mail-smtp' ), '' . $error . '' ), WP::ADMIN_NOTICE_ERROR ); @@ -169,15 +182,14 @@ class Area { // Display notice informing user further action is needed. WP::add_admin_notice( sprintf( - wp_kses( - /* translators: %s - Mailer anchor link. */ + wp_kses( /* translators: %s - Mailer anchor link. */ __( 'Thanks for using WP Mail SMTP! To complete the plugin setup and start sending emails, please select and configure your Mailer.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - ), - 'strong' => array(), - ) + [ + 'a' => [ + 'href' => [], + ], + 'strong' => [], + ] ), wp_mail_smtp()->get_admin()->get_admin_page_url( self::SLUG . '#wp-mail-smtp-setting-row-mailer' ) ), @@ -232,6 +244,26 @@ class Area { } } + /** + * Redirect the "Email Log" WP menu link to the "Email Log" setting tab for lite version of the plugin. + * + * @since 2.1.0 + */ + public function maybe_redirect_email_log_menu_to_email_log_settings_tab() { + + /** + * The Email Logs object to be used for loading the Email Log page. + * + * @var \WPMailSMTP\Admin\PageAbstract $logs + */ + $logs = $this->generate_display_logs_object(); + + if ( $logs instanceof \WPMailSMTP\Admin\Pages\Logs ) { + wp_safe_redirect( $logs->get_link() ); + exit; + } + } + /** * Enqueue admin area scripts and styles. * @@ -269,6 +301,19 @@ class Area { array( 'text_provider_remove' => esc_html__( 'Are you sure you want to reset the current provider connection? You will need to immediately create a new one to be able to send emails.', 'wp-mail-smtp' ), 'text_settings_not_saved' => esc_html__( 'Changes that you made to the settings are not saved!', 'wp-mail-smtp' ), + 'default_mailer_notice' => array( + 'title' => esc_html__( 'Heads up!', 'wp-mail-smtp' ), + 'content' => wp_kses( + __( '

The Default (PHP) mailer is currently selected, but is not recommended because in most cases it does not resolve email delivery issues.

Please consider selecting and configuring one of the other mailers.

', 'wp-mail-smtp' ), + array( + 'p' => true, + ) + ), + 'save_button' => esc_html__( 'Save Settings', 'wp-mail-smtp' ), + 'cancel_button' => esc_html__( 'Cancel', 'wp-mail-smtp' ), + 'icon_alt' => esc_html__( 'Warning icon', 'wp-mail-smtp' ), + ), + 'plugin_url' => wp_mail_smtp()->plugin_url, 'education' => array( 'upgrade_icon_lock' => '', 'upgrade_title' => esc_html__( '%name% is a PRO Feature', 'wp-mail-smtp' ), @@ -469,9 +514,12 @@ class Area { break; case self::SLUG . '-logs': - $logs_class = apply_filters( 'wp_mail_smtp_admin_display_get_logs_fqcn', '\WPMailSMTP\Admin\Pages\Logs' ); - /** @var \WPMailSMTP\Admin\PageAbstract $logs */ - $logs = new $logs_class(); + /** + * The Email Logs object to be used for loading the Email Log page. + * + * @var \WPMailSMTP\Admin\PageAbstract $logs + */ + $logs = $this->generate_display_logs_object(); $is_archive = wp_mail_smtp()->is_pro() && wp_mail_smtp()->pro->get_logs()->is_archive(); ?> @@ -500,6 +548,20 @@ class Area { get_label(); - } - - /** - * @inheritdoc - */ - public function display() { - - $features = array( - array( - 'image' => 'comments.png', - 'title' => esc_html__( 'Comment Notifications', 'wp-mail-smtp' ), - 'desc' => esc_html__( 'Manage emails sent when comments are published or awaiting moderation.', 'wp-mail-smtp' ), - ), - array( - 'image' => 'admin.png', - 'title' => esc_html__( 'Site Admin Email Change Notifications', 'wp-mail-smtp' ), - 'desc' => esc_html__( 'Manage emails sent when site admin\'s account has been changed.', 'wp-mail-smtp' ), - ), - array( - 'image' => 'users.png', - 'title' => esc_html__( 'User Change Notifications', 'wp-mail-smtp' ), - 'desc' => esc_html__( 'Limit emails triggered by password changed/reset, email changed, and more.', 'wp-mail-smtp' ), - ), - array( - 'image' => 'personal.png', - 'title' => esc_html__( 'Personal Data Requests Notifications', 'wp-mail-smtp' ), - 'desc' => esc_html__( 'Control emails for data requests and data removal actions.', 'wp-mail-smtp' ), - ), - array( - 'image' => 'update.png', - 'title' => esc_html__( 'Automatic Update Notifications', 'wp-mail-smtp' ), - 'desc' => esc_html__( 'Manage emails sent by the core automatic update process.', 'wp-mail-smtp' ), - ), - array( - 'image' => 'user_new.png', - 'title' => esc_html__( 'New User Notifications', 'wp-mail-smtp' ), - 'desc' => esc_html__( 'Toggle emails sent to both user and site administrator about new user accounts.', 'wp-mail-smtp' ), - ), - - ) - ?> - -
-

- -

- -

- -
- -
- -
-
- -
-
-

-

-
-
- -
- -
- -
- - - -
- -
- - get_label(); + } + + /** + * {@inheritdoc} + * + * @since 2.1.0 Replaced images with SVGs. + */ + public function display() { + + $features = [ + [ + 'svg' => '', + 'title' => esc_html__( 'Comment Notifications', 'wp-mail-smtp' ), + 'desc' => esc_html__( 'Manage emails sent when comments are published or awaiting moderation.', 'wp-mail-smtp' ), + ], + [ + 'svg' => '', + 'title' => esc_html__( 'Site Admin Email Change Notifications', 'wp-mail-smtp' ), + 'desc' => esc_html__( 'Manage emails sent when site admin\'s account has been changed.', 'wp-mail-smtp' ), + ], + [ + 'svg' => '', + 'title' => esc_html__( 'User Change Notifications', 'wp-mail-smtp' ), + 'desc' => esc_html__( 'Limit emails triggered by password changed/reset, email changed, and more.', 'wp-mail-smtp' ), + ], + [ + 'svg' => '', + 'title' => esc_html__( 'Personal Data Requests Notifications', 'wp-mail-smtp' ), + 'desc' => esc_html__( 'Control emails for data requests and data removal actions.', 'wp-mail-smtp' ), + ], + [ + 'svg' => '', + 'title' => esc_html__( 'Automatic Update Notifications', 'wp-mail-smtp' ), + 'desc' => esc_html__( 'Manage emails sent by the core automatic update process.', 'wp-mail-smtp' ), + ], + [ + 'svg' => '', + 'title' => esc_html__( 'New User Notifications', 'wp-mail-smtp' ), + 'desc' => esc_html__( 'Toggle emails sent to both user and site administrator about new user accounts.', 'wp-mail-smtp' ), + ], + ]; + + $allowed_svg_html = [ + 'svg' => [ + 'xmlns' => [], + 'focusable' => [], + 'viewbox' => [], + ], + 'path' => [ + 'class' => [], + 'd' => [], + ], + ]; + ?> + +
+

+ +

+ +

+ +
+ +
+ +
+
+ +
+
+

+

+
+
+ +
+ +
+ +
+ + + +
+ +
+ + slug, - admin_url( 'admin.php' ) - ); - } - - /** - * @inheritdoc - */ - public function get_label() { - return esc_html__( 'Email Log', 'wp-mail-smtp' ); - } - - /** - * @inheritdoc - */ - public function get_title() { - return $this->get_label(); - } - - /** - * @inheritdoc - */ - public function display() { - ?> - -
-

- get_label() ); ?> -

-
- -
-

- -

-
- -

- -
- <?php esc_attr_e( 'Logs Archive Page Screenshot', 'wp-mail-smtp' ); ?> - <?php esc_attr_e( 'Logs Single Page Screenshot', 'wp-mail-smtp' ); ?> -
- -
- - - -
- -
- - slug, + admin_url( 'admin.php?page=' . Area::SLUG ) + ); + } + + /** + * Link label of a tab. + * + * @since 1.5.0 + * + * @return string + */ + public function get_label() { + return esc_html__( 'Email Log', 'wp-mail-smtp' ); + } + + /** + * Title of a tab. + * + * @since 1.5.0 + * + * @return string + */ + public function get_title() { + return $this->get_label(); + } + + /** + * Tab content. + * + * @since 2.1.0 Moved the display content to the email log settings tab. + */ + public function display() {} +} diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/LogsTab.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/LogsTab.php index 729717f..2b71455 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/LogsTab.php +++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/LogsTab.php @@ -1,73 +1,85 @@ -get_label(); - } - - /** - * Custom URL for this tab, redirects to Email Log page. - * - * @since 1.6.0 - * - * @return string - */ - public function get_link() { - - return wp_mail_smtp()->get_admin()->get_admin_page_url( Area::SLUG . '-' . $this->slug ); - } - - /** - * Not used as we are simply redirecting users. - * - * @since 1.6.0 - */ - public function display() { - } - - /** - * Not used as we are simply redirecting users. - * - * @since 1.6.0 - * - * @param array $data - */ - public function process_post( $data ) { - } -} +get_label(); + } + + /** + * Display the upsell content for the Email Log feature. + * + * @since 1.6.0 + * @since 2.1.0 Moved the display content from the email log page (WP admin menu "Email Log" page). + */ + public function display() { + ?> + +
+

+ +

+
+ +

+ +
+ <?php esc_attr_e( 'Logs Archive Page Screenshot', 'wp-mail-smtp' ); ?> + <?php esc_attr_e( 'Logs Single Page Screenshot', 'wp-mail-smtp' ); ?> +
+ +
+ + + +
+ +
+ + wp-config.php' ); } else { - printf( /* translators: %s - file to put that constant in. */ - esc_html__( 'If you want to enable this option using constants, put the lines below to your %s file:', 'wp-mail-smtp' ), - 'wp-config.php' + printf( + wp_kses( /* translators: %s - The URL to the constants support article. */ + __( 'Please read this support article if you want to enable this option using constants.', 'wp-mail-smtp' ), + [ + 'a' => [ + 'href' => [], + 'target' => [], + 'rel' => [], + ], + ] + ), + 'https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/' ); } ?>

- is_const_defined( 'general', 'do_not_send' ) ) : ?> -
-							define( 'WPMS_ON', true );
-							define( 'WPMS_DO_NOT_SEND', true );
-						
- diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php index 1d3b177..b5faa67 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php +++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php @@ -98,12 +98,12 @@ class TestTab extends PageAbstract { $disabled = ''; $help_text = ''; - if ( - ! wp_mail_smtp()->get_providers()->get_mailer( - Options::init()->get( 'mail', 'mailer' ), - wp_mail_smtp()->get_processor()->get_phpmailer() - )->is_mailer_complete() - ) { + $mailer = wp_mail_smtp()->get_providers()->get_mailer( + Options::init()->get( 'mail', 'mailer' ), + wp_mail_smtp()->get_processor()->get_phpmailer() + ); + + if ( ! $mailer || ! $mailer->is_mailer_complete() ) { $btn = 'wp-mail-smtp-btn-red'; $disabled = 'disabled'; @@ -435,6 +435,18 @@ Lead Developer, WP Mail SMTP'; $mailer_text .= $mailer->get_debug_info(); } + $phpmailer_error = $phpmailer->ErrorInfo; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + + // Append any PHPMailer errors to the mailer debug (except SMTP mailer, which has the full error output below). + if ( + ! empty( $phpmailer_error ) && + ! $options->is_mailer_smtp() + ) { + $mailer_text .= '

PHPMailer Debug:
' . + wp_strip_all_tags( $phpmailer_error ) . + '
'; + } + /* * General Debug. */ @@ -486,137 +498,163 @@ Lead Developer, WP Mail SMTP'; $smtp_port = $options->get( 'smtp', 'port' ); $smtp_encryption = $options->get( 'smtp', 'encryption' ); - $details = array( + $details = [ // [any] - cURL error 60/77. - array( + [ 'mailer' => 'any', - 'errors' => array( - array( 'cURL error 60' ), - array( 'cURL error 77' ), - ), - 'description' => array( + 'errors' => [ + [ 'cURL error 60' ], + [ 'cURL error 77' ], + ], + 'description' => [ '' . esc_html__( 'SSL certificate issue.', 'wp-mail-smtp' ) . '', esc_html__( 'This means your web server cannot reliably make secure connections (make requests to HTTPS sites).', 'wp-mail-smtp' ), esc_html__( 'Typically this error is returned when web server is not configured properly.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Contact your web hosting provider and inform them your site has an issue with SSL certificates.', 'wp-mail-smtp' ), esc_html__( 'The exact error you can provide them is in the Error log, available at the bottom of this page.', 'wp-mail-smtp' ), esc_html__( 'Ask them to resolve the issue then try again.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [any] - cURL error 6/7. - array( + [ 'mailer' => 'any', - 'errors' => array( - array( 'cURL error 6' ), - array( 'cURL error 7' ), - ), - 'description' => array( + 'errors' => [ + [ 'cURL error 6' ], + [ 'cURL error 7' ], + ], + 'description' => [ '' . esc_html__( 'Could not connect to host.', 'wp-mail-smtp' ) . '', ! empty( $smtp_host ) - ? sprintf( - /* translators: %s - SMTP host address. */ + ? sprintf( /* translators: %s - SMTP host address. */ esc_html__( 'This means your web server was unable to connect to %s.', 'wp-mail-smtp' ), $smtp_host ) : esc_html__( 'This means your web server was unable to connect to the host server.', 'wp-mail-smtp' ), esc_html__( 'Typically this error is returned your web server is blocking the connections or the SMTP host denying the request.', 'wp-mail-smtp' ), - ), - 'steps' => array( - sprintf( - /* translators: %s - SMTP host address. */ + ], + 'steps' => [ + sprintf( /* translators: %s - SMTP host address. */ esc_html__( 'Contact your web hosting provider and ask them to verify your server can connect to %s. Additionally, ask them if a firewall or security policy may be preventing the connection.', 'wp-mail-smtp' ), $smtp_host ), esc_html__( 'If using "Other SMTP" Mailer, triple check your SMTP settings including host address, email, and password.', 'wp-mail-smtp' ), esc_html__( 'If using "Other SMTP" Mailer, contact your SMTP host to confirm they are accepting outside connections with the settings you have configured (address, username, port, security, etc).', 'wp-mail-smtp' ), - ), - ), + ], + ], // [any] - cURL error XX (other). - array( + [ 'mailer' => 'any', - 'errors' => array( - array( 'cURL error' ), - ), - 'description' => array( + 'errors' => [ + [ 'cURL error' ], + ], + 'description' => [ '' . esc_html__( 'Could not connect to your host.', 'wp-mail-smtp' ) . '', ! empty( $smtp_host ) - ? sprintf( - /* translators: %s - SMTP host address. */ + ? sprintf( /* translators: %s - SMTP host address. */ esc_html__( 'This means your web server was unable to connect to %s.', 'wp-mail-smtp' ), $smtp_host ) : esc_html__( 'This means your web server was unable to connect to the host server.', 'wp-mail-smtp' ), esc_html__( 'Typically this error is returned when web server is not configured properly.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Contact your web hosting provider and inform them you are having issues making outbound connections.', 'wp-mail-smtp' ), esc_html__( 'The exact error you can provide them is in the Error log, available at the bottom of this page.', 'wp-mail-smtp' ), esc_html__( 'Ask them to resolve the issue then try again.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [smtp] - SMTP Error: Count not authenticate. - array( + [ 'mailer' => 'smtp', - 'errors' => array( - array( 'SMTP Error: Could not authenticate.' ), - ), - 'description' => array( + 'errors' => [ + [ 'SMTP Error: Could not authenticate.' ], + ], + 'description' => [ '' . esc_html__( 'Could not authenticate your SMTP account.', 'wp-mail-smtp' ) . '', esc_html__( 'This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.', 'wp-mail-smtp' ), esc_html__( 'Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings.', 'wp-mail-smtp' ), esc_html__( 'Contact your SMTP host to confirm you are using the correct username and password.', 'wp-mail-smtp' ), esc_html__( 'Verify with your SMTP host that your account has permissions to send emails using outside connections.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [smtp] - Sending bulk email, hitting rate limit. - array( + [ 'mailer' => 'smtp', - 'errors' => array( - array( 'We do not authorize the use of this system to transport unsolicited' ), - ), - 'description' => array( + 'errors' => [ + [ 'We do not authorize the use of this system to transport unsolicited' ], + ], + 'description' => [ '' . esc_html__( 'Error due to unsolicited and/or bulk e-mail.', 'wp-mail-smtp' ) . '', esc_html__( 'This means the connection to your SMTP host was made successfully, but the host rejected the email.', 'wp-mail-smtp' ), esc_html__( 'Typically this error is returned when you are sending too many e-mails or e-mails that have been identified as spam.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Check the emails that are sending are sending individually. Example: email is not sending to 30 recipients. You can install any WordPress e-mail logging plugin to do that.', 'wp-mail-smtp' ), esc_html__( 'Contact your SMTP host to ask about sending/rate limits.', 'wp-mail-smtp' ), esc_html__( 'Verify with them your SMTP account is in good standing and your account has not been flagged.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [smtp] - Unauthenticated senders not allowed. - array( + [ 'mailer' => 'smtp', - 'errors' => array( - array( 'Unauthenticated senders not allowed' ), - ), - 'description' => array( + 'errors' => [ + [ 'Unauthenticated senders not allowed' ], + ], + 'description' => [ '' . esc_html__( 'Unauthenticated senders are not allowed.', 'wp-mail-smtp' ) . '', esc_html__( 'This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Go to WP Mail SMTP plugin Settings page.', 'wp-mail-smtp' ), esc_html__( 'Enable Authentication', 'wp-mail-smtp' ), esc_html__( 'Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields.', 'wp-mail-smtp' ), - ), - ), - // [smtp] - SMTP connect() failed. - array( + ], + ], + // [smtp] - certificate verify failed. + // Has to be defined before "SMTP connect() failed" error, since this is a more specific error, + // which contains the "SMTP connect() failed" error message as well. + [ 'mailer' => 'smtp', - 'errors' => array( - array( 'SMTP connect() failed' ), - ), - 'description' => array( + 'errors' => [ + [ 'certificate verify failed' ], + ], + 'description' => [ + '' . esc_html__( 'Misconfigured server certificate.', 'wp-mail-smtp' ) . '', + esc_html__( 'This means OpenSSL on your server isn\'t able to verify the host certificate.', 'wp-mail-smtp' ), + esc_html__( 'There are a few reasons why this is happening. It could be that the host certificate is misconfigured, or this server\'s OpenSSL is using an outdated CA bundle.', 'wp-mail-smtp' ), + ], + 'steps' => [ + esc_html__( 'Verify that the host\'s SSL certificate is valid.', 'wp-mail-smtp' ), + sprintf( + wp_kses( /* translators: %s - URL to the PHP openssl manual */ + __( 'Contact your hosting support, show them the "full Error Log for debugging" below and share this link with them.', 'wp-mail-smtp' ), + [ + 'a' => [ + 'href' => [], + 'target' => [], + 'rel' => [], + ], + ] + ), + 'https://www.php.net/manual/en/migration56.openssl.php' + ), + ], + ], + // [smtp] - SMTP connect() failed. + [ + 'mailer' => 'smtp', + 'errors' => [ + [ 'SMTP connect() failed' ], + ], + 'description' => [ '' . esc_html__( 'Could not connect to the SMTP host.', 'wp-mail-smtp' ) . '', ! empty( $smtp_host ) - ? sprintf( - /* translators: %s - SMTP host address. */ + ? sprintf( /* translators: %s - SMTP host address. */ esc_html__( 'This means your web server was unable to connect to %s.', 'wp-mail-smtp' ), $smtp_host ) @@ -625,22 +663,21 @@ Lead Developer, WP Mail SMTP'; '-' . esc_html__( 'SMTP settings are incorrect (wrong port, security setting, incorrect host).', 'wp-mail-smtp' ) . '
' . '-' . esc_html__( 'Your web server is blocking the connection.', 'wp-mail-smtp' ) . '
' . '-' . esc_html__( 'Your SMTP host is rejecting the connection.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Triple check your SMTP settings including host address, email, and password, port, and security.', 'wp-mail-smtp' ), sprintf( - wp_kses( - /* translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption. */ + wp_kses( /* translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption. */ __( 'Contact your web hosting provider and ask them to verify your server can connect to %1$s on port %2$s using %3$s encryption. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.
Note: this is the most common cause of this issue.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'rel' => array(), - 'target' => array(), - ), - 'strong' => array(), - 'br' => array(), - ) + [ + 'a' => [ + 'href' => [], + 'rel' => [], + 'target' => [], + ], + 'strong' => [], + 'br' => [], + ] ), $smtp_host, $smtp_port, @@ -648,281 +685,332 @@ Lead Developer, WP Mail SMTP'; ), esc_html__( 'Contact your SMTP host to confirm you are using the correct username and password.', 'wp-mail-smtp' ), esc_html__( 'Verify with your SMTP host that your account has permissions to send emails using outside connections.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [mailgun] - Please activate your Mailgun account. - array( + [ 'mailer' => 'mailgun', - 'errors' => array( - array( 'Please activate your Mailgun account' ), - ), - 'description' => array( + 'errors' => [ + [ 'Please activate your Mailgun account' ], + ], + 'description' => [ '' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '', esc_html__( 'It seems that you forgot to activate your Mailgun account.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Check your inbox you used to create a Mailgun account. Click the activation link in an email from Mailgun.', 'wp-mail-smtp' ), esc_html__( 'If you do not see activation email, go to your Mailgun control panel and resend the activation email.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [mailgun] - Forbidden. - array( + [ 'mailer' => 'mailgun', - 'errors' => array( - array( 'Forbidden' ), - ), - 'description' => array( + 'errors' => [ + [ 'Forbidden' ], + ], + 'description' => [ '' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '', esc_html__( 'Typically this error is because there is an issue with your Mailgun settings, in many cases the API key.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Verify your API key is correct.', 'wp-mail-smtp' ), esc_html__( 'Go to your Mailgun account and view your API key.', 'wp-mail-smtp' ), esc_html__( 'Note that the API key includes the "key" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [mailgun] - Free accounts are for test purposes only. - array( + [ 'mailer' => 'mailgun', - 'errors' => array( - array( 'Free accounts are for test purposes only' ), - ), - 'description' => array( + 'errors' => [ + [ 'Free accounts are for test purposes only' ], + ], + 'description' => [ '' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '', esc_html__( 'Your Mailgun account does not have access to send emails.', 'wp-mail-smtp' ), esc_html__( 'Typically this error is because you have not set up and/or complete domain name verification for your Mailgun account.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ sprintf( - wp_kses( - /* translators: %s - Mailgun documentation URL. */ + wp_kses( /* translators: %s - Mailgun documentation URL. */ __( 'Go to our how-to guide for setting up Mailgun with WP Mail SMTP.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'rel' => array(), - 'target' => array(), - ), - ) + [ + 'a' => [ + 'href' => [], + 'rel' => [], + 'target' => [], + ], + ] ), 'https://wpmailsmtp.com/docs/how-to-set-up-the-mailgun-mailer-in-wp-mail-smtp/' ), esc_html__( 'Complete the steps in section "2. Verify Your Domain".', 'wp-mail-smtp' ), - ), - ), + ], + ], // [gmail] - 401: Login Required. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( '401', 'Login Required' ), - ), - 'description' => array( + 'errors' => [ + [ '401', 'Login Required' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', esc_html__( 'You have not properly configured Gmail mailer.', 'wp-mail-smtp' ), esc_html__( 'Make sure that you have clicked the "Allow plugin to send emails using your Google account" button under Gmail settings.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Go to plugin Settings page and click the "Allow plugin to send emails using your Google account" button.', 'wp-mail-smtp' ), esc_html__( 'After the click you should be redirected to a Gmail authorization screen, where you will be asked a permission to send emails on your behalf.', 'wp-mail-smtp' ), esc_html__( 'Please click "Agree", if you see that button. If not - you will need to enable less secure apps first:', 'wp-mail-smtp' ) . '', - ), - ), + ], + ], // [gmail] - 400: Recipient address required. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( '400', 'Recipient address required' ), - ), - 'description' => array( + 'errors' => [ + [ '400', 'Recipient address required' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', esc_html__( 'Typically this error is because address the email was sent to is invalid or was empty.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Check the "Send To" email address used and confirm it is a valid email and was not empty.', 'wp-mail-smtp' ), - sprintf( - /* translators: 1 - correct email address example. 2 - incorrect email address example. */ + sprintf( /* translators: 1 - correct email address example. 2 - incorrect email address example. */ esc_html__( 'It should be something like this: %1$s. These are incorrect values: %2$s.', 'wp-mail-smtp' ), 'info@example.com', 'info@localhost, info@192.168.1.1' ), esc_html__( 'Make sure that the generated email has a TO header, useful when you are responsible for email creation.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [gmail] - Token has been expired or revoked. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( 'invalid_grant', 'Token has been expired or revoked' ), - ), - 'description' => array( + 'errors' => [ + [ 'invalid_grant', 'Token has been expired or revoked' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', esc_html__( 'Unfortunately, this error can be due to many different reasons.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ sprintf( - wp_kses( - /* translators: %s - Blog article URL. */ + wp_kses( /* translators: %s - Blog article URL. */ __( 'Please read this article to learn more about what can cause this error and how it can be resolved.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'target' => array(), - 'rel' => array(), - ), - ) + [ + 'a' => [ + 'href' => [], + 'target' => [], + 'rel' => [], + ], + ] ), 'https://blog.timekit.io/google-oauth-invalid-grant-nightmare-and-how-to-fix-it-9f4efaf1da35' ), - ), - ), + ], + ], // [gmail] - Code was already redeemed. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( 'invalid_grant', 'Code was already redeemed' ), - ), - 'description' => array( + 'errors' => [ + [ 'invalid_grant', 'Code was already redeemed' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', esc_html__( 'Authentication code that Google returned to you has already been used on your previous auth attempt.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Make sure that you are not trying to manually clean up the plugin options to retry the "Allow..." step.', 'wp-mail-smtp' ), esc_html__( 'Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry.', 'wp-mail-smtp' ), esc_html__( 'Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts.', 'wp-mail-smtp' ), - ), - ), + ], + ], // [gmail] - 400: Mail service not enabled. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( '400', 'Mail service not enabled' ), - ), - 'description' => array( + 'errors' => [ + [ '400', 'Mail service not enabled' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', esc_html__( 'There are various reasons for that, please review the steps below.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ sprintf( - wp_kses( - /* translators: %s - Google G Suite Admin area URL. */ + wp_kses( /* translators: %s - Google G Suite Admin area URL. */ __( 'Make sure that your G Suite trial period has not expired. You can check the status here.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'rel' => array(), - 'target' => array(), - ), - ) + [ + 'a' => [ + 'href' => [], + 'rel' => [], + 'target' => [], + ], + ] ), 'https://admin.google.com' ), sprintf( - wp_kses( - /* translators: %s - Google G Suite Admin area URL. */ + wp_kses( /* translators: %s - Google G Suite Admin area URL. */ __( 'Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in G Suite Admin area.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'rel' => array(), - 'target' => array(), - ), - ) + [ + 'a' => [ + 'href' => [], + 'rel' => [], + 'target' => [], + ], + ] ), 'https://admin.google.com' ), sprintf( - wp_kses( - /* translators: %s - Google Developers Console URL. */ + wp_kses( /* translators: %s - Google Developers Console URL. */ __( 'Make sure that you have Gmail API enabled, and you can do that here.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'rel' => array(), - 'target' => array(), - ), - ) + [ + 'a' => [ + 'href' => [], + 'rel' => [], + 'target' => [], + ], + ] ), 'https://console.developers.google.com/' ), - ), - ), + ], + ], // [gmail] - 403: Project X is not found and cannot be used for API calls. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( '403', 'is not found and cannot be used for API calls' ), - ), - 'description' => array( + 'errors' => [ + [ '403', 'is not found and cannot be used for API calls' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled.', 'wp-mail-smtp' ), sprintf( - wp_kses( - /* translators: %s - Gmail documentation URL. */ + wp_kses( /* translators: %s - Gmail documentation URL. */ esc_html__( 'Please follow our Gmail tutorial to be sure that all the correct project and data is applied.', 'wp-mail-smtp' ), - array( - 'a' => array( - 'href' => array(), - 'rel' => array(), - 'target' => array(), - ), - ) + [ + 'a' => [ + 'href' => [], + 'rel' => [], + 'target' => [], + ], + ] ), 'https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/' ), - ), - ), + ], + ], // [gmail] - The OAuth client was disabled. - array( + [ 'mailer' => 'gmail', - 'errors' => array( - array( 'disabled_client', 'The OAuth client was disabled' ), - ), - 'description' => array( + 'errors' => [ + [ 'disabled_client', 'The OAuth client was disabled' ], + ], + 'description' => [ '' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '', esc_html__( 'You may have added a new API to a project', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled.', 'wp-mail-smtp' ), esc_html__( 'Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch.', 'wp-mail-smtp' ), - ), - ), - ); + ], + ], + // [SMTP.com] - The "channel - not found" issue. + [ + 'mailer' => 'smtpcom', + 'errors' => [ + [ 'channel - not found' ], + ], + 'description' => [ + '' . esc_html__( 'SMTP.com API Error.', 'wp-mail-smtp' ) . '', + esc_html__( 'Your Sender Name option is incorrect.', 'wp-mail-smtp' ), + ], + 'steps' => [ + esc_html__( 'Please make sure you entered an accurate Sender Name in WP Mail SMTP plugin settings.', 'wp-mail-smtp' ), + ], + ], + // [gmail] - GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler. + [ + 'mailer' => 'gmail', + 'errors' => [ + [ 'GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler' ], + ], + 'description' => [ + '' . esc_html__( 'GuzzleHttp requirements.', 'wp-mail-smtp' ) . '', + esc_html__( 'GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.', 'wp-mail-smtp' ), + ], + 'steps' => [ + esc_html__( 'Edit your php.ini file on your hosting server.', 'wp-mail-smtp' ), + esc_html__( '(Recommended) Enable PHP extension: cURL, by adding "extension=curl" to the php.ini file (without the quotation marks) OR', 'wp-mail-smtp' ), + esc_html__( '(If cURL can\'t be enabled on your hosting server) Enable PHP setting: allow_url_fopen, by adding "allow_url_fopen = On" to the php.ini file (without the quotation marks)', 'wp-mail-smtp' ), + esc_html__( 'If you don\'t know how to do the above we strongly suggest contacting your hosting support and provide them the "full Error Log for debugging" below and these steps. They should be able to fix this issue for you.', 'wp-mail-smtp' ), + ], + ], + ]; + + /** + * [any] - PHP 7.4.x and PCRE library issues. + * + * @see https://wordpress.org/support/topic/cant-send-emails-using-php-7-4/ + */ + if ( + version_compare( phpversion(), '7.4', '>=' ) && + defined( 'PCRE_VERSION' ) && + version_compare( PCRE_VERSION, '10.0', '>' ) && + version_compare( PCRE_VERSION, '10.32', '<=' ) + ) { + $details[] = [ + 'mailer' => 'any', + 'errors' => [ + [ 'Invalid address: (setFrom)' ], + ], + 'description' => [ + '' . esc_html__( 'PCRE library issue', 'wp-mail-smtp' ) . '', + esc_html__( 'It looks like your server is running PHP version 7.4.x with an outdated PCRE library (libpcre2) that has a known issue with email address validation.', 'wp-mail-smtp' ), + esc_html__( 'There is a known issue with PHP version 7.4.x, when using libpcre2 library version lower than 10.33.', 'wp-mail-smtp' ), + ], + 'steps' => [ + esc_html__( 'Contact your web hosting provider and inform them you are having issues with libpcre2 library on PHP 7.4.', 'wp-mail-smtp' ), + esc_html__( 'They should be able to resolve this issue for you.', 'wp-mail-smtp' ), + esc_html__( 'For a quick fix, until your web hosting resolves this, you can downgrade to PHP version 7.3 on your server.', 'wp-mail-smtp' ), + ], + ]; + } // Error detection logic. foreach ( $details as $data ) { @@ -953,27 +1041,27 @@ Lead Developer, WP Mail SMTP'; } // Return defaults. - return array( - 'description' => array( + return [ + 'description' => [ '' . esc_html__( 'An issue was detected.', 'wp-mail-smtp' ) . '', esc_html__( 'This means your test email was unable to be sent.', 'wp-mail-smtp' ), esc_html__( 'Typically this error is returned for one of the following reasons:', 'wp-mail-smtp' ), '- ' . esc_html__( 'Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc).', 'wp-mail-smtp' ) . '
' . '- ' . esc_html__( 'Your web server is blocking the connection.', 'wp-mail-smtp' ) . '
' . '- ' . esc_html__( 'Your host is rejecting the connection.', 'wp-mail-smtp' ), - ), - 'steps' => array( + ], + 'steps' => [ esc_html__( 'Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste).', 'wp-mail-smtp' ), wp_kses( __( 'Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.
Note: this is the most common cause of this issue.', 'wp-mail-smtp' ), - array( - 'strong' => array(), - 'br' => array(), - ) + [ + 'strong' => [], + 'br' => [], + ] ), esc_html__( 'Try using a different mailer.', 'wp-mail-smtp' ), - ), - ); + ], + ]; } /** diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php new file mode 100644 index 0000000..fecd037 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php @@ -0,0 +1,203 @@ + $time, + 'dismissed' => false, + ]; + update_option( self::NOTICE_OPTION, $review ); + } else { + // Check if it has been dismissed or not. + if ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) { + $load = true; + } + } + + // If we cannot load, return early. + if ( ! $load ) { + return; + } + + $this->review(); + } + + /** + * Maybe show review request. + * + * @since 2.1.0 + */ + private function review() { + + // Get the currently selected mailer. + $mailer = Options::init()->get( 'mail', 'mailer' ); + + // Skip if the default mailer is selected. + if ( $mailer === 'mail' ) { + return; + } + + // Fetch when plugin was initially activated. + $activated = get_option( 'wp_mail_smtp_activated_time' ); + + // Skip if the plugin activated time is not set. + if ( empty( $activated ) ) { + return; + } + + // Check if mailer setup is complete. + $mailer_setup_complete = wp_mail_smtp() + ->get_providers() + ->get_mailer( $mailer, wp_mail_smtp()->get_processor()->get_phpmailer() ) + ->is_mailer_complete(); + + // Skip if the mailer is not set or the plugin is active for less then a defined number of days. + if ( ! $mailer_setup_complete || ( $activated + ( DAY_IN_SECONDS * self::WAIT_PERIOD ) ) > time() ) { + return; + } + + // We have a candidate! Output a review message. + ?> +
+
+

+

+
+ +

+
+ + +
+ + blog_id ); + + update_option( self::NOTICE_OPTION, $review ); + + restore_current_blog(); + } + } + + wp_send_json_success(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/src/Core.php b/wp-content/plugins/wp-mail-smtp/src/Core.php index 4ce9a3e..62ec474 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Core.php +++ b/wp-content/plugins/wp-mail-smtp/src/Core.php @@ -95,6 +95,9 @@ class Core { */ public function hooks() { + // Action Scheduler requires a special early loading procedure. + add_action( 'plugins_loaded', array( $this, 'load_action_scheduler' ), -10 ); + // Activation hook. register_activation_hook( WPMS_PLUGIN_FILE, array( $this, 'activate' ) ); @@ -107,6 +110,9 @@ class Core { add_action( 'init', array( $this, 'init' ) ); + // Initialize Action Scheduler tasks. + add_action( 'init', array( $this, 'get_tasks' ), 5 ); + add_action( 'plugins_loaded', array( $this, 'get_pro' ) ); } @@ -188,6 +194,25 @@ class Core { return $this->pro; } + /** + * Get/Load the Tasks code of the plugin. + * + * @since 2.1.0 + * + * @return \WPMailSMTP\Tasks\Tasks + */ + public function get_tasks() { + + static $tasks; + + if ( ! isset( $tasks ) ) { + $tasks = apply_filters( 'wp_mail_smtp_core_get_tasks', new Tasks\Tasks() ); + $tasks->init(); + } + + return $tasks; + } + /** * This method allows to overwrite certain core WP functions, because it's fired: * - after `muplugins_loaded` hook, @@ -573,6 +598,13 @@ class Core { // Save default options, only once. Options::init()->set( Options::get_defaults(), true ); + + /** + * Store the timestamp of first plugin activation. + * + * @since 2.1.0 + */ + add_option( 'wp_mail_smtp_activated_time', time(), '', false ); } /** @@ -689,4 +721,16 @@ class Core { return (bool) apply_filters( 'wp_mail_smtp_is_white_labeled', false ); } + + /** + * Require the action scheduler in an early plugins_loaded hook (-10). + * + * @see https://actionscheduler.org/usage/#load-order + * + * @since 2.1.0 + */ + public function load_action_scheduler() { + + require_once $this->plugin_path . '/vendor/woocommerce/action-scheduler/action-scheduler.php'; + } } diff --git a/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php b/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php index 72efda3..9778fe7 100644 --- a/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php +++ b/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php @@ -1,145 +1,154 @@ -get( 'mail', 'mailer' ) ); - - $is_emailing_blocked = false; - - if ( wp_mail_smtp()->is_blocked() ) { - $is_emailing_blocked = true; - } - - // Always allow a test email - check for the specific header. - foreach ( (array) $this->getCustomHeaders() as $header ) { - if ( - ! empty( $header[0] ) && - ! empty( $header[1] ) && - $header[0] === 'X-Mailer-Type' && - trim( $header[1] ) === 'WPMailSMTP/Admin/Test' - ) { - $is_emailing_blocked = false; - } - }; - - // Do not send emails if admin desired that. - if ( $is_emailing_blocked ) { - return false; - } - - // Define a custom header, that will be used to identify the plugin and the mailer. - $this->XMailer = 'WPMailSMTP/Mailer/' . $mail_mailer . ' ' . WPMS_PLUGIN_VER; - - // Use the default PHPMailer, as we inject our settings there for certain providers. - if ( - $mail_mailer === 'mail' || - $mail_mailer === 'smtp' || - $mail_mailer === 'pepipost' - ) { - try { - // Prepare all the headers. - if ( ! $this->preSend() ) { - return false; - } - - // Allow to hook after all the preparation before the actual sending. - do_action( 'wp_mail_smtp_mailcatcher_smtp_send_before', $this ); - - return $this->postSend(); - } catch ( \phpmailerException $e ) { - $this->mailHeader = ''; - $this->setError( $e->getMessage() ); - if ( $this->exceptions ) { - throw $e; - } - - return false; - } - } - - // We need this so that the \PHPMailer class will correctly prepare all the headers. - $this->Mailer = 'mail'; - - // Prepare everything (including the message) for sending. - if ( ! $this->preSend() ) { - return false; - } - - $mailer = wp_mail_smtp()->get_providers()->get_mailer( $mail_mailer, $this ); - - if ( ! $mailer ) { - return false; - } - - if ( ! $mailer->is_php_compatible() ) { - return false; - } - - /* - * Send the actual email. - * We reuse everything, that was preprocessed for usage in \PHPMailer. - */ - $mailer->send(); - - $is_sent = $mailer->is_email_sent(); - - // Allow to perform any actions with the data. - do_action( 'wp_mail_smtp_mailcatcher_send_after', $mailer, $this ); - - return $is_sent; - } - - /** - * Returns all custom headers. - * In older versions of \PHPMailer class this method didn't exist. - * As we support WordPress 3.6+ - we need to make sure this method is always present. - * - * @since 1.5.0 - * - * @return array - */ - public function getCustomHeaders() { - - return $this->CustomHeader; - } -} +get( 'mail', 'mailer' ) ); + + $is_emailing_blocked = false; + + if ( wp_mail_smtp()->is_blocked() ) { + $is_emailing_blocked = true; + } + + // Always allow a test email - check for the specific header. + foreach ( (array) $this->getCustomHeaders() as $header ) { + if ( + ! empty( $header[0] ) && + ! empty( $header[1] ) && + $header[0] === 'X-Mailer-Type' && + trim( $header[1] ) === 'WPMailSMTP/Admin/Test' + ) { + $is_emailing_blocked = false; + } + }; + + // Do not send emails if admin desired that. + if ( $is_emailing_blocked ) { + return false; + } + + // Define a custom header, that will be used to identify the plugin and the mailer. + $this->XMailer = 'WPMailSMTP/Mailer/' . $mail_mailer . ' ' . WPMS_PLUGIN_VER; + + // Use the default PHPMailer, as we inject our settings there for certain providers. + if ( + $mail_mailer === 'mail' || + $mail_mailer === 'smtp' || + $mail_mailer === 'pepipost' + ) { + try { + // Prepare all the headers. + if ( ! $this->preSend() ) { + return false; + } + + // Allow to hook after all the preparation before the actual sending. + do_action( 'wp_mail_smtp_mailcatcher_smtp_send_before', $this ); + + return $this->postSend(); + } catch ( \phpmailerException $e ) { + $this->mailHeader = ''; + $this->setError( $e->getMessage() ); + + // Set the debug error, but not for default PHP mailer. + if ( $mail_mailer !== 'mail' ) { + Debug::set( + 'Mailer: ' . esc_html( wp_mail_smtp()->get_providers()->get_options( $mail_mailer )->get_title() ) . PHP_EOL . + $e->getMessage() + ); + } + + if ( $this->exceptions ) { + throw $e; + } + + return false; + } + } + + // We need this so that the \PHPMailer class will correctly prepare all the headers. + $this->Mailer = 'mail'; + + // Prepare everything (including the message) for sending. + if ( ! $this->preSend() ) { + return false; + } + + $mailer = wp_mail_smtp()->get_providers()->get_mailer( $mail_mailer, $this ); + + if ( ! $mailer ) { + return false; + } + + if ( ! $mailer->is_php_compatible() ) { + return false; + } + + /* + * Send the actual email. + * We reuse everything, that was preprocessed for usage in \PHPMailer. + */ + $mailer->send(); + + $is_sent = $mailer->is_email_sent(); + + // Allow to perform any actions with the data. + do_action( 'wp_mail_smtp_mailcatcher_send_after', $mailer, $this ); + + return $is_sent; + } + + /** + * Returns all custom headers. + * In older versions of \PHPMailer class this method didn't exist. + * As we support WordPress 3.6+ - we need to make sure this method is always present. + * + * @since 1.5.0 + * + * @return array + */ + public function getCustomHeaders() { + + return $this->CustomHeader; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/src/Migration.php b/wp-content/plugins/wp-mail-smtp/src/Migration.php index 80cdaa0..c503277 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Migration.php +++ b/wp-content/plugins/wp-mail-smtp/src/Migration.php @@ -1,257 +1,401 @@ -is_migrated() ) { - return; - } - - $this->old_values = $this->get_old_values(); - $this->new_values = $this->get_converted_options(); - - Options::init()->set( $this->new_values, true ); - - // Removing all old options will be enabled some time in the future. - // $this->clean_deprecated_data(); - } - - /** - * Whether we already migrated or not. - * - * @since 1.0.0 - * - * @return bool - */ - protected function is_migrated() { - - $is_migrated = false; - $new_values = get_option( Options::META_KEY, array() ); - - if ( ! empty( $new_values ) ) { - $is_migrated = true; - } - - return $is_migrated; - } - - /** - * Get all old values from DB. - * - * @since 1.0.0 - * - * @return array - */ - protected function get_old_values() { - - $old_values = array(); - - foreach ( $this->old_keys as $old_key ) { - $value = get_option( $old_key, '' ); - - if ( ! empty( $value ) ) { - $old_values[ $old_key ] = $value; - } - } - - return $old_values; - } - - /** - * Convert old values from key=>value to a multidimensional array of data. - * - * @since 1.0.0 - */ - protected function get_converted_options() { - - $converted = array(); - - foreach ( $this->old_keys as $old_key ) { - - $old_value = isset( $this->old_values[ $old_key ] ) ? $this->old_values[ $old_key ] : ''; - - switch ( $old_key ) { - case 'pepipost_user': - case 'pepipost_pass': - case 'pepipost_port': - case 'pepipost_ssl': - // Do not migrate pepipost options if it's not activated at the moment. - if ( isset( $this->old_values['mailer'] ) && $this->old_values['mailer'] === 'pepipost' ) { - $shortcut = explode( '_', $old_key ); - - if ( $old_key === 'pepipost_ssl' ) { - $converted[ $shortcut[0] ]['encryption'] = $old_value; - } else { - $converted[ $shortcut[0] ][ $shortcut[1] ] = $old_value; - } - } - break; - - case 'smtp_host': - case 'smtp_port': - case 'smtp_ssl': - case 'smtp_auth': - case 'smtp_user': - case 'smtp_pass': - $shortcut = explode( '_', $old_key ); - - if ( $old_key === 'smtp_ssl' ) { - $converted[ $shortcut[0] ]['encryption'] = $old_value; - } elseif ( $old_key === 'smtp_auth' ) { - $converted[ $shortcut[0] ][ $shortcut[1] ] = ( $old_value === 'true' ? 'yes' : 'no' ); - } else { - $converted[ $shortcut[0] ][ $shortcut[1] ] = $old_value; - } - - break; - - case 'mail_from': - $converted['mail']['from_email'] = $old_value; - break; - case 'mail_from_name': - $converted['mail']['from_name'] = $old_value; - break; - case 'mail_set_return_path': - $converted['mail']['return_path'] = ( $old_value === 'true' ); - break; - case 'mailer': - $converted['mail']['mailer'] = $old_value; - break; - case 'wp_mail_smtp_am_notifications_hidden': - $converted['general']['am_notifications_hidden'] = ( isset( $old_value ) && $old_value === 'true' ); - break; - } - } - - $converted = $this->get_converted_constants_options( $converted ); - - return $converted; - } - - /** - * Some users use constants in wp-config.php to define values. - * We need to prioritize them and reapply data to options. - * Use only those that are actually defined. - * - * @since 1.0.0 - * - * @param array $converted - * - * @return array - */ - protected function get_converted_constants_options( $converted ) { - - // Are we configured via constants? - if ( ! defined( 'WPMS_ON' ) || ! WPMS_ON ) { - return $converted; - } - - /* - * Mail settings. - */ - if ( defined( 'WPMS_MAIL_FROM' ) ) { - $converted['mail']['from_email'] = WPMS_MAIL_FROM; - } - if ( defined( 'WPMS_MAIL_FROM_NAME' ) ) { - $converted['mail']['from_name'] = WPMS_MAIL_FROM_NAME; - } - if ( defined( 'WPMS_MAILER' ) ) { - $converted['mail']['mailer'] = WPMS_MAILER; - } - if ( defined( 'WPMS_SET_RETURN_PATH' ) ) { - $converted['mail']['return_path'] = WPMS_SET_RETURN_PATH; - } - - /* - * SMTP settings. - */ - if ( defined( 'WPMS_SMTP_HOST' ) ) { - $converted['smtp']['host'] = WPMS_SMTP_HOST; - } - if ( defined( 'WPMS_SMTP_PORT' ) ) { - $converted['smtp']['port'] = WPMS_SMTP_PORT; - } - if ( defined( 'WPMS_SSL' ) ) { - $converted['smtp']['ssl'] = WPMS_SSL; - } - if ( defined( 'WPMS_SMTP_AUTH' ) ) { - $converted['smtp']['auth'] = WPMS_SMTP_AUTH; - } - if ( defined( 'WPMS_SMTP_USER' ) ) { - $converted['smtp']['user'] = WPMS_SMTP_USER; - } - if ( defined( 'WPMS_SMTP_PASS' ) ) { - $converted['smtp']['pass'] = WPMS_SMTP_PASS; - } - - return $converted; - } - - /** - * Delete all old values that are stored separately each. - * - * @since 1.0.0 - */ - protected function clean_deprecated_data() { - - foreach ( $this->old_keys as $old_key ) { - delete_option( $old_key ); - } - } -} +cur_ver = self::get_cur_version(); + + $this->maybe_migrate(); + } + + /** + * Static on purpose, to get current migration version without __construct() and validation. + * + * @since 2.1.0 + * + * @return int + */ + public static function get_cur_version() { + + return (int) get_option( self::OPTION_NAME, 0 ); + } + + /** + * Run the migration if needed. + * + * @since 2.1.0 + */ + protected function maybe_migrate() { + + if ( ! is_admin() ) { + return; + } + + if ( version_compare( $this->cur_ver, self::VERSION, '<' ) ) { + $this->run( self::VERSION ); + } + } + + /** + * Actual migration launcher. + * + * @since 2.1.0 + * + * @param int $version The version of migration to run. + */ + protected function run( $version ) { + + $function_version = (int) $version; + + if ( method_exists( $this, 'migrate_to_' . $function_version ) ) { + $this->{'migrate_to_' . $function_version}(); + } else { + $message = sprintf( /* translators: %1$s - WP Mail SMTP, %2$s - error message. */ + esc_html__( 'There was an error while upgrading the database. Please contact %1$s support with this information: %2$s.', 'wp-mail-smtp' ), + 'WP Mail SMTP', + 'migration from v' . self::get_cur_version() . ' to v' . self::VERSION . ' failed. Plugin version: v' . WPMS_PLUGIN_VER . '' + ); + + WP::add_admin_notice( $message, WP::ADMIN_NOTICE_ERROR ); + } + } + + /** + * Update migration version in options table. + * + * @since 2.1.0 + * + * @param int $version Migration version. + */ + protected function update_db_ver( $version ) { + + if ( empty( $version ) ) { + $version = self::VERSION; + } + + // Autoload it, because this value is checked all the time + // and no need to request it separately from all autoloaded options. + update_option( self::OPTION_NAME, $version, true ); + } + + /** + * Prevent running the same migration twice. + * Run migration only when required. + * + * @since 2.1.0 + * + * @param string $version The version of migration to check for potential execution. + */ + protected function maybe_required_older_migrations( $version ) { + + if ( version_compare( $this->cur_ver, $version, '<' ) ) { + $this->run( $version ); + } + } + + /** + * Migration from 0.x to 1.0.0. + * Move separate plugin WP options to one main plugin WP option setting. + * + * @since 2.1.0 + */ + private function migrate_to_1() { + + if ( $this->is_migrated() ) { + return; + } + + $this->old_values = $this->get_old_values(); + $this->new_values = $this->get_converted_options(); + + Options::init()->set( $this->new_values, true ); + + $this->update_db_ver( 1 ); + } + + /** + * Migration from 1.x to 2.1.0. + * Create Tasks\Meta table, if it does not exist. + * + * @since 2.1.0 + */ + private function migrate_to_2() { + + $this->maybe_required_older_migrations( 1 ); + + $meta = new Meta(); + + // Create the table if it doesn't exist. + if ( $meta && ! $meta->table_exists() ) { + $meta->create_table(); + } + + $this->update_db_ver( 2 ); + } + + /** + * Whether we already migrated or not. + * + * @since 1.0.0 + * + * @return bool + */ + protected function is_migrated() { + + $is_migrated = false; + $new_values = get_option( Options::META_KEY, array() ); + + if ( ! empty( $new_values ) ) { + $is_migrated = true; + } + + return $is_migrated; + } + + /** + * Get all old values from DB. + * + * @since 1.0.0 + * + * @return array + */ + protected function get_old_values() { + + $old_values = array(); + + foreach ( $this->old_keys as $old_key ) { + $value = get_option( $old_key, '' ); + + if ( ! empty( $value ) ) { + $old_values[ $old_key ] = $value; + } + } + + return $old_values; + } + + /** + * Convert old values from key=>value to a multidimensional array of data. + * + * @since 1.0.0 + */ + protected function get_converted_options() { + + $converted = array(); + + foreach ( $this->old_keys as $old_key ) { + + $old_value = isset( $this->old_values[ $old_key ] ) ? $this->old_values[ $old_key ] : ''; + + switch ( $old_key ) { + case 'pepipost_user': + case 'pepipost_pass': + case 'pepipost_port': + case 'pepipost_ssl': + // Do not migrate pepipost options if it's not activated at the moment. + if ( isset( $this->old_values['mailer'] ) && $this->old_values['mailer'] === 'pepipost' ) { + $shortcut = explode( '_', $old_key ); + + if ( $old_key === 'pepipost_ssl' ) { + $converted[ $shortcut[0] ]['encryption'] = $old_value; + } else { + $converted[ $shortcut[0] ][ $shortcut[1] ] = $old_value; + } + } + break; + + case 'smtp_host': + case 'smtp_port': + case 'smtp_ssl': + case 'smtp_auth': + case 'smtp_user': + case 'smtp_pass': + $shortcut = explode( '_', $old_key ); + + if ( $old_key === 'smtp_ssl' ) { + $converted[ $shortcut[0] ]['encryption'] = $old_value; + } elseif ( $old_key === 'smtp_auth' ) { + $converted[ $shortcut[0] ][ $shortcut[1] ] = ( $old_value === 'true' ? 'yes' : 'no' ); + } else { + $converted[ $shortcut[0] ][ $shortcut[1] ] = $old_value; + } + + break; + + case 'mail_from': + $converted['mail']['from_email'] = $old_value; + break; + case 'mail_from_name': + $converted['mail']['from_name'] = $old_value; + break; + case 'mail_set_return_path': + $converted['mail']['return_path'] = ( $old_value === 'true' ); + break; + case 'mailer': + $converted['mail']['mailer'] = $old_value; + break; + case 'wp_mail_smtp_am_notifications_hidden': + $converted['general']['am_notifications_hidden'] = ( isset( $old_value ) && $old_value === 'true' ); + break; + } + } + + $converted = $this->get_converted_constants_options( $converted ); + + return $converted; + } + + /** + * Some users use constants in wp-config.php to define values. + * We need to prioritize them and reapply data to options. + * Use only those that are actually defined. + * + * @since 1.0.0 + * + * @param array $converted + * + * @return array + */ + protected function get_converted_constants_options( $converted ) { + + // Are we configured via constants? + if ( ! defined( 'WPMS_ON' ) || ! WPMS_ON ) { + return $converted; + } + + /* + * Mail settings. + */ + if ( defined( 'WPMS_MAIL_FROM' ) ) { + $converted['mail']['from_email'] = WPMS_MAIL_FROM; + } + if ( defined( 'WPMS_MAIL_FROM_NAME' ) ) { + $converted['mail']['from_name'] = WPMS_MAIL_FROM_NAME; + } + if ( defined( 'WPMS_MAILER' ) ) { + $converted['mail']['mailer'] = WPMS_MAILER; + } + if ( defined( 'WPMS_SET_RETURN_PATH' ) ) { + $converted['mail']['return_path'] = WPMS_SET_RETURN_PATH; + } + + /* + * SMTP settings. + */ + if ( defined( 'WPMS_SMTP_HOST' ) ) { + $converted['smtp']['host'] = WPMS_SMTP_HOST; + } + if ( defined( 'WPMS_SMTP_PORT' ) ) { + $converted['smtp']['port'] = WPMS_SMTP_PORT; + } + if ( defined( 'WPMS_SSL' ) ) { + $converted['smtp']['ssl'] = WPMS_SSL; + } + if ( defined( 'WPMS_SMTP_AUTH' ) ) { + $converted['smtp']['auth'] = WPMS_SMTP_AUTH; + } + if ( defined( 'WPMS_SMTP_USER' ) ) { + $converted['smtp']['user'] = WPMS_SMTP_USER; + } + if ( defined( 'WPMS_SMTP_PASS' ) ) { + $converted['smtp']['pass'] = WPMS_SMTP_PASS; + } + + return $converted; + } + + /** + * Delete all old values that are stored separately each. + * + * @since 1.0.0 + */ + protected function clean_deprecated_data() { + + foreach ( $this->old_keys as $old_key ) { + delete_option( $old_key ); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/src/Options.php b/wp-content/plugins/wp-mail-smtp/src/Options.php index de907a0..b39e191 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Options.php +++ b/wp-content/plugins/wp-mail-smtp/src/Options.php @@ -19,21 +19,22 @@ class Options { * @since 1.4.0 Added Mailgun:region. * @since 1.5.0 Added Outlook/AmazonSES. * @since 1.8.0 Added Pepipost API. + * @since 2.0.0 Added SMTP.com API. * * @since * * @var array Map of all the default options of the plugin. */ - private static $map = array( - 'mail' => array( + private static $map = [ + 'mail' => [ 'from_name', 'from_email', 'mailer', 'return_path', 'from_name_force', 'from_email_force', - ), - 'smtp' => array( + ], + 'smtp' => [ 'host', 'port', 'encryption', @@ -41,62 +42,64 @@ class Options { 'auth', 'user', 'pass', - ), - 'gmail' => array( + ], + 'gmail' => [ 'client_id', 'client_secret', - ), - 'outlook' => array( + ], + 'outlook' => [ 'client_id', 'client_secret', - ), - 'amazonses' => array( + ], + 'amazonses' => [ 'client_id', 'client_secret', 'region', 'emails_pending', - ), - 'mailgun' => array( + ], + 'mailgun' => [ 'api_key', 'domain', 'region', - ), - 'sendgrid' => array( + ], + 'sendgrid' => [ 'api_key', - ), - 'smtpcom' => array( + ], + 'smtpcom' => [ 'api_key', 'channel', - ), - 'sendinblue' => array( + ], + 'sendinblue' => [ 'api_key', - ), - 'pepipostapi' => array( + ], + 'pepipostapi' => [ 'api_key', - ), - 'pepipost' => array( + ], + 'pepipost' => [ 'host', 'port', 'encryption', 'auth', 'user', 'pass', - ), - 'license' => array( + ], + 'license' => [ 'key', - ), - ); + ], + ]; /** * That's where plugin options are saved in wp_options table. * - * @var string + * @since 1.0.0 */ const META_KEY = 'wp_mail_smtp'; /** * All the plugin options. * + * @since 1.0.0 + * * @var array */ private $_options = array(); @@ -141,6 +144,7 @@ class Options { * Default options that are saved on plugin activation. * * @since 1.3.0 + * @since 2.1.0 Set the Force from email to "on" by default. * * @return array */ @@ -152,7 +156,7 @@ class Options { 'from_name' => get_bloginfo( 'name' ), 'mailer' => 'mail', 'return_path' => false, - 'from_email_force' => false, + 'from_email_force' => true, 'from_name_force' => false, ), 'smtp' => array( @@ -784,7 +788,7 @@ class Options { * @since 1.5.0 Added Outlook/AmazonSES, Email Log. Stop saving const values into DB. * * @param array $options Plugin options to save. - * @param bool $once Whether to update existing options or to add these options only once. + * @param bool $once Whether to update existing options or to add these options only once. */ public function set( $options, $once = false ) { /* diff --git a/wp-content/plugins/wp-mail-smtp/src/Processor.php b/wp-content/plugins/wp-mail-smtp/src/Processor.php index 3661785..9c99591 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Processor.php +++ b/wp-content/plugins/wp-mail-smtp/src/Processor.php @@ -9,6 +9,18 @@ namespace WPMailSMTP; */ class Processor { + /** + * This attribute will hold the "original" WP from email address passed to the wp_mail_from filter, + * that is not equal to the default email address. + * + * It should hold an email address set via the wp_mail_from filter, before we might overwrite it. + * + * @since 2.1.0 + * + * @var string + */ + protected $wp_mail_from; + /** * Processor constructor. * @@ -81,6 +93,11 @@ class Processor { $phpmailer->SMTPAutoTLS = false; } + // Check if original WP from email can be set as the reply_to attribute. + if ( $this->allow_setting_original_from_email_to_reply_to( $phpmailer->getReplyToAddresses(), $mailer ) ) { + $phpmailer->addReplyTo( $this->wp_mail_from ); + } + // If we're sending via SMTP, set the host. if ( 'smtp' === $mailer ) { // Set the other options. @@ -104,12 +121,62 @@ class Processor { $phpmailer->Password = $options->get( $mailer, 'pass' ); } + // Maybe set default reply-to header. + $this->set_default_reply_to( $phpmailer ); + // You can add your own options here. // See the phpmailer documentation for more info: https://github.com/PHPMailer/PHPMailer/tree/5.2-stable. /** @noinspection PhpUnusedLocalVariableInspection It's passed by reference. */ $phpmailer = apply_filters( 'wp_mail_smtp_custom_options', $phpmailer ); } + /** + * Check if it's allowed to set the original WP from email to the reply_to field. + * + * @since 2.1.0 + * + * @param array $reply_to Array of currently set reply to emails. + * @param string $mailer The slug of current mailer. + * + * @return bool + */ + protected function allow_setting_original_from_email_to_reply_to( $reply_to, $mailer ) { + + $options = new Options(); + $forced = $options->get( 'mail', 'from_email_force' ); + $from_email = $options->get( 'mail', 'from_email' ); + + if ( ! empty( $reply_to ) ) { + return false; + } + + if ( in_array( $mailer, array( 'gmail', 'outlook' ), true ) ) { + $forced = true; + + switch ( $mailer ) { + case 'gmail': + $sender = wp_mail_smtp()->get_providers()->get_auth( 'gmail' )->get_user_info(); + break; + + case 'outlook': + $sender = $options->get( 'outlook', 'user_details' ); + break; + } + + $from_email = ! empty( $sender['email'] ) ? $sender['email'] : ''; + } + + if ( + empty( $this->wp_mail_from ) || + $from_email === $this->wp_mail_from || + ! $forced + ) { + return false; + } + + return true; + } + /** * This method will be called every time 'smtp' and 'mail' mailers will be used to send emails. * @@ -157,6 +224,11 @@ class Processor { $from_email = $options->get( 'mail', 'from_email' ); $def_email = $this->get_default_email(); + // Save the "original" set WP email from address for later use. + if ( $wp_email !== $def_email ) { + $this->wp_mail_from = $wp_email; + } + // Return FROM EMAIL if forced in settings. if ( $forced & ! empty( $from_email ) ) { return $from_email; @@ -250,4 +322,34 @@ class Processor { return $phpmailer; } + + /** + * Set the default reply_to header, if: + * - no other reply_to headers are already set and, + * - the default reply_to address filter `wp_mail_smtp_processor_default_reply_to_addresses` is configured. + * + * @since 2.1.1 + * + * @param \PHPMailer $phpmailer The PHPMailer object. + */ + private function set_default_reply_to( $phpmailer ) { + + if ( ! empty( $phpmailer->getReplyToAddresses() ) ) { + return; + } + + $default_reply_to_emails = apply_filters( 'wp_mail_smtp_processor_set_default_reply_to', '' ); + + if ( empty( $default_reply_to_emails ) ) { + return; + } + + foreach ( explode( ',', $default_reply_to_emails ) as $email ) { + $email = trim( $email ); + + if ( filter_var( $email, FILTER_VALIDATE_EMAIL ) ) { + $phpmailer->addReplyTo( $email ); + } + } + } } diff --git a/wp-content/plugins/wp-mail-smtp/src/Providers/Gmail/Mailer.php b/wp-content/plugins/wp-mail-smtp/src/Providers/Gmail/Mailer.php index d3e81b7..5fb87da 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Providers/Gmail/Mailer.php +++ b/wp-content/plugins/wp-mail-smtp/src/Providers/Gmail/Mailer.php @@ -92,26 +92,28 @@ class Mailer extends MailerAbstract { $this->phpmailer->Sender = $gmail_creds['email']; } - // Get the raw MIME email using MailCatcher data. - // We need here to make base64URL-safe string. - $base64 = str_replace( - array( '+', '/', '=' ), - array( '-', '_', '' ), - base64_encode( $this->phpmailer->getSentMIMEMessage() ) - ); - - $message->setRaw( $base64 ); - - $service = new \Google_Service_Gmail( $auth->get_client() ); - try { + // Prepare a message for sending. + $this->phpmailer->preSend(); + + // Get the raw MIME email using MailCatcher data. + // We need here to make base64URL-safe string. + $base64 = str_replace( + [ '+', '/', '=' ], + [ '-', '_', '' ], + base64_encode( $this->phpmailer->getSentMIMEMessage() ) //phpcs:ignore + ); + + $message->setRaw( $base64 ); + + $service = new \Google_Service_Gmail( $auth->get_client() ); $response = $service->users_messages->send( 'me', $message ); $this->process_response( $response ); } catch ( \Exception $e ) { Debug::set( 'Mailer: Gmail' . "\r\n" . - $e->getMessage() + $this->process_exception_message( $e->getMessage() ) ); return; @@ -124,7 +126,7 @@ class Mailer extends MailerAbstract { * @since 1.0.0 * @since 1.5.0 Added action "wp_mail_smtp_providers_gmail_mailer_process_response" with $response. * - * @param \Google_Service_Gmail_Message $response + * @param \Google_Service_Gmail_Message $response Instance of Gmail response. */ protected function process_response( $response ) { @@ -160,7 +162,12 @@ class Mailer extends MailerAbstract { } /** - * @inheritdoc + * This method is relevant to SMTP and Pepipost. + * All other custom mailers should override it with own information. + * + * @since 1.2.0 + * + * @return string */ public function get_debug_info() { @@ -200,7 +207,11 @@ class Mailer extends MailerAbstract { } /** - * @inheritdoc + * Whether the mailer has all its settings correctly set up and saved. + * + * @since 1.4.0 + * + * @return bool */ public function is_mailer_complete() { @@ -219,4 +230,75 @@ class Mailer extends MailerAbstract { return false; } + + /** + * Process the exception message and append additional explanation to it. + * + * @since 2.1.0 + * + * @param mixed $message A string or an object with strings. + * + * @return string + */ + protected function process_exception_message( $message ) { + + // Transform the passed message to a string. + if ( ! is_string( $message ) ) { + $message = wp_json_encode( $message ); + } else { + $message = wp_strip_all_tags( $message, false ); + } + + // Define known errors, that we will scan the message with. + $known_errors = array( + array( + 'errors' => array( + 'invalid_grant', + ), + 'explanation' => esc_html__( 'Please re-grant Google app permissions!', 'wp-mail-smtp' ) . ' ' . PHP_EOL . + esc_html__( 'Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button.', 'wp-mail-smtp' ) . ' ' . PHP_EOL . + esc_html__( 'Then click the “Allow plugin to send emails using your Google account” button and re-enable access.', 'wp-mail-smtp' ), + ), + ); + + // Check if we get a match and append the explanation to the original message. + foreach ( $known_errors as $error ) { + foreach ( $error['errors'] as $error_fragment ) { + if ( false !== strpos( $message, $error_fragment ) ) { + return $message . PHP_EOL . $error['explanation']; + } + } + } + + // If we get no match we return the original message (as a string). + return $message; + } + + /** + * Get the default email addresses for the reply to email parameter. + * + * @deprecated 2.1.1 + * + * @since 2.1.0 + * @since 2.1.1 Not used anymore. + * + * @return array + */ + public function default_reply_to_addresses() { + + _deprecated_function( __CLASS__ . '::' . __METHOD__, '2.1.1 of WP Mail SMTP plugin' ); + + $gmail_creds = ( new Auth() )->get_user_info(); + + if ( empty( $gmail_creds['email'] ) ) { + return []; + } + + return [ + $gmail_creds['email'] => [ + $gmail_creds['email'], + '', + ], + ]; + } } diff --git a/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php b/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php index e90253b..506af82 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php +++ b/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php @@ -132,8 +132,8 @@ class Loader { * * @since 1.0.0 * - * @param string $provider - * @param MailCatcher $phpmailer + * @param string $provider The provider name. + * @param MailCatcher|\PHPMailer $phpmailer The MailCatcher object. * * @return MailerAbstract|null */ diff --git a/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php b/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php index 68aa408..b0e2441 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php +++ b/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php @@ -414,4 +414,54 @@ abstract class MailerAbstract implements MailerInterface { return implode( '
', $smtp_text ); } + + /** + * Get the email addresses for the reply to email parameter. + * + * @deprecated 2.1.1 + * + * @since 2.1.0 + * @since 2.1.1 Not used anymore. + * + * @return array + */ + public function get_reply_to_addresses() { + + _deprecated_function( __CLASS__ . '::' . __METHOD__, '2.1.1 of WP Mail SMTP plugin' ); + + $reply_to = $this->phpmailer->getReplyToAddresses(); + + // Return the passed reply to addresses, if defined. + if ( ! empty( $reply_to ) ) { + return $reply_to; + } + + // Return the default reply to addresses. + return apply_filters( + 'wp_mail_smtp_providers_mailer_default_reply_to_addresses', + $this->default_reply_to_addresses() + ); + } + + /** + * Get the default email addresses for the reply to email parameter. + * + * @deprecated 2.1.1 + * + * @since 2.1.0 + * @since 2.1.1 Not used anymore. + * + * @return array + */ + public function default_reply_to_addresses() { + + _deprecated_function( __CLASS__ . '::' . __METHOD__, '2.1.1 of WP Mail SMTP plugin' ); + + return [ + $this->phpmailer->From => [ + $this->phpmailer->From, + $this->phpmailer->FromName, + ], + ]; + } } diff --git a/wp-content/plugins/wp-mail-smtp/src/Providers/OptionsAbstract.php b/wp-content/plugins/wp-mail-smtp/src/Providers/OptionsAbstract.php index dd60e04..add6ea3 100644 --- a/wp-content/plugins/wp-mail-smtp/src/Providers/OptionsAbstract.php +++ b/wp-content/plugins/wp-mail-smtp/src/Providers/OptionsAbstract.php @@ -344,20 +344,12 @@ abstract class OptionsAbstract implements OptionsInterface { id="wp-mail-smtp-setting-get_slug() ); ?>-pass" spellcheck="false" autocomplete="new-password" />

- +
- wp-config.php' - ); - ?> + + +

-
-						define( 'WPMS_ON', true );
-						define( 'WPMS_SMTP_PASS', 'your_password' );
-					
@@ -440,13 +432,21 @@ abstract class OptionsAbstract implements OptionsInterface {
WPBeginner\'s tutorial on how to set up SSL.', 'wp-mail-smtp' ), + [ + 'a' => [ + 'href' => [], + 'target' => [], + ], + ] + ), esc_html( $this->get_title() ) ); ?>
- +
+
SMTP.com is a recommended transactional email service. With over 22 years of email delivery expertise, SMTP.com has been around for almost as long as email itself. They are known among internet providers as one of the most reliable senders on the internet. Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 10,000 free emails the first 30 days.', 'wp-mail-smtp' ), + __( 'SMTP.com is a recommended transactional email service. With a 22 years of track record of reliable email delivery, SMTP.com is a premiere solution for WordPress developers and website owners. SMTP.com has been around for almost as long as email itself. Their super simple integration interface makes it easy to get started while a powerful API and robust documentation make it a preferred choice among developers. Start a 30-day free trial with 50,000 emails.', 'wp-mail-smtp' ), $allowed_kses_html ), 'https://wpmailsmtp.com/go/smtp/' diff --git a/wp-content/plugins/wp-mail-smtp/src/Tasks/Meta.php b/wp-content/plugins/wp-mail-smtp/src/Tasks/Meta.php new file mode 100644 index 0000000..c386959 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/src/Tasks/Meta.php @@ -0,0 +1,527 @@ +191 chars in JSON to AS, + * so we need to store them somewhere (and clean from time to time). + * + * @since 2.1.0 + */ +class Meta { + + /** + * Database table name. + * + * @since 2.1.0 + * + * @var string + */ + public $table_name; + + /** + * Database version. + * + * @since 2.1.0 + * + * @var string + */ + public $version; + + /** + * Primary key (unique field) for the database table. + * + * @since 2.1.0 + * + * @var string + */ + public $primary_key = 'id'; + + /** + * Database type identifier. + * + * @since 2.1.0 + * + * @var string + */ + public $type = 'tasks_meta'; + + /** + * Primary class constructor. + * + * @since 2.1.0 + */ + public function __construct() { + + $this->table_name = self::get_table_name(); + } + + /** + * Get the DB table name. + * + * @since 2.1.0 + * + * @return string + */ + public static function get_table_name() { + + global $wpdb; + + return $wpdb->prefix . 'wpmailsmtp_tasks_meta'; + } + + /** + * Get table columns. + * + * @since 2.1.0 + */ + public function get_columns() { + + return array( + 'id' => '%d', + 'action' => '%s', + 'data' => '%s', + 'date' => '%s', + ); + } + + /** + * Default column values. + * + * @since 2.1.0 + * + * @return array + */ + public function get_column_defaults() { + + return array( + 'action' => '', + 'data' => '', + 'date' => gmdate( 'Y-m-d H:i:s' ), + ); + } + + /** + * Retrieve a row from the database based on a given row ID. + * + * @since 2.1.0 + * + * @param int $row_id Row ID. + * + * @return null|object + */ + private function get_from_db( $row_id ) { + + global $wpdb; + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_row( + $wpdb->prepare( + "SELECT * FROM {$this->table_name} WHERE {$this->primary_key} = %s LIMIT 1;", // phpcs:ignore + $row_id + ) + ); + } + + /** + * Retrieve a row based on column and row ID. + * + * @since 2.1.0 + * + * @param string $column Column name. + * @param int|string $row_id Row ID. + * + * @return object|null|bool Database query result, object or null on failure. + */ + public function get_by( $column, $row_id ) { + + global $wpdb; + + if ( empty( $row_id ) || ! array_key_exists( $column, $this->get_columns() ) ) { + return false; + } + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_row( + $wpdb->prepare( + "SELECT * FROM $this->table_name WHERE $column = '%s' LIMIT 1;", // phpcs:ignore + $row_id + ) + ); + } + + /** + * Retrieve a value based on column name and row ID. + * + * @since 2.1.0 + * + * @param string $column Column name. + * @param int|string $row_id Row ID. + * + * @return string|null Database query result (as string), or null on failure. + */ + public function get_column( $column, $row_id ) { + + global $wpdb; + + if ( empty( $row_id ) || ! array_key_exists( $column, $this->get_columns() ) ) { + return false; + } + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_var( + $wpdb->prepare( + "SELECT $column FROM $this->table_name WHERE $this->primary_key = '%s' LIMIT 1;", // phpcs:ignore + $row_id + ) + ); + } + + /** + * Retrieve one column value based on another given column and matching value. + * + * @since 2.1.0 + * + * @param string $column Column name. + * @param string $column_where Column to match against in the WHERE clause. + * @param string $column_value Value to match to the column in the WHERE clause. + * + * @return string|null Database query result (as string), or null on failure. + */ + public function get_column_by( $column, $column_where, $column_value ) { + + global $wpdb; + + if ( empty( $column ) || empty( $column_where ) || empty( $column_value ) || ! array_key_exists( $column, $this->get_columns() ) ) { + return false; + } + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_var( + $wpdb->prepare( + "SELECT $column FROM $this->table_name WHERE $column_where = %s LIMIT 1;", // phpcs:ignore + $column_value + ) + ); + } + + /** + * Insert a new record into the database. + * + * @since 2.1.0 + * + * @param array $data Column data. + * @param string $type Optional. Data type context. + * + * @return int ID for the newly inserted record. 0 otherwise. + */ + private function add_to_db( $data, $type = '' ) { + + global $wpdb; + + // Set default values. + $data = wp_parse_args( $data, $this->get_column_defaults() ); + + do_action( 'wp_mail_smtp_pre_insert_' . $type, $data ); + + // Initialise column format array. + $column_formats = $this->get_columns(); + + // Force fields to lower case. + $data = array_change_key_case( $data ); + + // White list columns. + $data = array_intersect_key( $data, $column_formats ); + + // Reorder $column_formats to match the order of columns given in $data. + $data_keys = array_keys( $data ); + $column_formats = array_merge( array_flip( $data_keys ), $column_formats ); + + $wpdb->insert( $this->table_name, $data, $column_formats ); + + do_action( 'wp_mail_smtp_post_insert_' . $type, $wpdb->insert_id, $data ); + + return $wpdb->insert_id; + } + + /** + * Update an existing record in the database. + * + * @since 2.1.0 + * + * @param int|string $row_id Row ID for the record being updated. + * @param array $data Optional. Array of columns and associated data to update. Default empty array. + * @param string $where Optional. Column to match against in the WHERE clause. If empty, $primary_key + * will be used. Default empty. + * @param string $type Optional. Data type context, e.g. 'affiliate', 'creative', etc. Default empty. + * + * @return bool False if the record could not be updated, true otherwise. + */ + public function update( $row_id, $data = array(), $where = '', $type = '' ) { + + global $wpdb; + + // Row ID must be a positive integer. + $row_id = absint( $row_id ); + + if ( empty( $row_id ) ) { + return false; + } + + if ( empty( $where ) ) { + $where = $this->primary_key; + } + + do_action( 'wp_mail_smtp_pre_update_' . $type, $data ); + + // Initialise column format array. + $column_formats = $this->get_columns(); + + // Force fields to lower case. + $data = array_change_key_case( $data ); + + // White list columns. + $data = array_intersect_key( $data, $column_formats ); + + // Reorder $column_formats to match the order of columns given in $data. + $data_keys = array_keys( $data ); + $column_formats = array_merge( array_flip( $data_keys ), $column_formats ); + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + if ( false === $wpdb->update( $this->table_name, $data, array( $where => $row_id ), $column_formats ) ) { + return false; + } + + do_action( 'wp_mail_smtp_post_update_' . $type, $data ); + + return true; + } + + /** + * Delete a record from the database. + * + * @since 2.1.0 + * + * @param int|string $row_id Row ID. + * + * @return bool False if the record could not be deleted, true otherwise. + */ + public function delete( $row_id = 0 ) { + + global $wpdb; + + // Row ID must be positive integer. + $row_id = absint( $row_id ); + + if ( empty( $row_id ) ) { + return false; + } + + do_action( 'wp_mail_smtp_pre_delete', $row_id ); + do_action( 'wp_mail_smtp_pre_delete_' . $this->type, $row_id ); + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + if ( false === $wpdb->query( $wpdb->prepare( "DELETE FROM {$this->table_name} WHERE {$this->primary_key} = %d", $row_id ) ) ) { // phpcs:ignore + return false; + } + + do_action( 'wp_mail_smtp_post_delete', $row_id ); + do_action( 'wp_mail_smtp_post_delete_' . $this->type, $row_id ); + + return true; + } + + /** + * Delete a record from the database by column. + * + * @since 2.1.0 + * + * @param string $column Column name. + * @param int|string $column_value Column value. + * + * @return bool False if the record could not be deleted, true otherwise. + */ + public function delete_by( $column, $column_value ) { + + global $wpdb; + + if ( empty( $column ) || empty( $column_value ) || ! array_key_exists( $column, $this->get_columns() ) ) { + return false; + } + + do_action( 'wp_mail_smtp_pre_delete', $column_value ); + do_action( 'wp_mail_smtp_pre_delete_' . $this->type, $column_value ); + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + if ( false === $wpdb->query( $wpdb->prepare( "DELETE FROM {$this->table_name} WHERE $column = %s", $column_value ) ) ) { // phpcs:ignore + return false; + } + + do_action( 'wp_mail_smtp_post_delete', $column_value ); + do_action( 'wp_mail_smtp_post_delete_' . $this->type, $column_value ); + + return true; + } + + /** + * Check if the given table exists. + * + * @since 2.1.0 + * + * @param string $table The table name. Defaults to the child class table name. + * + * @return string|null If the table name exists. + */ + public function table_exists( $table = '' ) { + + global $wpdb; + + if ( ! empty( $table ) ) { + $table = sanitize_text_field( $table ); + } else { + $table = $this->table_name; + } + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table ) ) === $table; + } + + /** + * Create custom entry meta database table. + * Used in migration. + * + * @since 2.1.0 + */ + public function create_table() { + + global $wpdb; + + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + + $charset_collate = ''; + + if ( ! empty( $wpdb->charset ) ) { + $charset_collate .= "DEFAULT CHARACTER SET {$wpdb->charset}"; + } + if ( ! empty( $wpdb->collate ) ) { + $charset_collate .= " COLLATE {$wpdb->collate}"; + } + + $sql = "CREATE TABLE {$this->table_name} ( + id bigint(20) NOT NULL AUTO_INCREMENT, + action varchar(255) NOT NULL, + data longtext NOT NULL, + date datetime NOT NULL, + PRIMARY KEY (id) + ) {$charset_collate};"; + + dbDelta( $sql ); + } + + /** + * Remove queue records for a defined period of time in the past. + * Calling this method will remove queue records that are older than $period seconds. + * + * @since 2.1.0 + * + * @param string $action Action that should be cleaned up. + * @param int $interval Number of seconds from now. + * + * @return int Number of removed tasks meta records. + */ + public function clean_by( $action, $interval ) { + + global $wpdb; + + if ( empty( $action ) || empty( $interval ) ) { + return 0; + } + + $table = self::get_table_name(); + $action = sanitize_key( $action ); + $date = gmdate( 'Y-m-d H:i:s', time() - (int) $interval ); + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching + return (int) $wpdb->query( + $wpdb->prepare( + "DELETE FROM `$table` WHERE action = %s AND date < %s", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $action, + $date + ) + ); + } + + /** + * Inserts a new record into the database. + * + * @since 2.1.0 + * + * @param array $data Column data. + * @param string $type Optional. Data type context. + * + * @return int ID for the newly inserted record. 0 otherwise. + */ + public function add( $data, $type = '' ) { + + if ( empty( $data['action'] ) || ! is_string( $data['action'] ) ) { + return 0; + } + + $data['action'] = sanitize_key( $data['action'] ); + + if ( isset( $data['data'] ) ) { + $string = wp_json_encode( $data['data'] ); + + if ( $string === false ) { + $string = ''; + } + + /* + * We are encoding the string representation of all the data + * to make sure that nothing can harm the database. + * This is not an encryption, and we need this data later as is, + * so we are using one of the fastest way to do that. + * This data is removed from DB on a daily basis. + */ + // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode + $data['data'] = base64_encode( $string ); + } + + if ( empty( $type ) ) { + $type = $this->type; + } + + return $this->add_to_db( $data, $type ); + } + + /** + * Retrieve a row from the database based on a given row ID. + * + * @since 2.1.0} + * + * @param int $meta_id Meta ID. + * + * @return null|object + */ + public function get( $meta_id ) { + + $meta = $this->get_from_db( $meta_id ); + + if ( empty( $meta ) || empty( $meta->data ) ) { + return $meta; + } + + // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode + $decoded = base64_decode( $meta->data ); + + if ( $decoded === false || ! is_string( $decoded ) ) { + $meta->data = ''; + } else { + $meta->data = json_decode( $decoded, true ); + } + + return $meta; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/src/Tasks/Task.php b/wp-content/plugins/wp-mail-smtp/src/Tasks/Task.php new file mode 100644 index 0000000..ed39ce7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/src/Tasks/Task.php @@ -0,0 +1,304 @@ +action = sanitize_key( $action ); + + if ( empty( $this->action ) ) { + throw new \UnexpectedValueException( 'Task action cannot be empty.' ); + } + } + + /** + * Define the type of the task as async. + * + * @since 2.1.0 + * + * @return Task + */ + public function async() { + + $this->type = self::TYPE_ASYNC; + + return $this; + } + + /** + * Define the type of the task as recurring. + * + * @since 2.1.0 + * + * @param int $timestamp When the first instance of the job will run. + * @param int $interval How long to wait between runs. + * + * @return Task + */ + public function recurring( $timestamp, $interval ) { + + $this->type = self::TYPE_RECURRING; + $this->timestamp = (int) $timestamp; + $this->interval = (int) $interval; + + return $this; + } + + /** + * Define the type of the task as one-time. + * + * @since 2.1.0 + * + * @param int $timestamp When the first instance of the job will run. + * + * @return Task + */ + public function once( $timestamp ) { + + $this->type = self::TYPE_ONCE; + $this->timestamp = (int) $timestamp; + + return $this; + } + + /** + * Pass any number of params that should be saved to Meta table. + * + * @since 2.1.0 + * + * @return Task + */ + public function params() { + + $this->params = func_get_args(); + + return $this; + } + + /** + * Register the action. + * Should be the final call in a chain. + * + * @since 2.1.0 + * + * @return null|string Action ID. + */ + public function register() { + + $action_id = null; + + // No processing if ActionScheduler is not usable. + if ( ! wp_mail_smtp()->get_tasks()->is_usable() ) { + return $action_id; + } + + // Save data to tasks meta table. + $task_meta = new Meta(); + $this->meta_id = $task_meta->add( + [ + 'action' => $this->action, + 'data' => $this->params, + ] + ); + + if ( empty( $this->meta_id ) ) { + return $action_id; + } + + switch ( $this->type ) { + case self::TYPE_ASYNC: + $action_id = $this->register_async(); + break; + + case self::TYPE_RECURRING: + $action_id = $this->register_recurring(); + break; + + case self::TYPE_ONCE: + $action_id = $this->register_once(); + break; + } + + return $action_id; + } + + /** + * Register the async task. + * + * @since 2.1.0 + * + * @return null|string Action ID. + */ + protected function register_async() { + + if ( ! function_exists( 'as_enqueue_async_action' ) ) { + return null; + } + + return as_enqueue_async_action( + $this->action, + [ 'tasks_meta_id' => $this->meta_id ], + Tasks::GROUP + ); + } + + /** + * Register the recurring task. + * + * @since 2.1.0 + * + * @return null|string Action ID. + */ + protected function register_recurring() { + + if ( ! function_exists( 'as_schedule_recurring_action' ) ) { + return null; + } + + return as_schedule_recurring_action( + $this->timestamp, + $this->interval, + $this->action, + [ 'tasks_meta_id' => $this->meta_id ], + Tasks::GROUP + ); + } + + /** + * Register the one-time task. + * + * @since 2.1.0 + * + * @return null|string Action ID. + */ + protected function register_once() { + + if ( ! function_exists( 'as_schedule_single_action' ) ) { + return null; + } + + return as_schedule_single_action( + $this->timestamp, + $this->action, + [ 'tasks_meta_id' => $this->meta_id ], + Tasks::GROUP + ); + } + + /** + * Cancel all occurrences of this task. + * + * @since 2.1.0 + * + * @return null|bool|string Null if no matching action found, + * false if AS library is missing, + * string of the scheduled action ID if a scheduled action was found and unscheduled. + */ + public function cancel() { + + // Exit if AS function does not exist. + if ( ! function_exists( 'as_unschedule_all_actions' ) ) { + return false; + } + + return as_unschedule_all_actions( $this->action ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/src/Tasks/Tasks.php b/wp-content/plugins/wp-mail-smtp/src/Tasks/Tasks.php new file mode 100644 index 0000000..ab74ec1 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/src/Tasks/Tasks.php @@ -0,0 +1,150 @@ +get_tasks() as $task ) { + if ( ! is_subclass_of( $task, '\WPMailSMTP\Tasks\Task' ) ) { + continue; + } + + $new_task = new $task(); + + // Run the init method, if a task has one defined. + if ( method_exists( $new_task, 'init' ) ) { + $new_task->init(); + } + } + + add_action( 'admin_menu', array( $this, 'admin_hide_as_menu' ), PHP_INT_MAX ); + } + + /** + * Get the list of default scheduled tasks. + * Tasks, that are fired under certain specific circumstances + * (like sending emails) are not listed here. + * + * @since 2.1.0 + * + * @return Task[] List of tasks classes. + */ + public function get_tasks() { + + return apply_filters( 'wp_mail_smtp_tasks_get_tasks', array() ); + } + + /** + * Hide Action Scheduler admin area when not in debug mode. + * + * @since 2.1.0 + */ + public function admin_hide_as_menu() { + + // Filter to redefine that WP Mail SMTP hides Tools > Action Scheduler menu item. + if ( apply_filters( 'wp_mail_smtp_tasks_admin_hide_as_menu', true ) ) { + remove_submenu_page( 'tools.php', 'action-scheduler' ); + } + } + + /** + * Create a new task. + * Used for "inline" tasks, that require additional information + * from the plugin runtime before they can be scheduled. + * + * Example: + * wp_mail_smtp()->get( 'tasks' ) + * ->create( 'i_am_the_dude' ) + * ->async() + * ->params( 'The Big Lebowski', 1998 ) + * ->register(); + * + * This `i_am_the_dude` action will be later processed as: + * add_action( 'i_am_the_dude', 'thats_what_you_call_me' ); + * + * @since 2.1.0 + * + * @param string $action Action that will be used as a hook. + * + * @return \WPMailSMTP\Tasks\Task + */ + public function create( $action ) { + + return new Task( $action ); + } + + /** + * Cancel all the AS actions for a group. + * + * @since 2.1.0 + * + * @param string $group Group to cancel all actions for. + */ + public function cancel_all( $group = '' ) { + + if ( empty( $group ) ) { + $group = self::GROUP; + } else { + $group = sanitize_key( $group ); + } + + if ( class_exists( 'ActionScheduler_DBStore' ) ) { + \ActionScheduler_DBStore::instance()->cancel_actions_by_group( $group ); + } + } + + /** + * Whether ActionScheduler thinks that it has migrated or not. + * + * @since 2.1.0 + * + * @return bool + */ + public function is_usable() { + + // No tasks if ActionScheduler wasn't loaded. + if ( ! class_exists( 'ActionScheduler_DataController' ) ) { + return false; + } + + return \ActionScheduler_DataController::is_migration_complete(); + } + + /** + * Whether task has been scheduled and is pending. + * + * @since 2.1.0 + * + * @param string $hook Hook to check for. + * + * @return bool + */ + public function is_scheduled( $hook ) { + + if ( ! function_exists( 'as_next_scheduled_action' ) ) { + return false; + } + + return as_next_scheduled_action( $hook ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/src/WP.php b/wp-content/plugins/wp-mail-smtp/src/WP.php index ed7edbe..1b4e153 100644 --- a/wp-content/plugins/wp-mail-smtp/src/WP.php +++ b/wp-content/plugins/wp-mail-smtp/src/WP.php @@ -18,24 +18,32 @@ class WP { */ protected static $admin_notices = array(); /** + * CSS class for a success notice. + * * @since 1.0.0 * * @var string */ const ADMIN_NOTICE_SUCCESS = 'notice-success'; /** + * CSS class for an error notice. + * * @since 1.0.0 * * @var string */ const ADMIN_NOTICE_ERROR = 'notice-error'; /** + * CSS class for an info notice. + * * @since 1.0.0 * * @var string */ const ADMIN_NOTICE_INFO = 'notice-info'; /** + * CSS class for a warning notice. + * * @since 1.0.0 * * @var string @@ -43,7 +51,7 @@ class WP { const ADMIN_NOTICE_WARNING = 'notice-warning'; /** - * True is WP is processing an AJAX call. + * True if WP is processing an AJAX call. * * @since 1.0.0 * @@ -103,7 +111,7 @@ class WP {

- +

@@ -160,7 +168,7 @@ class WP { * * @since 1.5.0 * - * @param string $string + * @param string $string String we want to test if it's json. * * @return bool */ @@ -178,8 +186,7 @@ class WP { */ public static function datetime_format() { - return sprintf( - /* translators: %1$s - date, \a\t - specially escaped "at", %2$s - time. */ + return sprintf( /* translators: %1$s - date, \a\t - specially escaped "at", %2$s - time. */ esc_html__( '%1$s \a\t %2$s', 'wp-mail-smtp' ), get_option( 'date_format' ), get_option( 'time_format' ) @@ -199,14 +206,14 @@ class WP { } /** - * Sanitize the value, similar to sanitize_text_field(), but a bit differently. + * Sanitize the value, similar to `sanitize_text_field()`, but a bit differently. * It preserves `<` and `>` for non-HTML tags. * * @since 1.5.0 * - * @param string $value + * @param string $value String we want to sanitize. * - * @return mixed|string|string[]|null + * @return string */ public static function sanitize_value( $value ) { diff --git a/wp-content/plugins/wp-mail-smtp/uninstall.php b/wp-content/plugins/wp-mail-smtp/uninstall.php index 466101c..43fc412 100644 --- a/wp-content/plugins/wp-mail-smtp/uninstall.php +++ b/wp-content/plugins/wp-mail-smtp/uninstall.php @@ -1,80 +1,99 @@ - array( 'amn_smtp' ), - 'post_status' => 'any', - 'numberposts' => - 1, - 'fields' => 'ids', - ) -); -if ( ! empty( $announcements ) ) { - foreach ( $announcements as $announcement ) { - wp_delete_post( $announcement, true ); - } -} - -/* - * Logs for Pro plugin only. - */ -if ( function_exists( 'wp_mail_smtp' ) && wp_mail_smtp()->is_pro() ) { - // DB version. - delete_option( 'wp_mail_smtp_logs_db_version' ); - // DB table. - global $wpdb; - $table = \WPMailSMTP\Pro\Emails\Logs\Logs::get_table_name(); - $wpdb->query( "DROP TABLE $table;" ); // phpcs:ignore -} +query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp\_mail\_smtp%'" ); + +// Delete plugin user meta. +$wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE 'wp\_mail\_smtp\_%'" ); + +// Remove any transients we've left behind. +$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_wp\_mail\_smtp\_%'" ); +$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_site\_transient\_wp\_mail\_smtp\_%'" ); +$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_timeout\_wp\_mail\_smtp\_%'" ); +$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_site\_transient\_timeout\_wp\_mail\_smtp\_%'" ); + +/* + * Remove product announcements. + */ +$announcements = get_posts( + array( + 'post_type' => array( 'amn_smtp' ), + 'post_status' => 'any', + 'numberposts' => - 1, + 'fields' => 'ids', + ) +); +if ( ! empty( $announcements ) ) { + foreach ( $announcements as $announcement ) { + wp_delete_post( $announcement, true ); + } +} + +/* + * Logs for Pro plugin only. + */ +if ( + function_exists( 'wp_mail_smtp' ) && + is_readable( wp_mail_smtp()->plugin_path . '/src/Pro/Pro.php' ) +) { + // DB table. + $logs_table = \WPMailSMTP\Pro\Emails\Logs\Logs::get_table_name(); + $wpdb->query( "DROP TABLE IF EXISTS $logs_table;" ); // phpcs:ignore WordPress.DB +} + +/* + * Drop all Action Scheduler data. + */ +require_once dirname( __FILE__ ) . '/vendor/woocommerce/action-scheduler/action-scheduler.php'; + +// Unschedule all plugin ActionScheduler actions. +( new \WPMailSMTP\Tasks\Tasks() )->cancel_all(); + +$meta_table = \WPMailSMTP\Tasks\Meta::get_table_name(); +$wpdb->query( "DROP TABLE IF EXISTS $meta_table;" ); // phpcs:ignore WordPress.DB diff --git a/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_files.php b/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_files.php index 020463c..4cbdc4c 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_files.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_files.php @@ -9,6 +9,9 @@ return array( '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', ); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_psr4.php b/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_psr4.php index a361555..f6115f0 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_psr4.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_psr4.php @@ -8,6 +8,9 @@ $baseDir = dirname($vendorDir); return array( 'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'), 'WPMailSMTP\\' => array($baseDir . '/src'), + 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), 'SendinBlue\\Client\\' => array($vendorDir . '/sendinblue/api-v3-sdk/lib'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), diff --git a/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_static.php b/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_static.php index 349296f..0618347 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_static.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_static.php @@ -10,6 +10,9 @@ class ComposerStaticInit72f613a3d0c2cc77892490951b6e5352 '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', ); @@ -25,6 +28,9 @@ class ComposerStaticInit72f613a3d0c2cc77892490951b6e5352 ), 'S' => array ( + 'Symfony\\Polyfill\\Php72\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, 'SendinBlue\\Client\\' => 18, ), 'P' => @@ -63,6 +69,18 @@ class ComposerStaticInit72f613a3d0c2cc77892490951b6e5352 array ( 0 => __DIR__ . '/../..' . '/src', ), + 'Symfony\\Polyfill\\Php72\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Polyfill\\Intl\\Idn\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', + ), 'SendinBlue\\Client\\' => array ( 0 => __DIR__ . '/..' . '/sendinblue/api-v3-sdk/lib', diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail.php index 9b63e2b..0f96d8f 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail.php @@ -19,8 +19,7 @@ * Service definition for Gmail (v1). * *

- * The Gmail API lets you view and manage Gmail mailbox data like threads, - * messages, and labels.

+ * Access Gmail mailboxes including sending user email.

* *

* For more information about this service, see the API @@ -98,8 +97,8 @@ class Google_Service_Gmail extends Google_Service { parent::__construct($client); $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/'; - $this->servicePath = ''; - $this->batchPath = 'batch'; + $this->servicePath = 'gmail/v1/users/'; + $this->batchPath = 'batch/gmail/v1'; $this->version = 'v1'; $this->serviceName = 'gmail'; @@ -110,7 +109,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'getProfile' => array( - 'path' => 'gmail/v1/users/{userId}/profile', + 'path' => '{userId}/profile', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -120,7 +119,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'stop' => array( - 'path' => 'gmail/v1/users/{userId}/stop', + 'path' => '{userId}/stop', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -130,7 +129,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'watch' => array( - 'path' => 'gmail/v1/users/{userId}/watch', + 'path' => '{userId}/watch', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -150,7 +149,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'create' => array( - 'path' => 'gmail/v1/users/{userId}/drafts', + 'path' => '{userId}/drafts', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -160,7 +159,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/drafts/{id}', + 'path' => '{userId}/drafts/{id}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -175,7 +174,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/drafts/{id}', + 'path' => '{userId}/drafts/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -194,7 +193,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/drafts', + 'path' => '{userId}/drafts', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -206,6 +205,10 @@ class Google_Service_Gmail extends Google_Service 'location' => 'query', 'type' => 'boolean', ), + 'maxResults' => array( + 'location' => 'query', + 'type' => 'integer', + ), 'pageToken' => array( 'location' => 'query', 'type' => 'string', @@ -214,13 +217,9 @@ class Google_Service_Gmail extends Google_Service 'location' => 'query', 'type' => 'string', ), - 'maxResults' => array( - 'location' => 'query', - 'type' => 'integer', - ), ), ),'send' => array( - 'path' => 'gmail/v1/users/{userId}/drafts/send', + 'path' => '{userId}/drafts/send', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -230,7 +229,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'update' => array( - 'path' => 'gmail/v1/users/{userId}/drafts/{id}', + 'path' => '{userId}/drafts/{id}', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -255,7 +254,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'list' => array( - 'path' => 'gmail/v1/users/{userId}/history', + 'path' => '{userId}/history', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -263,9 +262,10 @@ class Google_Service_Gmail extends Google_Service 'type' => 'string', 'required' => true, ), - 'pageToken' => array( + 'historyTypes' => array( 'location' => 'query', 'type' => 'string', + 'repeated' => true, ), 'labelId' => array( 'location' => 'query', @@ -275,10 +275,9 @@ class Google_Service_Gmail extends Google_Service 'location' => 'query', 'type' => 'integer', ), - 'historyTypes' => array( + 'pageToken' => array( 'location' => 'query', 'type' => 'string', - 'repeated' => true, ), 'startHistoryId' => array( 'location' => 'query', @@ -296,7 +295,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'create' => array( - 'path' => 'gmail/v1/users/{userId}/labels', + 'path' => '{userId}/labels', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -306,7 +305,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/labels/{id}', + 'path' => '{userId}/labels/{id}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -321,7 +320,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/labels/{id}', + 'path' => '{userId}/labels/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -336,7 +335,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/labels', + 'path' => '{userId}/labels', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -346,7 +345,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'patch' => array( - 'path' => 'gmail/v1/users/{userId}/labels/{id}', + 'path' => '{userId}/labels/{id}', 'httpMethod' => 'PATCH', 'parameters' => array( 'userId' => array( @@ -361,7 +360,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'update' => array( - 'path' => 'gmail/v1/users/{userId}/labels/{id}', + 'path' => '{userId}/labels/{id}', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -386,7 +385,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'batchDelete' => array( - 'path' => 'gmail/v1/users/{userId}/messages/batchDelete', + 'path' => '{userId}/messages/batchDelete', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -396,7 +395,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'batchModify' => array( - 'path' => 'gmail/v1/users/{userId}/messages/batchModify', + 'path' => '{userId}/messages/batchModify', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -406,7 +405,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/messages/{id}', + 'path' => '{userId}/messages/{id}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -421,7 +420,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/messages/{id}', + 'path' => '{userId}/messages/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -434,18 +433,18 @@ class Google_Service_Gmail extends Google_Service 'type' => 'string', 'required' => true, ), + 'format' => array( + 'location' => 'query', + 'type' => 'string', + ), 'metadataHeaders' => array( 'location' => 'query', 'type' => 'string', 'repeated' => true, ), - 'format' => array( - 'location' => 'query', - 'type' => 'string', - ), ), ),'import' => array( - 'path' => 'gmail/v1/users/{userId}/messages/import', + 'path' => '{userId}/messages/import', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -453,7 +452,7 @@ class Google_Service_Gmail extends Google_Service 'type' => 'string', 'required' => true, ), - 'processForCalendar' => array( + 'deleted' => array( 'location' => 'query', 'type' => 'boolean', ), @@ -465,13 +464,13 @@ class Google_Service_Gmail extends Google_Service 'location' => 'query', 'type' => 'boolean', ), - 'deleted' => array( + 'processForCalendar' => array( 'location' => 'query', 'type' => 'boolean', ), ), ),'insert' => array( - 'path' => 'gmail/v1/users/{userId}/messages', + 'path' => '{userId}/messages', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -479,17 +478,17 @@ class Google_Service_Gmail extends Google_Service 'type' => 'string', 'required' => true, ), - 'internalDateSource' => array( - 'location' => 'query', - 'type' => 'string', - ), 'deleted' => array( 'location' => 'query', 'type' => 'boolean', ), + 'internalDateSource' => array( + 'location' => 'query', + 'type' => 'string', + ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/messages', + 'path' => '{userId}/messages', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -501,26 +500,26 @@ class Google_Service_Gmail extends Google_Service 'location' => 'query', 'type' => 'boolean', ), - 'pageToken' => array( - 'location' => 'query', - 'type' => 'string', - ), 'labelIds' => array( 'location' => 'query', 'type' => 'string', 'repeated' => true, ), - 'q' => array( - 'location' => 'query', - 'type' => 'string', - ), 'maxResults' => array( 'location' => 'query', 'type' => 'integer', ), + 'pageToken' => array( + 'location' => 'query', + 'type' => 'string', + ), + 'q' => array( + 'location' => 'query', + 'type' => 'string', + ), ), ),'modify' => array( - 'path' => 'gmail/v1/users/{userId}/messages/{id}/modify', + 'path' => '{userId}/messages/{id}/modify', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -535,7 +534,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'send' => array( - 'path' => 'gmail/v1/users/{userId}/messages/send', + 'path' => '{userId}/messages/send', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -545,7 +544,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'trash' => array( - 'path' => 'gmail/v1/users/{userId}/messages/{id}/trash', + 'path' => '{userId}/messages/{id}/trash', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -560,7 +559,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'untrash' => array( - 'path' => 'gmail/v1/users/{userId}/messages/{id}/untrash', + 'path' => '{userId}/messages/{id}/untrash', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -585,7 +584,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'get' => array( - 'path' => 'gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}', + 'path' => '{userId}/messages/{messageId}/attachments/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -615,7 +614,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'getAutoForwarding' => array( - 'path' => 'gmail/v1/users/{userId}/settings/autoForwarding', + 'path' => '{userId}/settings/autoForwarding', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -625,7 +624,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'getImap' => array( - 'path' => 'gmail/v1/users/{userId}/settings/imap', + 'path' => '{userId}/settings/imap', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -635,7 +634,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'getLanguage' => array( - 'path' => 'gmail/v1/users/{userId}/settings/language', + 'path' => '{userId}/settings/language', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -645,7 +644,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'getPop' => array( - 'path' => 'gmail/v1/users/{userId}/settings/pop', + 'path' => '{userId}/settings/pop', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -655,7 +654,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'getVacation' => array( - 'path' => 'gmail/v1/users/{userId}/settings/vacation', + 'path' => '{userId}/settings/vacation', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -665,7 +664,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'updateAutoForwarding' => array( - 'path' => 'gmail/v1/users/{userId}/settings/autoForwarding', + 'path' => '{userId}/settings/autoForwarding', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -675,7 +674,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'updateImap' => array( - 'path' => 'gmail/v1/users/{userId}/settings/imap', + 'path' => '{userId}/settings/imap', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -685,7 +684,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'updateLanguage' => array( - 'path' => 'gmail/v1/users/{userId}/settings/language', + 'path' => '{userId}/settings/language', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -695,7 +694,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'updatePop' => array( - 'path' => 'gmail/v1/users/{userId}/settings/pop', + 'path' => '{userId}/settings/pop', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -705,7 +704,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'updateVacation' => array( - 'path' => 'gmail/v1/users/{userId}/settings/vacation', + 'path' => '{userId}/settings/vacation', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -725,7 +724,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'create' => array( - 'path' => 'gmail/v1/users/{userId}/settings/delegates', + 'path' => '{userId}/settings/delegates', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -735,7 +734,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', + 'path' => '{userId}/settings/delegates/{delegateEmail}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -750,7 +749,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', + 'path' => '{userId}/settings/delegates/{delegateEmail}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -765,7 +764,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/settings/delegates', + 'path' => '{userId}/settings/delegates', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -785,7 +784,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'create' => array( - 'path' => 'gmail/v1/users/{userId}/settings/filters', + 'path' => '{userId}/settings/filters', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -795,7 +794,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/settings/filters/{id}', + 'path' => '{userId}/settings/filters/{id}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -810,7 +809,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/settings/filters/{id}', + 'path' => '{userId}/settings/filters/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -825,7 +824,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/settings/filters', + 'path' => '{userId}/settings/filters', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -845,7 +844,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'create' => array( - 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses', + 'path' => '{userId}/settings/forwardingAddresses', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -855,7 +854,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', + 'path' => '{userId}/settings/forwardingAddresses/{forwardingEmail}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -870,7 +869,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', + 'path' => '{userId}/settings/forwardingAddresses/{forwardingEmail}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -885,7 +884,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses', + 'path' => '{userId}/settings/forwardingAddresses', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -905,7 +904,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'create' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs', + 'path' => '{userId}/settings/sendAs', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -915,7 +914,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'delete' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -930,7 +929,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -945,7 +944,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs', + 'path' => '{userId}/settings/sendAs', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -955,7 +954,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'patch' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'PATCH', 'parameters' => array( 'userId' => array( @@ -970,7 +969,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'update' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'PUT', 'parameters' => array( 'userId' => array( @@ -985,7 +984,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'verify' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}/verify', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -1010,7 +1009,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'delete' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -1030,7 +1029,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -1050,7 +1049,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'insert' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -1065,7 +1064,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -1080,7 +1079,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'setDefault' => array( - 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault', + 'path' => '{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -1110,7 +1109,7 @@ class Google_Service_Gmail extends Google_Service array( 'methods' => array( 'delete' => array( - 'path' => 'gmail/v1/users/{userId}/threads/{id}', + 'path' => '{userId}/threads/{id}', 'httpMethod' => 'DELETE', 'parameters' => array( 'userId' => array( @@ -1125,7 +1124,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'get' => array( - 'path' => 'gmail/v1/users/{userId}/threads/{id}', + 'path' => '{userId}/threads/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -1138,18 +1137,18 @@ class Google_Service_Gmail extends Google_Service 'type' => 'string', 'required' => true, ), + 'format' => array( + 'location' => 'query', + 'type' => 'string', + ), 'metadataHeaders' => array( 'location' => 'query', 'type' => 'string', 'repeated' => true, ), - 'format' => array( - 'location' => 'query', - 'type' => 'string', - ), ), ),'list' => array( - 'path' => 'gmail/v1/users/{userId}/threads', + 'path' => '{userId}/threads', 'httpMethod' => 'GET', 'parameters' => array( 'userId' => array( @@ -1157,30 +1156,30 @@ class Google_Service_Gmail extends Google_Service 'type' => 'string', 'required' => true, ), - 'pageToken' => array( + 'includeSpamTrash' => array( 'location' => 'query', - 'type' => 'string', + 'type' => 'boolean', ), 'labelIds' => array( 'location' => 'query', 'type' => 'string', 'repeated' => true, ), - 'q' => array( - 'location' => 'query', - 'type' => 'string', - ), 'maxResults' => array( 'location' => 'query', 'type' => 'integer', ), - 'includeSpamTrash' => array( + 'pageToken' => array( 'location' => 'query', - 'type' => 'boolean', + 'type' => 'string', + ), + 'q' => array( + 'location' => 'query', + 'type' => 'string', ), ), ),'modify' => array( - 'path' => 'gmail/v1/users/{userId}/threads/{id}/modify', + 'path' => '{userId}/threads/{id}/modify', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -1195,7 +1194,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'trash' => array( - 'path' => 'gmail/v1/users/{userId}/threads/{id}/trash', + 'path' => '{userId}/threads/{id}/trash', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( @@ -1210,7 +1209,7 @@ class Google_Service_Gmail extends Google_Service ), ), ),'untrash' => array( - 'path' => 'gmail/v1/users/{userId}/threads/{id}/untrash', + 'path' => '{userId}/threads/{id}/untrash', 'httpMethod' => 'POST', 'parameters' => array( 'userId' => array( diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php index fb8c652..d0ec543 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersDrafts.php @@ -81,12 +81,12 @@ class Google_Service_Gmail_Resource_UsersDrafts extends Google_Service_Resource * * @opt_param bool includeSpamTrash Include drafts from SPAM and TRASH in the * results. + * @opt_param string maxResults Maximum number of drafts to return. * @opt_param string pageToken Page token to retrieve a specific page of results * in the list. * @opt_param string q Only return draft messages matching the specified query. * Supports the same query format as the Gmail search box. For example, * "from:someuser@example.com rfc822msgid: is:unread". - * @opt_param string maxResults Maximum number of drafts to return. * @return Google_Service_Gmail_ListDraftsResponse */ public function listUsersDrafts($userId, $optParams = array()) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php index 6356da7..128bd17 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersHistory.php @@ -34,11 +34,11 @@ class Google_Service_Gmail_Resource_UsersHistory extends Google_Service_Resource * used to indicate the authenticated user. * @param array $optParams Optional parameters. * - * @opt_param string pageToken Page token to retrieve a specific page of results - * in the list. + * @opt_param string historyTypes History types to be returned by the function * @opt_param string labelId Only return messages with a label matching the ID. * @opt_param string maxResults The maximum number of history records to return. - * @opt_param string historyTypes History types to be returned by the function + * @opt_param string pageToken Page token to retrieve a specific page of results + * in the list. * @opt_param string startHistoryId Required. Returns history records after the * specified startHistoryId. The supplied startHistoryId should be obtained from * the historyId of a message, thread, or previous list response. History IDs @@ -46,7 +46,7 @@ class Google_Service_Gmail_Resource_UsersHistory extends Google_Service_Resource * valid IDs. Supplying an invalid or out of date startHistoryId typically * returns an HTTP 404 error code. A historyId is typically valid for at least a * week, but in some rare circumstances may be valid for only a few hours. If - * you receive an HTTP 404 error response, your application should perform a + * you receive an HTTP 404 error response, your application should perform a * full sync. If you receive no nextPageToken in the response, there are no * updates to retrieve and you can store the returned historyId for a future * request. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php index 8cf8158..88b33ce 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersLabels.php @@ -85,7 +85,8 @@ class Google_Service_Gmail_Resource_UsersLabels extends Google_Service_Resource return $this->call('list', array($params), "Google_Service_Gmail_ListLabelsResponse"); } /** - * Patch the specified label. (labels.patch) + * Updates the specified label. This method supports patch semantics. + * (labels.patch) * * @param string $userId The user's email address. The special value me can be * used to indicate the authenticated user. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php index fa51249..67c737b 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersMessages.php @@ -26,7 +26,7 @@ class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resource { /** - * Deletes many messages by message ID. Provides no guarantees that messages + * Deletes many messages by message ID. Provides no guarantees that messages * were not already deleted or even existed at all. (messages.batchDelete) * * @param string $userId The user's email address. The special value me can be @@ -56,7 +56,7 @@ class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resourc } /** * Immediately and permanently deletes the specified message. This operation - * cannot be undone. Prefer messages.trash instead. (messages.delete) + * cannot be undone. Prefer messages.trash instead. (messages.delete) * * @param string $userId The user's email address. The special value me can be * used to indicate the authenticated user. @@ -77,9 +77,9 @@ class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resourc * @param string $id The ID of the message to retrieve. * @param array $optParams Optional parameters. * + * @opt_param string format The format to return the message in. * @opt_param string metadataHeaders When given and format is METADATA, only * include headers specified. - * @opt_param string format The format to return the message in. * @return Google_Service_Gmail_Message */ public function get($userId, $id, $optParams = array()) @@ -98,15 +98,15 @@ class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resourc * @param Google_Service_Gmail_Message $postBody * @param array $optParams Optional parameters. * - * @opt_param bool processForCalendar Process calendar invites in the email and - * add any extracted meetings to the Google Calendar for this user. + * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and + * only visible in Google Vault to a Vault administrator. Only used for G Suite + * accounts. * @opt_param string internalDateSource Source for Gmail's internal date of the * message. * @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and * never mark this email as SPAM in the mailbox. - * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and - * only visible in Google Vault to a Vault administrator. Only used for G Suite - * accounts. + * @opt_param bool processForCalendar Process calendar invites in the email and + * add any extracted meetings to the Google Calendar for this user. * @return Google_Service_Gmail_Message */ public function import($userId, Google_Service_Gmail_Message $postBody, $optParams = array()) @@ -125,11 +125,11 @@ class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resourc * @param Google_Service_Gmail_Message $postBody * @param array $optParams Optional parameters. * - * @opt_param string internalDateSource Source for Gmail's internal date of the - * message. * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and * only visible in Google Vault to a Vault administrator. Only used for G Suite * accounts. + * @opt_param string internalDateSource Source for Gmail's internal date of the + * message. * @return Google_Service_Gmail_Message */ public function insert($userId, Google_Service_Gmail_Message $postBody, $optParams = array()) @@ -147,16 +147,15 @@ class Google_Service_Gmail_Resource_UsersMessages extends Google_Service_Resourc * * @opt_param bool includeSpamTrash Include messages from SPAM and TRASH in the * results. - * @opt_param string pageToken Page token to retrieve a specific page of results - * in the list. * @opt_param string labelIds Only return messages with labels that match all of * the specified label IDs. + * @opt_param string maxResults Maximum number of messages to return. + * @opt_param string pageToken Page token to retrieve a specific page of results + * in the list. * @opt_param string q Only return messages matching the specified query. * Supports the same query format as the Gmail search box. For example, - * "from:someuser@example.com rfc822msgid:somemsgid@example.com is:unread". - * Parameter cannot be used when accessing the api using the gmail.metadata - * scope. - * @opt_param string maxResults Maximum number of messages to return. + * "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used + * when accessing the api using the gmail.metadata scope. * @return Google_Service_Gmail_ListMessagesResponse */ public function listUsersMessages($userId, $optParams = array()) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php index 6b5aac3..ccf5d9b 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettings.php @@ -29,7 +29,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc * Gets the auto-forwarding setting for the specified account. * (settings.getAutoForwarding) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_AutoForwarding @@ -43,7 +43,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Gets IMAP settings. (settings.getImap) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_ImapSettings @@ -57,7 +57,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Gets language settings. (settings.getLanguage) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_LanguageSettings @@ -71,7 +71,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Gets POP settings. (settings.getPop) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_PopSettings @@ -85,7 +85,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Gets vacation responder settings. (settings.getVacation) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_VacationSettings @@ -97,13 +97,13 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc return $this->call('getVacation', array($params), "Google_Service_Gmail_VacationSettings"); } /** - * Updates the auto-forwarding setting for the specified account. A verified + * Updates the auto-forwarding setting for the specified account. A verified * forwarding address must be specified when auto-forwarding is enabled. * * This method is only available to service account clients that have been * delegated domain-wide authority. (settings.updateAutoForwarding) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_AutoForwarding $postBody * @param array $optParams Optional parameters. @@ -118,7 +118,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Updates IMAP settings. (settings.updateImap) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_ImapSettings $postBody * @param array $optParams Optional parameters. @@ -139,7 +139,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc * Gmail but have a close variant that is, and so the variant may be chosen and * saved instead. (settings.updateLanguage) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_LanguageSettings $postBody * @param array $optParams Optional parameters. @@ -154,7 +154,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Updates POP settings. (settings.updatePop) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_PopSettings $postBody * @param array $optParams Optional parameters. @@ -169,7 +169,7 @@ class Google_Service_Gmail_Resource_UsersSettings extends Google_Service_Resourc /** * Updates vacation responder settings. (settings.updateVacation) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_VacationSettings $postBody * @param array $optParams Optional parameters. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php index 450a2b9..35383e3 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsDelegates.php @@ -27,8 +27,8 @@ class Google_Service_Gmail_Resource_UsersSettingsDelegates extends Google_Servic { /** * Adds a delegate with its verification status set directly to accepted, - * without sending any verification email. The delegate user must be a member - * of the same G Suite organization as the delegator user. + * without sending any verification email. The delegate user must be a member of + * the same G Suite organization as the delegator user. * * Gmail imposes limitations on the number of delegates and delegators each user * in a G Suite organization can have. These limits depend on your organization, @@ -43,7 +43,7 @@ class Google_Service_Gmail_Resource_UsersSettingsDelegates extends Google_Servic * This method is only available to service account clients that have been * delegated domain-wide authority. (delegates.create) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_Delegate $postBody * @param array $optParams Optional parameters. @@ -65,7 +65,7 @@ class Google_Service_Gmail_Resource_UsersSettingsDelegates extends Google_Servic * This method is only available to service account clients that have been * delegated domain-wide authority. (delegates.delete) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $delegateEmail The email address of the user to be removed as a * delegate. @@ -86,7 +86,7 @@ class Google_Service_Gmail_Resource_UsersSettingsDelegates extends Google_Servic * This method is only available to service account clients that have been * delegated domain-wide authority. (delegates.get) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $delegateEmail The email address of the user whose delegate * relationship is to be retrieved. @@ -105,7 +105,7 @@ class Google_Service_Gmail_Resource_UsersSettingsDelegates extends Google_Servic * This method is only available to service account clients that have been * delegated domain-wide authority. (delegates.listUsersSettingsDelegates) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_ListDelegatesResponse diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php index 5c39771..b0e2508 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsForwardingAddresses.php @@ -26,7 +26,7 @@ class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Google_Service_Resource { /** - * Creates a forwarding address. If ownership verification is required, a + * Creates a forwarding address. If ownership verification is required, a * message will be sent to the recipient and the resource's verification status * will be set to pending; otherwise, the resource will be created with * verification status set to accepted. @@ -34,7 +34,7 @@ class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Goo * This method is only available to service account clients that have been * delegated domain-wide authority. (forwardingAddresses.create) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_ForwardingAddress $postBody * @param array $optParams Optional parameters. @@ -53,7 +53,7 @@ class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Goo * This method is only available to service account clients that have been * delegated domain-wide authority. (forwardingAddresses.delete) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $forwardingEmail The forwarding address to be deleted. * @param array $optParams Optional parameters. @@ -67,7 +67,7 @@ class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Goo /** * Gets the specified forwarding address. (forwardingAddresses.get) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $forwardingEmail The forwarding address to be retrieved. * @param array $optParams Optional parameters. @@ -83,7 +83,7 @@ class Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses extends Goo * Lists the forwarding addresses for the specified account. * (forwardingAddresses.listUsersSettingsForwardingAddresses) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_ListForwardingAddressesResponse diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php index 76ecb2f..f3c45cf 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersSettingsSendAs.php @@ -26,18 +26,18 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_Resource { /** - * Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail + * Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail * will attempt to connect to the SMTP service to validate the configuration - * before creating the alias. If ownership verification is required for the + * before creating the alias. If ownership verification is required for the * alias, a message will be sent to the email address and the resource's * verification status will be set to pending; otherwise, the resource will be - * created with verification status set to accepted. If a signature is - * provided, Gmail will sanitize the HTML before saving it with the alias. + * created with verification status set to accepted. If a signature is provided, + * Gmail will sanitize the HTML before saving it with the alias. * * This method is only available to service account clients that have been * delegated domain-wide authority. (sendAs.create) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Google_Service_Gmail_SendAs $postBody * @param array $optParams Optional parameters. @@ -50,13 +50,13 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_R return $this->call('create', array($params), "Google_Service_Gmail_SendAs"); } /** - * Deletes the specified send-as alias. Revokes any verification that may have + * Deletes the specified send-as alias. Revokes any verification that may have * been required for using it. * * This method is only available to service account clients that have been * delegated domain-wide authority. (sendAs.delete) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be deleted. * @param array $optParams Optional parameters. @@ -68,10 +68,10 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_R return $this->call('delete', array($params)); } /** - * Gets the specified send-as alias. Fails with an HTTP 404 error if the + * Gets the specified send-as alias. Fails with an HTTP 404 error if the * specified address is not a member of the collection. (sendAs.get) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be retrieved. * @param array $optParams Optional parameters. @@ -84,11 +84,11 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_R return $this->call('get', array($params), "Google_Service_Gmail_SendAs"); } /** - * Lists the send-as aliases for the specified account. The result includes the + * Lists the send-as aliases for the specified account. The result includes the * primary send-as address associated with the account as well as any custom * "from" aliases. (sendAs.listUsersSettingsSendAs) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return Google_Service_Gmail_ListSendAsResponse @@ -100,9 +100,14 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_R return $this->call('list', array($params), "Google_Service_Gmail_ListSendAsResponse"); } /** - * Patch the specified send-as alias. (sendAs.patch) + * Updates a send-as alias. If a signature is provided, Gmail will sanitize the + * HTML before saving it with the alias. * - * @param string $userId User's email address. The special value "me" can be + * Addresses other than the primary address for the account can only be updated + * by service account clients that have been delegated domain-wide authority. + * This method supports patch semantics. (sendAs.patch) + * + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be updated. * @param Google_Service_Gmail_SendAs $postBody @@ -116,14 +121,14 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_R return $this->call('patch', array($params), "Google_Service_Gmail_SendAs"); } /** - * Updates a send-as alias. If a signature is provided, Gmail will sanitize the + * Updates a send-as alias. If a signature is provided, Gmail will sanitize the * HTML before saving it with the alias. * * Addresses other than the primary address for the account can only be updated * by service account clients that have been delegated domain-wide authority. * (sendAs.update) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be updated. * @param Google_Service_Gmail_SendAs $postBody @@ -143,7 +148,7 @@ class Google_Service_Gmail_Resource_UsersSettingsSendAs extends Google_Service_R * This method is only available to service account clients that have been * delegated domain-wide authority. (sendAs.verify) * - * @param string $userId User's email address. The special value "me" can be + * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be verified. * @param array $optParams Optional parameters. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php index 341a7db..b8909c4 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/apiclient-services/src/Google/Service/Gmail/Resource/UsersThreads.php @@ -48,9 +48,9 @@ class Google_Service_Gmail_Resource_UsersThreads extends Google_Service_Resource * @param string $id The ID of the thread to retrieve. * @param array $optParams Optional parameters. * + * @opt_param string format The format to return the messages in. * @opt_param string metadataHeaders When given and format is METADATA, only * include headers specified. - * @opt_param string format The format to return the messages in. * @return Google_Service_Gmail_Thread */ public function get($userId, $id, $optParams = array()) @@ -66,17 +66,17 @@ class Google_Service_Gmail_Resource_UsersThreads extends Google_Service_Resource * used to indicate the authenticated user. * @param array $optParams Optional parameters. * - * @opt_param string pageToken Page token to retrieve a specific page of results - * in the list. + * @opt_param bool includeSpamTrash Include threads from SPAM and TRASH in the + * results. * @opt_param string labelIds Only return threads with labels that match all of * the specified label IDs. + * @opt_param string maxResults Maximum number of threads to return. + * @opt_param string pageToken Page token to retrieve a specific page of results + * in the list. * @opt_param string q Only return threads matching the specified query. * Supports the same query format as the Gmail search box. For example, * "from:someuser@example.com rfc822msgid: is:unread". Parameter cannot be used * when accessing the api using the gmail.metadata scope. - * @opt_param string maxResults Maximum number of threads to return. - * @opt_param bool includeSpamTrash Include threads from SPAM and TRASH in the - * results. * @return Google_Service_Gmail_ListThreadsResponse */ public function listUsersThreads($userId, $optParams = array()) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/autoload.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/autoload.php index f547337..1e13827 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/autoload.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/autoload.php @@ -23,7 +23,7 @@ function oauth2client_php_autoload($className) } if (count($classPath) > 3) { // Maximum class file path depth in this project is 3. - $classPath = array_slice($classPath, 0, 3); + $classPath = array_slice($classPath, 0, 3); } $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php'; if (file_exists($filePath)) { diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/AccessToken.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/AccessToken.php index 87344fa..1352e93 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/AccessToken.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/AccessToken.php @@ -82,22 +82,19 @@ class AccessToken * accepted. By default, the id token must have been issued to this OAuth2 client. * * @param string $token The JSON Web Token to be verified. - * @param array $options [optional] { - * Configuration options. - * - * @type string $audience The indended recipient of the token. - * @type string $issuer The intended issuer of the token. - * @type string $certsLocation The location (remote or local) from which + * @param array $options [optional] Configuration options. + * @param string $options.audience The indended recipient of the token. + * @param string $options.issuer The intended issuer of the token. + * @param string $options.cacheKey The cache key of the cached certs. Defaults to + * the sha1 of $certsLocation if provided, otherwise is set to + * "federated_signon_certs_v3". + * @param string $options.certsLocation The location (remote or local) from which * to retrieve certificates, if not cached. This value should only be * provided in limited circumstances in which you are sure of the * behavior. - * @type string $cacheKey The cache key of the cached certs. Defaults to - * the sha1 of $certsLocation if provided, otherwise is set to - * "federated_signon_certs_v3". - * @type bool $throwException Whether the function should throw an + * @param bool $options.throwException Whether the function should throw an * exception if the verification fails. This is useful for * determining the reason verification failed. - * } * @return array|bool the token payload, if successful, or false if not. * @throws InvalidArgumentException If certs could not be retrieved from a local file. * @throws InvalidArgumentException If received certs are in an invalid format. @@ -129,7 +126,8 @@ class AccessToken $alg = $this->determineAlg($certs); if (!in_array($alg, ['RS256', 'ES256'])) { throw new InvalidArgumentException( - 'unrecognized "alg" in certs, expected ES256 or RS256'); + 'unrecognized "alg" in certs, expected ES256 or RS256' + ); } try { if ($alg == 'RS256') { @@ -186,13 +184,11 @@ class AccessToken * * @param string $token The JSON Web Token to be verified. * @param array $certs Certificate array according to the JWK spec (see - * https://tools.ietf.org/html/rfc7517). + * https://tools.ietf.org/html/rfc7517). * @param string|null $audience If set, returns false if the provided - * audience does not match the "aud" claim on - * the JWT. + * audience does not match the "aud" claim on the JWT. * @param string|null $issuer If set, returns false if the provided - * issuer does not match the "iss" claim on - * the JWT. + * issuer does not match the "iss" claim on the JWT. * @return array|bool the token payload, if successful, or false if not. */ private function verifyEs256($token, array $certs, $audience = null, $issuer = null) @@ -228,13 +224,11 @@ class AccessToken * * @param string $token The JSON Web Token to be verified. * @param array $certs Certificate array according to the JWK spec (see - * https://tools.ietf.org/html/rfc7517). + * https://tools.ietf.org/html/rfc7517). * @param string|null $audience If set, returns false if the provided - * audience does not match the "aud" claim on - * the JWT. + * audience does not match the "aud" claim on the JWT. * @param string|null $issuer If set, returns false if the provided - * issuer does not match the "iss" claim on - * the JWT. + * issuer does not match the "iss" claim on the JWT. * @return array|bool the token payload, if successful, or false if not. */ private function verifyRs256($token, array $certs, $audience = null, $issuer = null) @@ -325,6 +319,7 @@ class AccessToken * are PEM encoded certificates. * * @param string $location The location from which to retrieve certs. + * @param string $cacheKey The key under which to cache the retrieved certs. * @param array $options [optional] Configuration options. * @return array * @throws InvalidArgumentException If received certs are in an invalid format. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/ApplicationDefaultCredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/ApplicationDefaultCredentials.php index c99beb1..add1c93 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/ApplicationDefaultCredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/ApplicationDefaultCredentials.php @@ -46,23 +46,25 @@ use Psr\Cache\CacheItemPoolInterface; * * This allows it to be used as follows with GuzzleHttp\Client: * - * use Google\Auth\ApplicationDefaultCredentials; - * use GuzzleHttp\Client; - * use GuzzleHttp\HandlerStack; + * ``` + * use Google\Auth\ApplicationDefaultCredentials; + * use GuzzleHttp\Client; + * use GuzzleHttp\HandlerStack; * - * $middleware = ApplicationDefaultCredentials::getMiddleware( - * 'https://www.googleapis.com/auth/taskqueue' - * ); - * $stack = HandlerStack::create(); - * $stack->push($middleware); + * $middleware = ApplicationDefaultCredentials::getMiddleware( + * 'https://www.googleapis.com/auth/taskqueue' + * ); + * $stack = HandlerStack::create(); + * $stack->push($middleware); * - * $client = new Client([ - * 'handler' => $stack, - * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', - * 'auth' => 'google_auth' // authorize all requests - * ]); + * $client = new Client([ + * 'handler' => $stack, + * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', + * 'auth' => 'google_auth' // authorize all requests + * ]); * - * $res = $client->get('myproject/taskqueues/myqueue'); + * $res = $client->get('myproject/taskqueues/myqueue'); + * ``` */ class ApplicationDefaultCredentials { @@ -74,13 +76,12 @@ class ApplicationDefaultCredentials * this does not fallback to the compute engine defaults. * * @param string|array scope the scope of the access request, expressed - * either as an Array or as a space-delimited String. + * either as an Array or as a space-delimited String. * @param callable $httpHandler callback which delivers psr7 request * @param array $cacheConfig configuration for the cache when it's present - * @param CacheItemPoolInterface $cache an implementation of CacheItemPoolInterface - * + * @param CacheItemPoolInterface $cache A cache implementation, may be + * provided if you have one already available for use. * @return AuthTokenSubscriber - * * @throws DomainException if no implementation can be obtained. */ public static function getSubscriber( @@ -102,13 +103,12 @@ class ApplicationDefaultCredentials * this does not fallback to the compute engine defaults. * * @param string|array scope the scope of the access request, expressed - * either as an Array or as a space-delimited String. + * either as an Array or as a space-delimited String. * @param callable $httpHandler callback which delivers psr7 request * @param array $cacheConfig configuration for the cache when it's present - * @param CacheItemPoolInterface $cache - * + * @param CacheItemPoolInterface $cache A cache implementation, may be + * provided if you have one already available for use. * @return AuthTokenMiddleware - * * @throws DomainException if no implementation can be obtained. */ public static function getMiddleware( @@ -131,20 +131,23 @@ class ApplicationDefaultCredentials * this does not fallback to the Compute Engine defaults. * * @param string|array scope the scope of the access request, expressed - * either as an Array or as a space-delimited String. + * either as an Array or as a space-delimited String. * @param callable $httpHandler callback which delivers psr7 request * @param array $cacheConfig configuration for the cache when it's present - * @param CacheItemPoolInterface $cache + * @param CacheItemPoolInterface $cache A cache implementation, may be + * provided if you have one already available for use. + * @param string $quotaProject specifies a project to bill for access + * charges associated with the request. * * @return CredentialsLoader - * * @throws DomainException if no implementation can be obtained. */ public static function getCredentials( $scope = null, callable $httpHandler = null, array $cacheConfig = null, - CacheItemPoolInterface $cache = null + CacheItemPoolInterface $cache = null, + $quotaProject = null ) { $creds = null; $jsonKey = CredentialsLoader::fromEnv() @@ -160,11 +163,12 @@ class ApplicationDefaultCredentials } if (!is_null($jsonKey)) { + $jsonKey['quota_project'] = $quotaProject; $creds = CredentialsLoader::makeCredentials($scope, $jsonKey); } elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) { $creds = new AppIdentityCredentials($scope); } elseif (GCECredentials::onGce($httpHandler)) { - $creds = new GCECredentials(null, $scope); + $creds = new GCECredentials(null, $scope, null, $quotaProject); } if (is_null($creds)) { @@ -187,10 +191,9 @@ class ApplicationDefaultCredentials * @param string $targetAudience The audience for the ID token. * @param callable $httpHandler callback which delivers psr7 request * @param array $cacheConfig configuration for the cache when it's present - * @param CacheItemPoolInterface $cache - * + * @param CacheItemPoolInterface $cache A cache implementation, may be + * provided if you have one already available for use. * @return AuthTokenMiddleware - * * @throws DomainException if no implementation can be obtained. */ public static function getIdTokenMiddleware( @@ -198,7 +201,6 @@ class ApplicationDefaultCredentials callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null - ) { $creds = self::getIdTokenCredentials($targetAudience, $httpHandler, $cacheConfig, $cache); @@ -213,10 +215,9 @@ class ApplicationDefaultCredentials * @param string $targetAudience The audience for the ID token. * @param callable $httpHandler callback which delivers psr7 request * @param array $cacheConfig configuration for the cache when it's present - * @param CacheItemPoolInterface $cache - * + * @param CacheItemPoolInterface $cache A cache implementation, may be + * provided if you have one already available for use. * @return CredentialsLoader - * * @throws DomainException if no implementation can be obtained. * @throws InvalidArgumentException if JSON "type" key is invalid */ diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Cache/SysVCacheItemPool.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Cache/SysVCacheItemPool.php index 5280eee..1834cf1 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Cache/SysVCacheItemPool.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Cache/SysVCacheItemPool.php @@ -62,22 +62,22 @@ class SysVCacheItemPool implements CacheItemPoolInterface /** * Create a SystemV shared memory based CacheItemPool. * - * @param array $options [optional] { - * Configuration options. - * - * @type int $variableKey The variable key for getting the data from - * the shared memory. **Defaults to** 1. - * @type string $proj The project identifier for ftok. This needs to - * be a one character string. **Defaults to** 'A'. - * @type int $memsize The memory size in bytes for shm_attach. - * **Defaults to** 10000. - * @type int $perm The permission for shm_attach. **Defaults to** 0600. + * @param array $options [optional] Configuration options. + * @param int $options.variableKey The variable key for getting the data from + * the shared memory. **Defaults to** 1. + * @param $options.proj string The project identifier for ftok. This needs to + * be a one character string. **Defaults to** 'A'. + * @param $options.memsize int The memory size in bytes for shm_attach. + * **Defaults to** 10000. + * @param $options.perm int The permission for shm_attach. **Defaults to** + * 0600. */ public function __construct($options = []) { if (! extension_loaded('sysvshm')) { throw new \RuntimeException( - 'sysvshm extension is required to use this ItemPool'); + 'sysvshm extension is required to use this ItemPool' + ); } $this->options = $options + [ 'variableKey' => self::VAR_KEY, @@ -90,9 +90,6 @@ class SysVCacheItemPool implements CacheItemPoolInterface $this->sysvKey = ftok(__FILE__, $this->options['proj']); } - /** - * {@inheritdoc} - */ public function getItem($key) { $this->loadItems(); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/AppIdentityCredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/AppIdentityCredentials.php index 5244b70..829344d 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/AppIdentityCredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/AppIdentityCredentials.php @@ -90,7 +90,7 @@ class AppIdentityCredentials extends CredentialsLoader implements * SERVER_SOFTWARE environment variable (prod) or the APPENGINE_RUNTIME * environment variable (dev). * - * @return true if this an App Engine Instance, false otherwise + * @return bool true if this an App Engine Instance, false otherwise */ public static function onAppEngine() { @@ -115,7 +115,6 @@ class AppIdentityCredentials extends CredentialsLoader implements * the GuzzleHttp\ClientInterface instance passed in will not be used. * * @param callable $httpHandler callback which delivers psr7 request - * * @return array A set of auth related metadata, containing the following * keys: * - access_token (string) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/GCECredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/GCECredentials.php index 461e36f..053b4e0 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/GCECredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/GCECredentials.php @@ -18,6 +18,7 @@ namespace Google\Auth\Credentials; use Google\Auth\CredentialsLoader; +use Google\Auth\GetQuotaProjectInterface; use Google\Auth\HttpHandler\HttpClientCache; use Google\Auth\HttpHandler\HttpHandlerFactory; use Google\Auth\Iam; @@ -55,9 +56,12 @@ use InvalidArgumentException; */ class GCECredentials extends CredentialsLoader implements SignBlobInterface, - ProjectIdProviderInterface + ProjectIdProviderInterface, + GetQuotaProjectInterface { + // phpcs:disable const cacheKey = 'GOOGLE_AUTH_PHP_GCE'; + // phpcs:enable /** * The metadata IP address on appengine instances. @@ -149,19 +153,27 @@ class GCECredentials extends CredentialsLoader implements */ private $targetAudience; + /** + * @var string|null + */ + private $quotaProject; + /** * @param Iam $iam [optional] An IAM instance. * @param string|array $scope [optional] the scope of the access request, * expressed either as an array or as a space-delimited string. * @param string $targetAudience [optional] The audience for the ID token. + * @param string $quotaProject [optional] Specifies a project to bill for access + * charges associated with the request. */ - public function __construct(Iam $iam = null, $scope = null, $targetAudience = null) + public function __construct(Iam $iam = null, $scope = null, $targetAudience = null, $quotaProject = null) { $this->iam = $iam; if ($scope && $targetAudience) { throw new InvalidArgumentException( - 'Scope and targetAudience cannot both be supplied'); + 'Scope and targetAudience cannot both be supplied' + ); } $tokenUri = self::getTokenUri(); @@ -174,7 +186,8 @@ class GCECredentials extends CredentialsLoader implements $tokenUri = $tokenUri . '?scopes='. $scope; } elseif ($targetAudience) { - $tokenUri = sprintf('http://%s/computeMetadata/%s?audience=%s', + $tokenUri = sprintf( + 'http://%s/computeMetadata/%s?audience=%s', self::METADATA_IP, self::ID_TOKEN_URI_PATH, $targetAudience @@ -183,6 +196,7 @@ class GCECredentials extends CredentialsLoader implements } $this->tokenUri = $tokenUri; + $this->quotaProject = $quotaProject; } /** @@ -225,7 +239,7 @@ class GCECredentials extends CredentialsLoader implements * Determines if this an App Engine Flexible instance, by accessing the * GAE_INSTANCE environment variable. * - * @return true if this an App Engine Flexible Instance, false otherwise + * @return bool true if this an App Engine Flexible Instance, false otherwise */ public static function onAppEngineFlexible() { @@ -456,4 +470,14 @@ class GCECredentials extends CredentialsLoader implements return (string) $resp->getBody(); } + + /** + * Get the quota project used for this API request + * + * @return string|null + */ + public function getQuotaProject() + { + return $this->quotaProject; + } } diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/IAMCredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/IAMCredentials.php index 0d2a37d..5f055d8 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/IAMCredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/IAMCredentials.php @@ -43,11 +43,13 @@ class IAMCredentials { if (!is_string($selector)) { throw new \InvalidArgumentException( - 'selector must be a string'); + 'selector must be a string' + ); } if (!is_string($token)) { throw new \InvalidArgumentException( - 'token must be a string'); + 'token must be a string' + ); } $this->selector = $selector; diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php index 1bab948..7d5096b 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php @@ -112,18 +112,21 @@ class ServiceAccountCredentials extends CredentialsLoader implements } if (!array_key_exists('client_email', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the client_email field'); + 'json key is missing the client_email field' + ); } if (!array_key_exists('private_key', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the private_key field'); + 'json key is missing the private_key field' + ); } if (array_key_exists('quota_project', $jsonKey)) { $this->quotaProject = (string) $jsonKey['quota_project']; } if ($scope && $targetAudience) { throw new InvalidArgumentException( - 'Scope and targetAudience cannot both be supplied'); + 'Scope and targetAudience cannot both be supplied' + ); } $additionalClaims = []; if ($targetAudience) { @@ -199,7 +202,6 @@ class ServiceAccountCredentials extends CredentialsLoader implements * @param array $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request - * * @return array updated metadata hashmap */ public function updateMetadata( diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php index b3a2517..0943ee7 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php @@ -71,11 +71,13 @@ class ServiceAccountJwtAccessCredentials extends CredentialsLoader implements } if (!array_key_exists('client_email', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the client_email field'); + 'json key is missing the client_email field' + ); } if (!array_key_exists('private_key', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the private_key field'); + 'json key is missing the private_key field' + ); } if (array_key_exists('quota_project', $jsonKey)) { $this->quotaProject = (string) $jsonKey['quota_project']; @@ -98,7 +100,6 @@ class ServiceAccountJwtAccessCredentials extends CredentialsLoader implements * @param array $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request - * * @return array updated metadata hashmap */ public function updateMetadata( diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/UserRefreshCredentials.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/UserRefreshCredentials.php index a42665d..cc1bbf1 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/UserRefreshCredentials.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Credentials/UserRefreshCredentials.php @@ -74,15 +74,18 @@ class UserRefreshCredentials extends CredentialsLoader implements GetQuotaProjec } if (!array_key_exists('client_id', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the client_id field'); + 'json key is missing the client_id field' + ); } if (!array_key_exists('client_secret', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the client_secret field'); + 'json key is missing the client_secret field' + ); } if (!array_key_exists('refresh_token', $jsonKey)) { throw new \InvalidArgumentException( - 'json key is missing the refresh_token field'); + 'json key is missing the refresh_token field' + ); } $this->auth = new OAuth2([ 'clientId' => $jsonKey['client_id'], @@ -109,7 +112,8 @@ class UserRefreshCredentials extends CredentialsLoader implements GetQuotaProjec . 'To disable this warning, set ' . self::SUPPRESS_CLOUD_SDK_CREDS_WARNING_ENV . ' environment variable to "true".', - E_USER_WARNING); + E_USER_WARNING + ); } } diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/CredentialsLoader.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/CredentialsLoader.php index a81d88f..fdc7d94 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/CredentialsLoader.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/CredentialsLoader.php @@ -61,7 +61,7 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface * variable GOOGLE_APPLICATION_CREDENTIALS. Return null if * GOOGLE_APPLICATION_CREDENTIALS is not specified. * - * @return array JSON key | null + * @return array|null JSON key | null */ public static function fromEnv() { @@ -81,12 +81,13 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface * Load a JSON key from a well known path. * * The well known path is OS dependent: - * - windows: %APPDATA%/gcloud/application_default_credentials.json - * - others: $HOME/.config/gcloud/application_default_credentials.json * - * If the file does not exists, this returns null. + * * windows: %APPDATA%/gcloud/application_default_credentials.json + * * others: $HOME/.config/gcloud/application_default_credentials.json * - * @return array JSON key | null + * If the file does not exist, this returns null. + * + * @return array|null JSON key | null */ public static function fromWellKnownFile() { @@ -108,9 +109,8 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface * Create a new Credentials instance. * * @param string|array $scope the scope of the access request, expressed - * either as an Array or as a space-delimited String. + * either as an Array or as a space-delimited String. * @param array $jsonKey the JSON credentials. - * * @return ServiceAccountCredentials|UserRefreshCredentials */ public static function makeCredentials($scope, array $jsonKey) @@ -134,10 +134,9 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface * Create an authorized HTTP Client from an instance of FetchAuthTokenInterface. * * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token - * @param array $httpClientOptoins (optional) Array of request options to apply. + * @param array $httpClientOptions (optional) Array of request options to apply. * @param callable $httpHandler (optional) http client to fetch the token. * @param callable $tokenCallback (optional) function to be called when a new token is fetched. - * * @return \GuzzleHttp\Client */ public static function makeHttpClient( @@ -203,7 +202,6 @@ abstract class CredentialsLoader implements FetchAuthTokenInterface * @param array $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request - * * @return array updated metadata hashmap */ public function updateMetadata( diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenCache.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenCache.php index 205ef66..c704c9a 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenCache.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenCache.php @@ -46,6 +46,11 @@ class FetchAuthTokenCache implements */ private $cache; + /** + * @param FetchAuthTokenInterface $fetcher A credentials fetcher + * @param array $cacheConfig Configuration for the cache + * @param CacheItemPoolInterface $cache + */ public function __construct( FetchAuthTokenInterface $fetcher, array $cacheConfig = null, @@ -66,9 +71,7 @@ class FetchAuthTokenCache implements * from the supplied fetcher. * * @param callable $httpHandler callback which delivers psr7 request - * * @return array the response - * * @throws \Exception */ public function fetchAuthToken(callable $httpHandler = null) @@ -125,14 +128,14 @@ class FetchAuthTokenCache implements * Sign a blob using the fetcher. * * @param string $stringToSign The string to sign. - * @param bool $forceOpenssl Require use of OpenSSL for local signing. Does + * @param bool $forceOpenSsl Require use of OpenSSL for local signing. Does * not apply to signing done using external services. **Defaults to** * `false`. * @return string The resulting signature. * @throws \RuntimeException If the fetcher does not implement * `Google\Auth\SignBlobInterface`. */ - public function signBlob($stringToSign, $forceOpenSsl = false) + public function signBlob($stringToSign, $forceOpenSsl = false) { if (!$this->fetcher instanceof SignBlobInterface) { throw new \RuntimeException( diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenInterface.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenInterface.php index e3d8d28..4bf4d27 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenInterface.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/FetchAuthTokenInterface.php @@ -26,7 +26,6 @@ interface FetchAuthTokenInterface * Fetches the auth tokens based on the current state. * * @param callable $httpHandler callback which delivers psr7 request - * * @return array a hash of auth tokens */ public function fetchAuthToken(callable $httpHandler = null); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle5HttpHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle5HttpHandler.php index b43fc22..18ba027 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle5HttpHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle5HttpHandler.php @@ -45,7 +45,6 @@ class Guzzle5HttpHandler * * @param RequestInterface $request * @param array $options - * * @return ResponseInterface */ public function __invoke(RequestInterface $request, array $options = []) @@ -62,7 +61,6 @@ class Guzzle5HttpHandler * * @param RequestInterface $request * @param array $options - * * @return Promise */ public function async(RequestInterface $request, array $options = []) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php index 6dfe9a8..ecf78e0 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php @@ -26,7 +26,6 @@ class Guzzle6HttpHandler * * @param RequestInterface $request * @param array $options - * * @return ResponseInterface */ public function __invoke(RequestInterface $request, array $options = []) @@ -40,7 +39,7 @@ class Guzzle6HttpHandler * @param RequestInterface $request * @param array $options * - * @return \GuzzleHttp\Promise\Promise + * @return \GuzzleHttp\Promise\PromiseInterface */ public function async(RequestInterface $request, array $options = []) { diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php index a109d59..aedb4c2 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/AuthTokenMiddleware.php @@ -89,7 +89,6 @@ class AuthTokenMiddleware * $res = $client->get('myproject/taskqueues/myqueue'); * * @param callable $handler - * * @return \Closure */ public function __invoke(callable $handler) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php index 55f04d1..ecbb659 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php @@ -76,7 +76,8 @@ class ScopedAccessTokenMiddleware $this->tokenFunc = $tokenFunc; if (!(is_string($scopes) || is_array($scopes))) { throw new \InvalidArgumentException( - 'wants scope should be string or array'); + 'wants scope should be string or array' + ); } $this->scopes = $scopes; @@ -119,7 +120,6 @@ class ScopedAccessTokenMiddleware * $res = $client->get('myproject/taskqueues/myqueue'); * * @param callable $handler - * * @return \Closure */ public function __invoke(callable $handler) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/SimpleMiddleware.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/SimpleMiddleware.php index c31fc65..5104542 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/SimpleMiddleware.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Middleware/SimpleMiddleware.php @@ -71,7 +71,6 @@ class SimpleMiddleware * $res = $client->get('drive/v2/rest'); * * @param callable $handler - * * @return \Closure */ public function __invoke(callable $handler) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/OAuth2.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/OAuth2.php index fa3f593..d3f2785 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/OAuth2.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/OAuth2.php @@ -120,7 +120,7 @@ class OAuth2 implements FetchAuthTokenInterface * The scope of the access request, expressed either as an Array or as a * space-delimited string. * - * @var string + * @var array */ private $scope; @@ -175,6 +175,13 @@ class OAuth2 implements FetchAuthTokenInterface */ private $signingKey; + /** + * The signing key id when using assertion profile. Param kid in jwt header + * + * @var string + */ + private $signingKeyId; + /** * The signing algorithm when using an assertion profile. * @@ -294,6 +301,9 @@ class OAuth2 implements FetchAuthTokenInterface * - signingKey * Signing key when using assertion profile * + * - signingKeyId + * Signing key id when using assertion profile + * * - refreshToken * The refresh token associated with the access token * to be refreshed. @@ -327,6 +337,7 @@ class OAuth2 implements FetchAuthTokenInterface 'sub' => null, 'audience' => null, 'signingKey' => null, + 'signingKeyId' => null, 'signingAlgorithm' => null, 'scope' => null, 'additionalClaims' => [], @@ -345,6 +356,7 @@ class OAuth2 implements FetchAuthTokenInterface $this->setExpiry($opts['expiry']); $this->setAudience($opts['audience']); $this->setSigningKey($opts['signingKey']); + $this->setSigningKeyId($opts['signingKeyId']); $this->setSigningAlgorithm($opts['signingAlgorithm']); $this->setScope($opts['scope']); $this->setExtensionParams($opts['extensionParams']); @@ -359,11 +371,21 @@ class OAuth2 implements FetchAuthTokenInterface * - if present, but invalid, raises DomainException. * - otherwise returns the payload in the idtoken as a PHP object. * - * if $publicKey is null, the key is decoded without being verified. + * The behavior of this method varies depending on the version of + * `firebase/php-jwt` you are using. In versions lower than 3.0.0, if + * `$publicKey` is null, the key is decoded without being verified. In + * newer versions, if a public key is not given, this method will throw an + * `\InvalidArgumentException`. * * @param string $publicKey The public key to use to authenticate the token * @param array $allowed_algs List of supported verification algorithms - * + * @throws \DomainException if the token is missing an audience. + * @throws \DomainException if the audience does not match the one set in + * the OAuth2 class instance. + * @throws \UnexpectedValueException If the token is invalid + * @throws SignatureInvalidException If the signature is invalid. + * @throws BeforeValidException If the token is not yet valid. + * @throws ExpiredException If the token has expired. * @return null|object */ public function verifyIdToken($publicKey = null, $allowed_algs = array()) @@ -388,7 +410,6 @@ class OAuth2 implements FetchAuthTokenInterface * Obtains the encoded jwt from the instance data. * * @param array $config array optional configuration parameters - * * @return string */ public function toJwt(array $config = []) @@ -424,8 +445,12 @@ class OAuth2 implements FetchAuthTokenInterface } $assertion += $this->getAdditionalClaims(); - return $this->jwtEncode($assertion, $this->getSigningKey(), - $this->getSigningAlgorithm()); + return $this->jwtEncode( + $assertion, + $this->getSigningKey(), + $this->getSigningAlgorithm(), + $this->getSigningKeyId() + ); } /** @@ -490,7 +515,6 @@ class OAuth2 implements FetchAuthTokenInterface * Fetches the auth tokens based on the current state. * * @param callable $httpHandler callback which delivers psr7 request - * * @return array the response */ public function fetchAuthToken(callable $httpHandler = null) @@ -515,10 +539,6 @@ class OAuth2 implements FetchAuthTokenInterface */ public function getCacheKey() { - if (is_string($this->scope)) { - return $this->scope; - } - if (is_array($this->scope)) { return implode(':', $this->scope); } @@ -531,9 +551,7 @@ class OAuth2 implements FetchAuthTokenInterface * Parses the fetched tokens. * * @param ResponseInterface $resp the response. - * * @return array the tokens parsed from the response body. - * * @throws \Exception */ public function parseTokenResponse(ResponseInterface $resp) @@ -559,12 +577,14 @@ class OAuth2 implements FetchAuthTokenInterface /** * Updates an OAuth 2.0 client. * - * @example - * client.updateToken([ + * Example: + * ``` + * $oauth->updateToken([ * 'refresh_token' => 'n4E9O119d', * 'access_token' => 'FJQbwq9', * 'expires_in' => 3600 - * ]) + * ]); + * ``` * * @param array $config * The configuration parameters related to the token. @@ -621,16 +641,15 @@ class OAuth2 implements FetchAuthTokenInterface * Builds the authorization Uri that the user should be redirected to. * * @param array $config configuration options that customize the return url - * * @return UriInterface the authorization Url. - * * @throws InvalidArgumentException */ public function buildFullAuthorizationUri(array $config = []) { if (is_null($this->getAuthorizationUri())) { throw new InvalidArgumentException( - 'requires an authorizationUri to have been set'); + 'requires an authorizationUri to have been set' + ); } $params = array_merge([ @@ -645,14 +664,16 @@ class OAuth2 implements FetchAuthTokenInterface // Validate the auth_params if (is_null($params['client_id'])) { throw new InvalidArgumentException( - 'missing the required client identifier'); + 'missing the required client identifier' + ); } if (is_null($params['redirect_uri'])) { throw new InvalidArgumentException('missing the required redirect URI'); } if (!empty($params['prompt']) && !empty($params['approval_prompt'])) { throw new InvalidArgumentException( - 'prompt and approval_prompt are mutually exclusive'); + 'prompt and approval_prompt are mutually exclusive' + ); } // Construct the uri object; return it if it is valid. @@ -665,7 +686,8 @@ class OAuth2 implements FetchAuthTokenInterface if ($result->getScheme() != 'https') { throw new InvalidArgumentException( - 'Authorization endpoint must be protected by TLS'); + 'Authorization endpoint must be protected by TLS' + ); } return $result; @@ -743,7 +765,8 @@ class OAuth2 implements FetchAuthTokenInterface // @see https://developers.google.com/identity/sign-in/web/server-side-flow if ('postmessage' !== (string)$uri) { throw new InvalidArgumentException( - 'Redirect URI must be absolute'); + 'Redirect URI must be absolute' + ); } } $this->redirectUri = (string)$uri; @@ -768,7 +791,6 @@ class OAuth2 implements FetchAuthTokenInterface * a space-delimited String. * * @param string|array $scope - * * @throws InvalidArgumentException */ public function setScope($scope) @@ -782,13 +804,15 @@ class OAuth2 implements FetchAuthTokenInterface $pos = strpos($s, ' '); if ($pos !== false) { throw new InvalidArgumentException( - 'array scope values should not contain spaces'); + 'array scope values should not contain spaces' + ); } } $this->scope = $scope; } else { throw new InvalidArgumentException( - 'scopes should be a string or array of strings'); + 'scopes should be a string or array of strings' + ); } } @@ -828,7 +852,6 @@ class OAuth2 implements FetchAuthTokenInterface * Sets the current grant type. * * @param $grantType - * * @throws InvalidArgumentException */ public function setGrantType($grantType) @@ -839,7 +862,8 @@ class OAuth2 implements FetchAuthTokenInterface // validate URI if (!$this->isAbsoluteUri($grantType)) { throw new InvalidArgumentException( - 'invalid grant type'); + 'invalid grant type' + ); } $this->grantType = (string)$grantType; } @@ -1031,6 +1055,26 @@ class OAuth2 implements FetchAuthTokenInterface $this->signingKey = $signingKey; } + /** + * Gets the signing key id when using an assertion profile. + * + * @return string + */ + public function getSigningKeyId() + { + return $this->signingKeyId; + } + + /** + * Sets the signing key id when using an assertion profile. + * + * @param string $signingKeyId + */ + public function setSigningKeyId($signingKeyId) + { + $this->signingKeyId = $signingKeyId; + } + /** * Gets the signing algorithm when using an assertion profile. * @@ -1287,7 +1331,6 @@ class OAuth2 implements FetchAuthTokenInterface * @todo handle uri as array * * @param string $uri - * * @return null|UriInterface */ private function coerceUri($uri) @@ -1303,7 +1346,6 @@ class OAuth2 implements FetchAuthTokenInterface * @param string $idToken * @param string|array|null $publicKey * @param array $allowedAlgs - * * @return object */ private function jwtDecode($idToken, $publicKey, $allowedAlgs) @@ -1315,14 +1357,18 @@ class OAuth2 implements FetchAuthTokenInterface return \JWT::decode($idToken, $publicKey, $allowedAlgs); } - private function jwtEncode($assertion, $signingKey, $signingAlgorithm) + private function jwtEncode($assertion, $signingKey, $signingAlgorithm, $signingKeyId = null) { if (class_exists('Firebase\JWT\JWT')) { - return \Firebase\JWT\JWT::encode($assertion, $signingKey, - $signingAlgorithm); + return \Firebase\JWT\JWT::encode( + $assertion, + $signingKey, + $signingAlgorithm, + $signingKeyId + ); } - return \JWT::encode($assertion, $signingKey, $signingAlgorithm); + return \JWT::encode($assertion, $signingKey, $signingAlgorithm, $signingKeyId); } /** @@ -1330,7 +1376,6 @@ class OAuth2 implements FetchAuthTokenInterface * (RFC 3986). * * @param string $uri - * * @return bool */ private function isAbsoluteUri($uri) @@ -1342,7 +1387,6 @@ class OAuth2 implements FetchAuthTokenInterface /** * @param array $params - * * @return array */ private function addClientCredentials(&$params) diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php index 85e2103..bc529d2 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php @@ -79,21 +79,24 @@ class AuthTokenSubscriber implements SubscriberInterface /** * Updates the request with an Authorization header when auth is 'fetched_auth_token'. * - * use GuzzleHttp\Client; - * use Google\Auth\OAuth2; - * use Google\Auth\Subscriber\AuthTokenSubscriber; + * Example: + * ``` + * use GuzzleHttp\Client; + * use Google\Auth\OAuth2; + * use Google\Auth\Subscriber\AuthTokenSubscriber; * - * $config = [...]; - * $oauth2 = new OAuth2($config) - * $subscriber = new AuthTokenSubscriber($oauth2); + * $config = [...]; + * $oauth2 = new OAuth2($config) + * $subscriber = new AuthTokenSubscriber($oauth2); * - * $client = new Client([ - * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', - * 'defaults' => ['auth' => 'google_auth'] - * ]); - * $client->getEmitter()->attach($subscriber); + * $client = new Client([ + * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', + * 'defaults' => ['auth' => 'google_auth'] + * ]); + * $client->getEmitter()->attach($subscriber); * - * $res = $client->get('myproject/taskqueues/myqueue'); + * $res = $client->get('myproject/taskqueues/myqueue'); + * ``` * * @param BeforeEvent $event */ diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php index 63b4ca2..a52dcce 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php @@ -78,7 +78,8 @@ class ScopedAccessTokenSubscriber implements SubscriberInterface $this->tokenFunc = $tokenFunc; if (!(is_string($scopes) || is_array($scopes))) { throw new \InvalidArgumentException( - 'wants scope should be string or array'); + 'wants scope should be string or array' + ); } $this->scopes = $scopes; @@ -102,28 +103,30 @@ class ScopedAccessTokenSubscriber implements SubscriberInterface /** * Updates the request with an Authorization header when auth is 'scoped'. * - * E.g this could be used to authenticate using the AppEngine - * AppIdentityService. + * E.g this could be used to authenticate using the AppEngine AppIdentityService. * - * use google\appengine\api\app_identity\AppIdentityService; - * use Google\Auth\Subscriber\ScopedAccessTokenSubscriber; - * use GuzzleHttp\Client; + * Example: + * ``` + * use google\appengine\api\app_identity\AppIdentityService; + * use Google\Auth\Subscriber\ScopedAccessTokenSubscriber; + * use GuzzleHttp\Client; * - * $scope = 'https://www.googleapis.com/auth/taskqueue' - * $subscriber = new ScopedAccessToken( - * 'AppIdentityService::getAccessToken', - * $scope, - * ['prefix' => 'Google\Auth\ScopedAccessToken::'], - * $cache = new Memcache() - * ); + * $scope = 'https://www.googleapis.com/auth/taskqueue' + * $subscriber = new ScopedAccessToken( + * 'AppIdentityService::getAccessToken', + * $scope, + * ['prefix' => 'Google\Auth\ScopedAccessToken::'], + * $cache = new Memcache() + * ); * - * $client = new Client([ - * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', - * 'defaults' => ['auth' => 'scoped'] - * ]); - * $client->getEmitter()->attach($subscriber); + * $client = new Client([ + * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', + * 'defaults' => ['auth' => 'scoped'] + * ]); + * $client->getEmitter()->attach($subscriber); * - * $res = $client->get('myproject/taskqueues/myqueue'); + * $res = $client->get('myproject/taskqueues/myqueue'); + * ``` * * @param BeforeEvent $event */ diff --git a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/SimpleSubscriber.php b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/SimpleSubscriber.php index 0c56731..a881eb1 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/SimpleSubscriber.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/google/auth/src/Subscriber/SimpleSubscriber.php @@ -62,19 +62,22 @@ class SimpleSubscriber implements SubscriberInterface /** * Updates the request query with the developer key if auth is set to simple. * - * use Google\Auth\Subscriber\SimpleSubscriber; - * use GuzzleHttp\Client; + * Example: + * ``` + * use Google\Auth\Subscriber\SimpleSubscriber; + * use GuzzleHttp\Client; * - * $my_key = 'is not the same as yours'; - * $subscriber = new SimpleSubscriber(['key' => $my_key]); + * $my_key = 'is not the same as yours'; + * $subscriber = new SimpleSubscriber(['key' => $my_key]); * - * $client = new Client([ - * 'base_url' => 'https://www.googleapis.com/discovery/v1/', - * 'defaults' => ['auth' => 'simple'] - * ]); - * $client->getEmitter()->attach($subscriber); + * $client = new Client([ + * 'base_url' => 'https://www.googleapis.com/discovery/v1/', + * 'defaults' => ['auth' => 'simple'] + * ]); + * $client->getEmitter()->attach($subscriber); * - * $res = $client->get('drive/v2/rest'); + * $res = $client->get('drive/v2/rest'); + * ``` * * @param BeforeEvent $event */ diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Client.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Client.php index 0f43c71..315a022 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Client.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Client.php @@ -2,11 +2,12 @@ namespace GuzzleHttp; use GuzzleHttp\Cookie\CookieJar; +use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Promise; use GuzzleHttp\Psr7; -use Psr\Http\Message\UriInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\UriInterface; /** * @method ResponseInterface get(string|UriInterface $uri, array $options = []) @@ -46,9 +47,8 @@ class Client implements ClientInterface * wire. The function is called with a Psr7\Http\Message\RequestInterface * and array of transfer options, and must return a * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a - * Psr7\Http\Message\ResponseInterface on success. "handler" is a - * constructor only option that cannot be overridden in per/request - * options. If no handler is provided, a default handler will be created + * Psr7\Http\Message\ResponseInterface on success. + * If no handler is provided, a default handler will be created * that enables all of the request options below by attaching all of the * default middleware to the handler. * - base_uri: (string|UriInterface) Base URI of the client that is merged @@ -75,6 +75,12 @@ class Client implements ClientInterface $this->configureDefaults($config); } + /** + * @param string $method + * @param array $args + * + * @return Promise\PromiseInterface + */ public function __call($method, $args) { if (count($args) < 1) { @@ -89,6 +95,14 @@ class Client implements ClientInterface : $this->request($method, $uri, $opts); } + /** + * Asynchronously send an HTTP request. + * + * @param array $options Request options to apply to the given + * request and to the transfer. See \GuzzleHttp\RequestOptions. + * + * @return Promise\PromiseInterface + */ public function sendAsync(RequestInterface $request, array $options = []) { // Merge the base URI into the request URI if needed. @@ -100,12 +114,35 @@ class Client implements ClientInterface ); } + /** + * Send an HTTP request. + * + * @param array $options Request options to apply to the given + * request and to the transfer. See \GuzzleHttp\RequestOptions. + * + * @return ResponseInterface + * @throws GuzzleException + */ public function send(RequestInterface $request, array $options = []) { $options[RequestOptions::SYNCHRONOUS] = true; return $this->sendAsync($request, $options)->wait(); } + /** + * Create and send an asynchronous HTTP request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. Use an array to provide a URL + * template and additional variables to use in the URL template expansion. + * + * @param string $method HTTP method + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. + * + * @return Promise\PromiseInterface + */ public function requestAsync($method, $uri = '', array $options = []) { $options = $this->prepareDefaults($options); @@ -125,12 +162,37 @@ class Client implements ClientInterface return $this->transfer($request, $options); } + /** + * Create and send an HTTP request. + * + * Use an absolute path to override the base path of the client, or a + * relative path to append to the base path of the client. The URL can + * contain the query string as well. + * + * @param string $method HTTP method. + * @param string|UriInterface $uri URI object or string. + * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. + * + * @return ResponseInterface + * @throws GuzzleException + */ public function request($method, $uri = '', array $options = []) { $options[RequestOptions::SYNCHRONOUS] = true; return $this->requestAsync($method, $uri, $options)->wait(); } + /** + * Get a client configuration option. + * + * These options include default request options of the client, a "handler" + * (if utilized by the concrete client), and a "base_uri" if utilized by + * the concrete client. + * + * @param string|null $option The config option to retrieve. + * + * @return mixed + */ public function getConfig($option = null) { return $option === null @@ -138,6 +200,11 @@ class Client implements ClientInterface : (isset($this->config[$option]) ? $this->config[$option] : null); } + /** + * @param string|null $uri + * + * @return UriInterface + */ private function buildUri($uri, array $config) { // for BC we accept null which would otherwise fail in uri_for @@ -147,6 +214,11 @@ class Client implements ClientInterface $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); } + if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) { + $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion']; + $uri = Utils::idnUriConvert($uri, $idnOptions); + } + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; } @@ -154,6 +226,7 @@ class Client implements ClientInterface * Configures the default options for a client. * * @param array $config + * @return void */ private function configureDefaults(array $config) { @@ -162,7 +235,8 @@ class Client implements ClientInterface 'http_errors' => true, 'decode_content' => true, 'verify' => true, - 'cookies' => false + 'cookies' => false, + 'idn_conversion' => true, ]; // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. @@ -170,7 +244,7 @@ class Client implements ClientInterface // We can only trust the HTTP_PROXY environment variable in a CLI // process due to the fact that PHP has no reliable mechanism to // get environment variables that start with "HTTP_". - if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) { + if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) { $defaults['proxy']['http'] = getenv('HTTP_PROXY'); } @@ -225,7 +299,7 @@ class Client implements ClientInterface if (array_key_exists('headers', $options)) { // Allows default headers to be unset. if ($options['headers'] === null) { - $defaults['_conditional'] = null; + $defaults['_conditional'] = []; unset($options['headers']); } elseif (!is_array($options['headers'])) { throw new \InvalidArgumentException('headers must be an array'); @@ -251,8 +325,7 @@ class Client implements ClientInterface * The URI of the request is not modified and the request options are used * as-is without merging in default options. * - * @param RequestInterface $request - * @param array $options + * @param array $options See \GuzzleHttp\RequestOptions. * * @return Promise\PromiseInterface */ @@ -271,6 +344,7 @@ class Client implements ClientInterface } $request = $this->applyOptions($request, $options); + /** @var HandlerStack $handler */ $handler = $options['handler']; try { @@ -411,6 +485,11 @@ class Client implements ClientInterface return $request; } + /** + * Throw Exception with pre-set message. + * @return void + * @throws \InvalidArgumentException Invalid body. + */ private function invalidBody() { throw new \InvalidArgumentException('Passing in the "body" request ' diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/ClientInterface.php index 5b37085..54c759b 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -1,8 +1,8 @@ cookies as $cookie) { @@ -103,6 +103,8 @@ class CookieJar implements CookieJarInterface return $cookie; } } + + return null; } public function toArray() diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php index 2cf298a..6ee1188 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -58,9 +58,9 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * arguments, then the cookie with the specified name, path and domain is * removed. * - * @param string $domain Clears cookies matching a domain - * @param string $path Clears cookies matching a domain and path - * @param string $name Clears cookies matching a domain, path, and name + * @param string|null $domain Clears cookies matching a domain + * @param string|null $path Clears cookies matching a domain and path + * @param string|null $name Clears cookies matching a domain, path, and name * * @return CookieJarInterface */ diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php index f38ca86..12dd081 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php @@ -1,9 +1,9 @@ getBody(); - - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - - $size = $body->getSize(); - - if ($size === 0) { - return null; - } - - $summary = $body->read(120); - $body->rewind(); - - if ($size > 120) { - $summary .= ' (truncated...)'; - } - - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { - return null; - } - - return $summary; + return \GuzzleHttp\Psr7\get_message_body_summary($response); } /** - * Obfuscates URI if there is an username and a password present + * Obfuscates URI if there is a username and a password present * * @param UriInterface $uri * * @return UriInterface */ - private static function obfuscateUri($uri) + private static function obfuscateUri(UriInterface $uri) { $userInfo = $uri->getUserInfo(); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php index e349bb4..4a28a96 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php @@ -1,8 +1,8 @@ selectTimeout = 1; } + + $this->options = isset($options['options']) ? $options['options'] : []; } public function __get($name) { if ($name === '_mh') { - return $this->_mh = curl_multi_init(); + $this->_mh = curl_multi_init(); + + foreach ($this->options as $option => $value) { + // A warning is raised in case of a wrong option. + curl_multi_setopt($this->_mh, $option, $value); + } + + // Further calls to _mh will return the value directly, without entering the + // __get() method at all. + return $this->_mh; } throw new \BadMethodCallException(); @@ -88,7 +102,7 @@ class CurlMultiHandler { // Add any delayed handles if needed. if ($this->delays) { - $currentTime = \GuzzleHttp\_current_time(); + $currentTime = Utils::currentTime(); foreach ($this->delays as $id => $delay) { if ($currentTime >= $delay) { unset($this->delays[$id]); @@ -140,7 +154,7 @@ class CurlMultiHandler if (empty($easy->options['delay'])) { curl_multi_add_handle($this->_mh, $easy->handle); } else { - $this->delays[$id] = \GuzzleHttp\_current_time() + ($easy->options['delay'] / 1000); + $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000); } } @@ -192,7 +206,7 @@ class CurlMultiHandler private function timeToNext() { - $currentTime = \GuzzleHttp\_current_time(); + $currentTime = Utils::currentTime(); $nextTime = PHP_INT_MAX; foreach ($this->delays as $time) { if ($time < $nextTime) { diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php index d5c449c..5b312bc 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -66,7 +66,7 @@ class MockHandler implements \Countable throw new \OutOfBoundsException('Mock queue is empty'); } - if (isset($options['delay'])) { + if (isset($options['delay']) && is_numeric($options['delay'])) { usleep($options['delay'] * 1000); } @@ -175,6 +175,11 @@ class MockHandler implements \Countable return count($this->queue); } + public function reset() + { + $this->queue = []; + } + private function invokeStats( RequestInterface $request, array $options, diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php index 0dedd7d..a15734a 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -1,12 +1,13 @@ each = new EachPromise($requests(), $config); } + /** + * Get promise + * + * @return PromiseInterface + */ public function promise() { return $this->each->promise(); @@ -106,6 +112,11 @@ class Pool implements PromisorInterface return $res; } + /** + * Execute callback(s) + * + * @return void + */ private static function cmpCallback(array &$options, $name, array &$results) { if (!isset($options[$name])) { diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php index 2eb95f9..568a1e9 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -66,6 +66,11 @@ class PrepareBodyMiddleware return $fn(Psr7\modify_request($request, $modify), $options); } + /** + * Add expect header + * + * @return void + */ private function addExpectHeader( RequestInterface $request, array $options, diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php index bff4e4e..e4644b7 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -13,7 +13,7 @@ use Psr\Http\Message\UriInterface; * Request redirect middleware. * * Apply this middleware like other middleware using - * {@see GuzzleHttp\Middleware::redirect()}. + * {@see \GuzzleHttp\Middleware::redirect()}. */ class RedirectMiddleware { @@ -76,7 +76,7 @@ class RedirectMiddleware /** * @param RequestInterface $request * @param array $options - * @param ResponseInterface|PromiseInterface $response + * @param ResponseInterface $response * * @return ResponseInterface|PromiseInterface */ @@ -118,6 +118,11 @@ class RedirectMiddleware return $promise; } + /** + * Enable tracking on promise. + * + * @return PromiseInterface + */ private function withTracking(PromiseInterface $promise, $uri, $statusCode) { return $promise->then( @@ -135,6 +140,13 @@ class RedirectMiddleware ); } + /** + * Check for too many redirects + * + * @return void + * + * @throws TooManyRedirectsException Too many redirects. + */ private function guardMax(RequestInterface $request, array &$options) { $current = isset($options['__redirect_count']) @@ -172,13 +184,19 @@ class RedirectMiddleware // would do. $statusCode = $response->getStatusCode(); if ($statusCode == 303 || - ($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) + ($statusCode <= 302 && !$options['allow_redirects']['strict']) ) { $modify['method'] = 'GET'; $modify['body'] = ''; } - $modify['uri'] = $this->redirectUri($request, $response, $protocols); + $uri = $this->redirectUri($request, $response, $protocols); + if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { + $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion']; + $uri = Utils::idnUriConvert($uri, $idnOptions); + } + + $modify['uri'] = $uri; Psr7\rewind_body($request); // Add the Referer header if it is told to do so and only diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RequestOptions.php index 5c0fd19..355f658 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -132,6 +132,14 @@ final class RequestOptions */ const HTTP_ERRORS = 'http_errors'; + /** + * idn: (bool|int, default=true) A combination of IDNA_* constants for + * idn_to_ascii() PHP's function (see "options" parameter). Set to false to + * disable IDN support completely, or to true to use the default + * configuration (IDNA_DEFAULT constant). + */ + const IDN_CONVERSION = 'idn_conversion'; + /** * json: (mixed) Adds JSON data to a request. The provided value is JSON * encoded and a Content-Type header of application/json will be added to diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php index 7d40eca..5acc8c5 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php @@ -47,11 +47,11 @@ class RetryMiddleware * * @param int $retries * - * @return int + * @return int milliseconds. */ public static function exponentialDelay($retries) { - return (int) pow(2, $retries - 1); + return (int) pow(2, $retries - 1) * 1000; } /** @@ -74,6 +74,11 @@ class RetryMiddleware ); } + /** + * Execute fulfilled closure + * + * @return mixed + */ private function onFulfilled(RequestInterface $req, array $options) { return function ($value) use ($req, $options) { @@ -90,6 +95,11 @@ class RetryMiddleware }; } + /** + * Execute rejected closure + * + * @return callable + */ private function onRejected(RequestInterface $req, array $options) { return function ($reason) use ($req, $options) { @@ -106,6 +116,9 @@ class RetryMiddleware }; } + /** + * @return self + */ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) { $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/TransferStats.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/TransferStats.php index 23a22a3..87fb3c0 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -18,11 +18,11 @@ final class TransferStats private $handlerErrorData; /** - * @param RequestInterface $request Request that was sent. - * @param ResponseInterface $response Response received (if any) - * @param float|null $transferTime Total handler transfer time. - * @param mixed $handlerErrorData Handler error data. - * @param array $handlerStats Handler specific stats. + * @param RequestInterface $request Request that was sent. + * @param ResponseInterface|null $response Response received (if any) + * @param float|null $transferTime Total handler transfer time. + * @param mixed $handlerErrorData Handler error data. + * @param array $handlerStats Handler specific stats. */ public function __construct( RequestInterface $request, @@ -93,7 +93,7 @@ final class TransferStats /** * Get the estimated time the request was being transferred by the handler. * - * @return float Time in seconds. + * @return float|null Time in seconds. */ public function getTransferTime() { diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Utils.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Utils.php new file mode 100644 index 0000000..dd90c22 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/Utils.php @@ -0,0 +1,89 @@ +getHost()) { + $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); + if ($asciiHost === false) { + $errorBitSet = isset($info['errors']) ? $info['errors'] : 0; + + $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) { + return substr($name, 0, 11) === 'IDNA_ERROR_'; + }); + + $errors = []; + foreach ($errorConstants as $errorConstant) { + if ($errorBitSet & constant($errorConstant)) { + $errors[] = $errorConstant; + } + } + + $errorMessage = 'IDN conversion failed'; + if ($errors) { + $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; + } + + throw new InvalidArgumentException($errorMessage); + } else { + if ($uri->getHost() !== $asciiHost) { + // Replace URI only if the ASCII version is different + $uri = $uri->withHost($asciiHost); + } + } + } + + return $uri; + } + + /** + * @param string $domain + * @param int $options + * @param array $info + * + * @return string|false + */ + private static function idnToAsci($domain, $options, &$info = []) + { + if (\preg_match('%^[ -~]+$%', $domain) === 1) { + return $domain; + } + + if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) { + return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info); + } + + /* + * The Idn class is marked as @internal. We've locked the version to + * symfony/polyfill-intl-idn to avoid issues in the future. + */ + return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/functions.php b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/functions.php index 51d736d..c2afd8c 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/functions.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/guzzle/src/functions.php @@ -56,7 +56,7 @@ function describe_type($input) /** * Parses an array of header lines into an associative array of headers. * - * @param array $lines Header lines array of strings in the following + * @param iterable $lines Header lines array of strings in the following * format: "Name: Value" * @return array */ @@ -97,8 +97,8 @@ function debug_resource($value = null) * * The returned handler is not wrapped by any default middlewares. * - * @throws \RuntimeException if no viable Handler is available. * @return callable Returns the best handler for the given system. + * @throws \RuntimeException if no viable Handler is available. */ function choose_handler() { @@ -332,15 +332,3 @@ function json_encode($value, $options = 0, $depth = 512) return $json; } - -/** - * Wrapper for the hrtime() or microtime() functions - * (depending on the PHP version, one of the two is used) - * - * @return float|mixed UNIX timestamp - * @internal - */ -function _current_time() -{ - return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true); -} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/ErrorHandler.php index adc55bd..36ec009 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -14,7 +14,6 @@ namespace Monolog; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Monolog\Handler\AbstractHandler; -use Monolog\Registry; /** * Monolog error handler diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php index 61861c8..3a01f2c 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -142,8 +142,12 @@ class NormalizerFormatter implements FormatterInterface $data['faultactor'] = $e->faultactor; } - if (isset($e->detail) && (is_string($e->detail) || is_object($e->detail) || is_array($e->detail))) { - $data['detail'] = is_string($e->detail) ? $e->detail : reset($e->detail); + if (isset($e->detail)) { + if (is_string($e->detail)) { + $data['detail'] = $e->detail; + } elseif (is_object($e->detail) || is_array($e->detail)) { + $data['detail'] = $this->toJson($e->detail, true); + } } } diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php index 92b9d45..cdd9f7d 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php @@ -33,8 +33,8 @@ abstract class AbstractHandler implements HandlerInterface, ResettableInterface protected $processors = array(); /** - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int|string $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($level = Logger::DEBUG, $bubble = true) { diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php index ae2309f..b8253ba 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; /** * Stores logs to files that are rotated every day and a limited number of files are kept. @@ -45,7 +46,7 @@ class RotatingFileHandler extends StreamHandler */ public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) { - $this->filename = $filename; + $this->filename = Utils::canonicalizePath($filename); $this->maxFiles = (int) $maxFiles; $this->nextRotation = new \DateTime('tomorrow'); $this->filenameFormat = '{filename}-{date}'; diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php index 27d90e0..7c0dfd2 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -12,6 +12,7 @@ namespace Monolog\Handler; use Monolog\Logger; +use Monolog\Utils; /** * Stores to any stream resource @@ -45,7 +46,7 @@ class StreamHandler extends AbstractProcessingHandler if (is_resource($stream)) { $this->stream = $stream; } elseif (is_string($stream)) { - $this->url = $stream; + $this->url = Utils::canonicalizePath($stream); } else { throw new \InvalidArgumentException('A stream must either be a resource or a string.'); } diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php index 9fc3f50..cdf5ec7 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php @@ -52,7 +52,7 @@ class GitProcessor implements ProcessorInterface } $branches = `git branch -v --no-abbrev`; - if (preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { + if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { return self::$cache = array( 'branch' => $matches[1], 'commit' => $matches[2], diff --git a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Utils.php b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Utils.php index 180a159..712b196 100644 --- a/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Utils.php +++ b/wp-content/plugins/wp-mail-smtp/vendor/monolog/monolog/src/Monolog/Utils.php @@ -23,6 +23,36 @@ class Utils return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class; } + /** + * Makes sure if a relative path is passed in it is turned into an absolute path + * + * @param string $streamUrl stream URL or path without protocol + * + * @return string + */ + public static function canonicalizePath($streamUrl) + { + $prefix = ''; + if ('file://' === substr($streamUrl, 0, 7)) { + $streamUrl = substr($streamUrl, 7); + $prefix = 'file://'; + } + + // other type of stream, not supported + if (false !== strpos($streamUrl, '://')) { + return $streamUrl; + } + + // already absolute + if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { + return $prefix.$streamUrl; + } + + $streamUrl = getcwd() . '/' . $streamUrl; + + return $prefix.$streamUrl; + } + /** * Return the JSON representation of a value * diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/Idn.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/Idn.php new file mode 100644 index 0000000..f54ffd5 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/Idn.php @@ -0,0 +1,287 @@ + + * @author Sebastian Kroczek + * @author Dmitry Lukashin + * @author Laurent Bassin + * + * @internal + */ +final class Idn +{ + const INTL_IDNA_VARIANT_2003 = 0; + const INTL_IDNA_VARIANT_UTS46 = 1; + + private static $encodeTable = array( + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + ); + + private static $decodeTable = array( + 'a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, + 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, + 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, + 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, + 'y' => 24, 'z' => 25, '0' => 26, '1' => 27, '2' => 28, '3' => 29, + '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35, + ); + + public static function idn_to_ascii($domain, $options, $variant, &$idna_info = array()) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED); + } + + if (self::INTL_IDNA_VARIANT_UTS46 === $variant) { + $domain = mb_strtolower($domain, 'utf-8'); + } + + $parts = explode('.', $domain); + + foreach ($parts as $i => &$part) { + if ('' === $part && \count($parts) > 1 + $i) { + return false; + } + if (false === $part = self::encodePart($part)) { + return false; + } + } + + $output = implode('.', $parts); + + $idna_info = array( + 'result' => \strlen($output) > 255 ? false : $output, + 'isTransitionalDifferent' => false, + 'errors' => 0, + ); + + return $idna_info['result']; + } + + public static function idn_to_utf8($domain, $options, $variant, &$idna_info = array()) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED); + } + + $parts = explode('.', $domain); + + foreach ($parts as &$part) { + $length = \strlen($part); + if ($length < 1 || 63 < $length) { + continue; + } + if (0 !== strpos($part, 'xn--')) { + continue; + } + + $part = substr($part, 4); + $part = self::decodePart($part); + } + + $output = implode('.', $parts); + + $idna_info = array( + 'result' => \strlen($output) > 255 ? false : $output, + 'isTransitionalDifferent' => false, + 'errors' => 0, + ); + + return $idna_info['result']; + } + + private static function encodePart($input) + { + if (\substr($input, 0, 1) === '-' || \substr($input, -1) === '-') { + return false; + } + + $codePoints = self::listCodePoints($input); + + $n = 128; + $bias = 72; + $delta = 0; + $h = $b = \count($codePoints['basic']); + + $output = ''; + foreach ($codePoints['basic'] as $code) { + $output .= mb_chr($code, 'utf-8'); + } + if ($input === $output) { + return $output; + } + if ($b > 0) { + $output .= '-'; + } + + $codePoints['nonBasic'] = array_unique($codePoints['nonBasic']); + sort($codePoints['nonBasic']); + + $i = 0; + $length = mb_strlen($input, 'utf-8'); + while ($h < $length) { + $m = $codePoints['nonBasic'][$i++]; + $delta += ($m - $n) * ($h + 1); + $n = $m; + + foreach ($codePoints['all'] as $c) { + if ($c < $n || $c < 128) { + ++$delta; + } + if ($c === $n) { + $q = $delta; + for ($k = 36;; $k += 36) { + $t = self::calculateThreshold($k, $bias); + if ($q < $t) { + break; + } + + $code = $t + (($q - $t) % (36 - $t)); + $output .= self::$encodeTable[$code]; + + $q = ($q - $t) / (36 - $t); + } + + $output .= self::$encodeTable[$q]; + $bias = self::adapt($delta, $h + 1, ($h === $b)); + $delta = 0; + ++$h; + } + } + + ++$delta; + ++$n; + } + + $output = 'xn--'.$output; + + return \strlen($output) < 1 || 63 < \strlen($output) ? false : strtolower($output); + } + + private static function listCodePoints($input) + { + $codePoints = array( + 'all' => array(), + 'basic' => array(), + 'nonBasic' => array(), + ); + + $length = mb_strlen($input, 'utf-8'); + for ($i = 0; $i < $length; ++$i) { + $char = mb_substr($input, $i, 1, 'utf-8'); + $code = mb_ord($char, 'utf-8'); + if ($code < 128) { + $codePoints['all'][] = $codePoints['basic'][] = $code; + } else { + $codePoints['all'][] = $codePoints['nonBasic'][] = $code; + } + } + + return $codePoints; + } + + private static function calculateThreshold($k, $bias) + { + if ($k <= $bias + 1) { + return 1; + } + if ($k >= $bias + 26) { + return 26; + } + + return $k - $bias; + } + + private static function adapt($delta, $numPoints, $firstTime) + { + $delta = (int) ($firstTime ? $delta / 700 : $delta / 2); + $delta += (int) ($delta / $numPoints); + + $k = 0; + while ($delta > 35 * 13) { + $delta = (int) ($delta / 35); + $k = $k + 36; + } + + return $k + (int) (36 * $delta / ($delta + 38)); + } + + private static function decodePart($input) + { + $n = 128; + $i = 0; + $bias = 72; + $output = ''; + + $pos = strrpos($input, '-'); + if (false !== $pos) { + $output = substr($input, 0, $pos++); + } else { + $pos = 0; + } + + $outputLength = \strlen($output); + $inputLength = \strlen($input); + + while ($pos < $inputLength) { + $oldi = $i; + $w = 1; + + for ($k = 36;; $k += 36) { + $digit = self::$decodeTable[$input[$pos++]]; + $i += $digit * $w; + $t = self::calculateThreshold($k, $bias); + + if ($digit < $t) { + break; + } + + $w *= 36 - $t; + } + + $bias = self::adapt($i - $oldi, ++$outputLength, 0 === $oldi); + $n = $n + (int) ($i / $outputLength); + $i = $i % $outputLength; + $output = mb_substr($output, 0, $i, 'utf-8').mb_chr($n, 'utf-8').mb_substr($output, $i, $outputLength - 1, 'utf-8'); + + ++$i; + } + + return $output; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/LICENSE b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/LICENSE new file mode 100644 index 0000000..3f853aa --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/bootstrap.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/bootstrap.php new file mode 100644 index 0000000..f02d5de --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-intl-idn/bootstrap.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (extension_loaded('intl')) { + return; +} + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_2003')) { + define('INTL_IDNA_VARIANT_2003', 0); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (PHP_VERSION_ID < 70400) { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); } + } +} else { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/LICENSE b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Mbstring.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..15503bc --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,847 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + trigger_error('The length of each segment must be greater than zero', E_USER_WARNING); + + return false; + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + } + + $result = array(); + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..e6fbfa6 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1096 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', +); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', +); diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/bootstrap.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..b36a092 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } +} +if (!function_exists('mb_language')) { + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } +} +if (!function_exists('mb_substr')) { + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } +} +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_ord')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } +} +if (!function_exists('mb_chr')) { + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/LICENSE b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/LICENSE new file mode 100644 index 0000000..4cd8bdd --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/Php72.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/Php72.php new file mode 100644 index 0000000..9b3edc7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/Php72.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php72; + +/** + * @author Nicolas Grekas + * @author Dariusz Rumiński + * + * @internal + */ +final class Php72 +{ + private static $hashMask; + + public static function utf8_encode($s) + { + $s .= $s; + $len = \strlen($s); + + for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { + switch (true) { + case $s[$i] < "\x80": $s[$j] = $s[$i]; break; + case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; + default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; + } + } + + return substr($s, 0, $j); + } + + public static function utf8_decode($s) + { + $s = (string) $s; + $len = \strlen($s); + + for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { + switch ($s[$i] & "\xF0") { + case "\xC0": + case "\xD0": + $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); + $s[$j] = $c < 256 ? \chr($c) : '?'; + break; + + case "\xF0": + ++$i; + // no break + + case "\xE0": + $s[$j] = '?'; + $i += 2; + break; + + default: + $s[$j] = $s[$i]; + } + } + + return substr($s, 0, $j); + } + + public static function php_os_family() + { + if ('\\' === \DIRECTORY_SEPARATOR) { + return 'Windows'; + } + + $map = array( + 'Darwin' => 'Darwin', + 'DragonFly' => 'BSD', + 'FreeBSD' => 'BSD', + 'NetBSD' => 'BSD', + 'OpenBSD' => 'BSD', + 'Linux' => 'Linux', + 'SunOS' => 'Solaris', + ); + + return isset($map[PHP_OS]) ? $map[PHP_OS] : 'Unknown'; + } + + public static function spl_object_id($object) + { + if (null === self::$hashMask) { + self::initHashMask(); + } + if (null === $hash = spl_object_hash($object)) { + return; + } + + // On 32-bit systems, PHP_INT_SIZE is 4, + return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + } + + public static function sapi_windows_vt100_support($stream, $enable = null) + { + if (!\is_resource($stream)) { + trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', E_USER_WARNING); + + return false; + } + + $meta = stream_get_meta_data($stream); + + if ('STDIO' !== $meta['stream_type']) { + trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', E_USER_WARNING); + + return false; + } + + // We cannot actually disable vt100 support if it is set + if (false === $enable || !self::stream_isatty($stream)) { + return false; + } + + // The native function does not apply to stdin + $meta = array_map('strtolower', $meta); + $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; + + return !$stdin + && (false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM')); + } + + public static function stream_isatty($stream) + { + if (!\is_resource($stream)) { + trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', E_USER_WARNING); + + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR) { + $stat = @fstat($stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + } + + return \function_exists('posix_isatty') && @posix_isatty($stream); + } + + private static function initHashMask() + { + $obj = (object) array(); + self::$hashMask = -1; + + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'); + foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = (int) substr(ob_get_clean(), 17); + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if (null == $encoding) { + $s = mb_convert_encoding($s, 'UTF-8'); + } elseif ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/bootstrap.php b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/bootstrap.php new file mode 100644 index 0000000..a27a900 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/symfony/polyfill-php72/bootstrap.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php72 as p; + +if (PHP_VERSION_ID >= 70200) { + return; +} + +if (!defined('PHP_FLOAT_DIG')) { + define('PHP_FLOAT_DIG', 15); +} +if (!defined('PHP_FLOAT_EPSILON')) { + define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); +} +if (!defined('PHP_FLOAT_MIN')) { + define('PHP_FLOAT_MIN', 2.2250738585072E-308); +} +if (!defined('PHP_FLOAT_MAX')) { + define('PHP_FLOAT_MAX', 1.7976931348623157E+308); +} +if (!defined('PHP_OS_FAMILY')) { + define('PHP_OS_FAMILY', p\Php72::php_os_family()); +} + +if ('\\' === DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { + function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } +} +if (!function_exists('stream_isatty')) { + function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } +} +if (!function_exists('utf8_encode')) { + function utf8_encode($s) { return p\Php72::utf8_encode($s); } +} +if (!function_exists('utf8_decode')) { + function utf8_decode($s) { return p\Php72::utf8_decode($s); } +} +if (!function_exists('spl_object_id')) { + function spl_object_id($s) { return p\Php72::spl_object_id($s); } +} +if (!function_exists('mb_ord')) { + function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); } +} +if (!function_exists('mb_chr')) { + function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/action-scheduler.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/action-scheduler.php new file mode 100644 index 0000000..53e9cab --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/action-scheduler.php @@ -0,0 +1,53 @@ +. + * + */ + +if ( ! function_exists( 'action_scheduler_register_3_dot_1_dot_6' ) ) { + + if ( ! class_exists( 'ActionScheduler_Versions' ) ) { + require_once( 'classes/ActionScheduler_Versions.php' ); + add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 ); + } + + add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_1_dot_6', 0, 0 ); + + function action_scheduler_register_3_dot_1_dot_6() { + $versions = ActionScheduler_Versions::instance(); + $versions->register( '3.1.6', 'action_scheduler_initialize_3_dot_1_dot_6' ); + } + + function action_scheduler_initialize_3_dot_1_dot_6() { + require_once( 'classes/abstracts/ActionScheduler.php' ); + ActionScheduler::init( __FILE__ ); + } + + // Support usage in themes - load this version if no plugin has loaded a version yet. + if ( did_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler' ) ) { + action_scheduler_initialize_3_dot_1_dot_6(); + do_action( 'action_scheduler_pre_theme_init' ); + ActionScheduler_Versions::initialize_latest_version(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionClaim.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionClaim.php new file mode 100644 index 0000000..8b56816 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionClaim.php @@ -0,0 +1,23 @@ +id = $id; + $this->action_ids = $action_ids; + } + + public function get_id() { + return $this->id; + } + + public function get_actions() { + return $this->action_ids; + } +} + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php new file mode 100644 index 0000000..545277f --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php @@ -0,0 +1,179 @@ +get_date() ); + } + break; + default : + $action_class = 'ActionScheduler_FinishedAction'; + break; + } + + $action_class = apply_filters( 'action_scheduler_stored_action_class', $action_class, $status, $hook, $args, $schedule, $group ); + + $action = new $action_class( $hook, $args, $schedule, $group ); + + /** + * Allow 3rd party code to change the instantiated action for a given hook, args, schedule and group. + * + * @param ActionScheduler_Action $action The instantiated action. + * @param string $hook The instantiated action's hook. + * @param array $args The instantiated action's args. + * @param ActionScheduler_Schedule $schedule The instantiated action's schedule. + * @param string $group The instantiated action's group. + */ + return apply_filters( 'action_scheduler_stored_action_instance', $action, $hook, $args, $schedule, $group ); + } + + /** + * Enqueue an action to run one time, as soon as possible (rather a specific scheduled time). + * + * This method creates a new action with the NULLSchedule. This schedule maps to a MySQL datetime string of + * 0000-00-00 00:00:00. This is done to create a psuedo "async action" type that is fully backward compatible. + * Existing queries to claim actions claim by date, meaning actions scheduled for 0000-00-00 00:00:00 will + * always be claimed prior to actions scheduled for a specific date. This makes sure that any async action is + * given priority in queue processing. This has the added advantage of making sure async actions can be + * claimed by both the existing WP Cron and WP CLI runners, as well as a new async request runner. + * + * @param string $hook The hook to trigger when this action runs + * @param array $args Args to pass when the hook is triggered + * @param string $group A group to put the action in + * + * @return int The ID of the stored action + */ + public function async( $hook, $args = array(), $group = '' ) { + $schedule = new ActionScheduler_NullSchedule(); + $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); + return $this->store( $action ); + } + + /** + * @param string $hook The hook to trigger when this action runs + * @param array $args Args to pass when the hook is triggered + * @param int $when Unix timestamp when the action will run + * @param string $group A group to put the action in + * + * @return int The ID of the stored action + */ + public function single( $hook, $args = array(), $when = null, $group = '' ) { + $date = as_get_datetime_object( $when ); + $schedule = new ActionScheduler_SimpleSchedule( $date ); + $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); + return $this->store( $action ); + } + + /** + * Create the first instance of an action recurring on a given interval. + * + * @param string $hook The hook to trigger when this action runs + * @param array $args Args to pass when the hook is triggered + * @param int $first Unix timestamp for the first run + * @param int $interval Seconds between runs + * @param string $group A group to put the action in + * + * @return int The ID of the stored action + */ + public function recurring( $hook, $args = array(), $first = null, $interval = null, $group = '' ) { + if ( empty($interval) ) { + return $this->single( $hook, $args, $first, $group ); + } + $date = as_get_datetime_object( $first ); + $schedule = new ActionScheduler_IntervalSchedule( $date, $interval ); + $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); + return $this->store( $action ); + } + + /** + * Create the first instance of an action recurring on a Cron schedule. + * + * @param string $hook The hook to trigger when this action runs + * @param array $args Args to pass when the hook is triggered + * @param int $base_timestamp The first instance of the action will be scheduled + * to run at a time calculated after this timestamp matching the cron + * expression. This can be used to delay the first instance of the action. + * @param int $schedule A cron definition string + * @param string $group A group to put the action in + * + * @return int The ID of the stored action + */ + public function cron( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '' ) { + if ( empty($schedule) ) { + return $this->single( $hook, $args, $base_timestamp, $group ); + } + $date = as_get_datetime_object( $base_timestamp ); + $cron = CronExpression::factory( $schedule ); + $schedule = new ActionScheduler_CronSchedule( $date, $cron ); + $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); + return $this->store( $action ); + } + + /** + * Create a successive instance of a recurring or cron action. + * + * Importantly, the action will be rescheduled to run based on the current date/time. + * That means when the action is scheduled to run in the past, the next scheduled date + * will be pushed forward. For example, if a recurring action set to run every hour + * was scheduled to run 5 seconds ago, it will be next scheduled for 1 hour in the + * future, which is 1 hour and 5 seconds from when it was last scheduled to run. + * + * Alternatively, if the action is scheduled to run in the future, and is run early, + * likely via manual intervention, then its schedule will change based on the time now. + * For example, if a recurring action set to run every day, and is run 12 hours early, + * it will run again in 24 hours, not 36 hours. + * + * This slippage is less of an issue with Cron actions, as the specific run time can + * be set for them to run, e.g. 1am each day. In those cases, and entire period would + * need to be missed before there was any change is scheduled, e.g. in the case of an + * action scheduled for 1am each day, the action would need to run an entire day late. + * + * @param ActionScheduler_Action $action The existing action. + * + * @return string The ID of the stored action + * @throws InvalidArgumentException If $action is not a recurring action. + */ + public function repeat( $action ) { + $schedule = $action->get_schedule(); + $next = $schedule->get_next( as_get_datetime_object() ); + + if ( is_null( $next ) || ! $schedule->is_recurring() ) { + throw new InvalidArgumentException( __( 'Invalid action - must be a recurring action.', 'action-scheduler' ) ); + } + + $schedule_class = get_class( $schedule ); + $new_schedule = new $schedule( $next, $schedule->get_recurrence(), $schedule->get_first_date() ); + $new_action = new ActionScheduler_Action( $action->get_hook(), $action->get_args(), $new_schedule, $action->get_group() ); + return $this->store( $new_action ); + } + + /** + * @param ActionScheduler_Action $action + * + * @return int The ID of the stored action + */ + protected function store( ActionScheduler_Action $action ) { + $store = ActionScheduler_Store::instance(); + return $store->save_action( $action ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php new file mode 100644 index 0000000..c1fd0d7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php @@ -0,0 +1,154 @@ +render(); + } + + /** + * Registers action-scheduler into WooCommerce > System status. + * + * @param array $tabs An associative array of tab key => label. + * @return array $tabs An associative array of tab key => label, including Action Scheduler's tabs + */ + public function register_system_status_tab( array $tabs ) { + $tabs['action-scheduler'] = __( 'Scheduled Actions', 'action-scheduler' ); + + return $tabs; + } + + /** + * Include Action Scheduler's administration under the Tools menu. + * + * A menu under the Tools menu is important for backward compatibility (as that's + * where it started), and also provides more convenient access than the WooCommerce + * System Status page, and for sites where WooCommerce isn't active. + */ + public function register_menu() { + $hook_suffix = add_submenu_page( + 'tools.php', + __( 'Scheduled Actions', 'action-scheduler' ), + __( 'Scheduled Actions', 'action-scheduler' ), + 'manage_options', + 'action-scheduler', + array( $this, 'render_admin_ui' ) + ); + add_action( 'load-' . $hook_suffix , array( $this, 'process_admin_ui' ) ); + } + + /** + * Triggers processing of any pending actions. + */ + public function process_admin_ui() { + $this->get_list_table(); + } + + /** + * Renders the Admin UI + */ + public function render_admin_ui() { + $table = $this->get_list_table(); + $table->display_page(); + } + + /** + * Get the admin UI object and process any requested actions. + * + * @return ActionScheduler_ListTable + */ + protected function get_list_table() { + if ( null === $this->list_table ) { + $this->list_table = new ActionScheduler_ListTable( ActionScheduler::store(), ActionScheduler::logger(), ActionScheduler::runner() ); + $this->list_table->process_actions(); + } + + return $this->list_table; + } + + /** + * Provide more information about the screen and its data in the help tab. + */ + public function add_help_tabs() { + $screen = get_current_screen(); + + if ( ! $screen || self::$screen_id != $screen->id ) { + return; + } + + $as_version = ActionScheduler_Versions::instance()->latest_version(); + $screen->add_help_tab( + array( + 'id' => 'action_scheduler_about', + 'title' => __( 'About', 'action-scheduler' ), + 'content' => + '

' . sprintf( __( 'About Action Scheduler %s', 'action-scheduler' ), $as_version ) . '

' . + '

' . + __( 'Action Scheduler is a scalable, traceable job queue for background processing large sets of actions. Action Scheduler works by triggering an action hook to run at some time in the future. Scheduled actions can also be scheduled to run on a recurring schedule.', 'action-scheduler' ) . + '

', + ) + ); + + $screen->add_help_tab( + array( + 'id' => 'action_scheduler_columns', + 'title' => __( 'Columns', 'action-scheduler' ), + 'content' => + '

' . __( 'Scheduled Action Columns', 'action-scheduler' ) . '

' . + '', + ) + ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php new file mode 100644 index 0000000..57706a2 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php @@ -0,0 +1,97 @@ +store = $store; + } + + /** + * Handle async requests + * + * Run a queue, and maybe dispatch another async request to run another queue + * if there are still pending actions after completing a queue in this request. + */ + protected function handle() { + do_action( 'action_scheduler_run_queue', 'Async Request' ); // run a queue in the same way as WP Cron, but declare the Async Request context + + $sleep_seconds = $this->get_sleep_seconds(); + + if ( $sleep_seconds ) { + sleep( $sleep_seconds ); + } + + $this->maybe_dispatch(); + } + + /** + * If the async request runner is needed and allowed to run, dispatch a request. + */ + public function maybe_dispatch() { + if ( ! $this->allow() ) { + return; + } + + $this->dispatch(); + ActionScheduler_QueueRunner::instance()->unhook_dispatch_async_request(); + } + + /** + * Only allow async requests when needed. + * + * Also allow 3rd party code to disable running actions via async requests. + */ + protected function allow() { + + if ( ! has_action( 'action_scheduler_run_queue' ) || ActionScheduler::runner()->has_maximum_concurrent_batches() || ! $this->store->has_pending_actions_due() ) { + $allow = false; + } else { + $allow = true; + } + + return apply_filters( 'action_scheduler_allow_async_request_runner', $allow ); + } + + /** + * Chaining async requests can crash MySQL. A brief sleep call in PHP prevents that. + */ + protected function get_sleep_seconds() { + return apply_filters( 'action_scheduler_async_request_sleep_seconds', 5, $this ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Compatibility.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Compatibility.php new file mode 100644 index 0000000..c06e5a4 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Compatibility.php @@ -0,0 +1,99 @@ + $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) { + if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) { + return $filtered_limit; + } else { + return false; + } + } elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) { + if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) { + return $wp_max_limit; + } else { + return false; + } + } + return false; + } + + /** + * Attempts to raise the PHP timeout for time intensive processes. + * + * Only allows raising the existing limit and prevents lowering it. Wrapper for wc_set_time_limit(), when available. + * + * @param int The time limit in seconds. + */ + public static function raise_time_limit( $limit = 0 ) { + if ( $limit < ini_get( 'max_execution_time' ) ) { + return; + } + + if ( function_exists( 'wc_set_time_limit' ) ) { + wc_set_time_limit( $limit ); + } elseif ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { + @set_time_limit( $limit ); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DataController.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DataController.php new file mode 100644 index 0000000..eb69847 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DataController.php @@ -0,0 +1,187 @@ +=' ); + return $php_support && apply_filters( 'action_scheduler_migration_dependencies_met', true ); + } + + /** + * Get a flag indicating whether the migration is complete. + * + * @return bool Whether the flag has been set marking the migration as complete + */ + public static function is_migration_complete() { + return get_option( self::STATUS_FLAG ) === self::STATUS_COMPLETE; + } + + /** + * Mark the migration as complete. + */ + public static function mark_migration_complete() { + update_option( self::STATUS_FLAG, self::STATUS_COMPLETE ); + } + + /** + * Unmark migration when a plugin is de-activated. Will not work in case of silent activation, for example in an update. + * We do this to mitigate the bug of lost actions which happens if there was an AS 2.x to AS 3.x migration in the past, but that plugin is now + * deactivated and the site was running on AS 2.x again. + */ + public static function mark_migration_incomplete() { + delete_option( self::STATUS_FLAG ); + } + + /** + * Set the action store class name. + * + * @param string $class Classname of the store class. + * + * @return string + */ + public static function set_store_class( $class ) { + return self::DATASTORE_CLASS; + } + + /** + * Set the action logger class name. + * + * @param string $class Classname of the logger class. + * + * @return string + */ + public static function set_logger_class( $class ) { + return self::LOGGER_CLASS; + } + + /** + * Set the sleep time in seconds. + * + * @param integer $sleep_time The number of seconds to pause before resuming operation. + */ + public static function set_sleep_time( $sleep_time ) { + self::$sleep_time = (int) $sleep_time; + } + + /** + * Set the tick count required for freeing memory. + * + * @param integer $free_ticks The number of ticks to free memory on. + */ + public static function set_free_ticks( $free_ticks ) { + self::$free_ticks = (int) $free_ticks; + } + + /** + * Free memory if conditions are met. + * + * @param int $ticks Current tick count. + */ + public static function maybe_free_memory( $ticks ) { + if ( self::$free_ticks && 0 === $ticks % self::$free_ticks ) { + self::free_memory(); + } + } + + /** + * Reduce memory footprint by clearing the database query and object caches. + */ + public static function free_memory() { + if ( 0 < self::$sleep_time ) { + /* translators: %d: amount of time */ + \WP_CLI::warning( sprintf( _n( 'Stopped the insanity for %d second', 'Stopped the insanity for %d seconds', self::$sleep_time, 'action-scheduler' ), self::$sleep_time ) ); + sleep( self::$sleep_time ); + } + + \WP_CLI::warning( __( 'Attempting to reduce used memory...', 'action-scheduler' ) ); + + /** + * @var $wpdb \wpdb + * @var $wp_object_cache \WP_Object_Cache + */ + global $wpdb, $wp_object_cache; + + $wpdb->queries = array(); + + if ( ! is_a( $wp_object_cache, 'WP_Object_Cache' ) ) { + return; + } + + $wp_object_cache->group_ops = array(); + $wp_object_cache->stats = array(); + $wp_object_cache->memcache_debug = array(); + $wp_object_cache->cache = array(); + + if ( is_callable( array( $wp_object_cache, '__remoteset' ) ) ) { + call_user_func( array( $wp_object_cache, '__remoteset' ) ); // important + } + } + + /** + * Connect to table datastores if migration is complete. + * Otherwise, proceed with the migration if the dependencies have been met. + */ + public static function init() { + if ( self::is_migration_complete() ) { + add_filter( 'action_scheduler_store_class', array( 'ActionScheduler_DataController', 'set_store_class' ), 100 ); + add_filter( 'action_scheduler_logger_class', array( 'ActionScheduler_DataController', 'set_logger_class' ), 100 ); + add_action( 'deactivate_plugin', array( 'ActionScheduler_DataController', 'mark_migration_incomplete' ) ); + } elseif ( self::dependencies_met() ) { + Controller::init(); + } + + add_action( 'action_scheduler/progress_tick', array( 'ActionScheduler_DataController', 'maybe_free_memory' ) ); + } + + /** + * Singleton factory. + */ + public static function instance() { + if ( ! isset( self::$instance ) ) { + self::$instance = new static(); + } + + return self::$instance; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DateTime.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DateTime.php new file mode 100644 index 0000000..5e8743c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_DateTime.php @@ -0,0 +1,76 @@ +format( 'U' ); + } + + /** + * Set the UTC offset. + * + * This represents a fixed offset instead of a timezone setting. + * + * @param $offset + */ + public function setUtcOffset( $offset ) { + $this->utcOffset = intval( $offset ); + } + + /** + * Returns the timezone offset. + * + * @return int + * @link http://php.net/manual/en/datetime.getoffset.php + */ + public function getOffset() { + return $this->utcOffset ? $this->utcOffset : parent::getOffset(); + } + + /** + * Set the TimeZone associated with the DateTime + * + * @param DateTimeZone $timezone + * + * @return static + * @link http://php.net/manual/en/datetime.settimezone.php + */ + public function setTimezone( $timezone ) { + $this->utcOffset = 0; + parent::setTimezone( $timezone ); + + return $this; + } + + /** + * Get the timestamp with the WordPress timezone offset added or subtracted. + * + * @since 3.0.0 + * @return int + */ + public function getOffsetTimestamp() { + return $this->getTimestamp() + $this->getOffset(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Exception.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Exception.php new file mode 100644 index 0000000..353d3c0 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Exception.php @@ -0,0 +1,11 @@ +store = $store; + } + + public function attach( ActionScheduler_ActionClaim $claim ) { + $this->claim = $claim; + add_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); + add_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0, 1 ); + add_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0, 0 ); + add_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0, 0 ); + add_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0, 0 ); + } + + public function detach() { + $this->claim = NULL; + $this->untrack_action(); + remove_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); + remove_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0 ); + remove_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0 ); + remove_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0 ); + remove_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0 ); + } + + public function track_current_action( $action_id ) { + $this->action_id = $action_id; + } + + public function untrack_action() { + $this->action_id = 0; + } + + public function handle_unexpected_shutdown() { + if ( $error = error_get_last() ) { + if ( in_array( $error['type'], array( E_ERROR, E_PARSE, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR ) ) ) { + if ( !empty($this->action_id) ) { + $this->store->mark_failure( $this->action_id ); + do_action( 'action_scheduler_unexpected_shutdown', $this->action_id, $error ); + } + } + $this->store->release_claim( $this->claim ); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php new file mode 100644 index 0000000..40b4559 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php @@ -0,0 +1,47 @@ + label). + * + * @var array + */ + protected $columns = array(); + + /** + * Actions (name => label). + * + * @var array + */ + protected $row_actions = array(); + + /** + * The active data stores + * + * @var ActionScheduler_Store + */ + protected $store; + + /** + * A logger to use for getting action logs to display + * + * @var ActionScheduler_Logger + */ + protected $logger; + + /** + * A ActionScheduler_QueueRunner runner instance (or child class) + * + * @var ActionScheduler_QueueRunner + */ + protected $runner; + + /** + * Bulk actions. The key of the array is the method name of the implementation: + * + * bulk_(array $ids, string $sql_in). + * + * See the comments in the parent class for further details + * + * @var array + */ + protected $bulk_actions = array(); + + /** + * Flag variable to render our notifications, if any, once. + * + * @var bool + */ + protected static $did_notification = false; + + /** + * Array of seconds for common time periods, like week or month, alongside an internationalised string representation, i.e. "Day" or "Days" + * + * @var array + */ + private static $time_periods; + + /** + * Sets the current data store object into `store->action` and initialises the object. + * + * @param ActionScheduler_Store $store + * @param ActionScheduler_Logger $logger + * @param ActionScheduler_QueueRunner $runner + */ + public function __construct( ActionScheduler_Store $store, ActionScheduler_Logger $logger, ActionScheduler_QueueRunner $runner ) { + + $this->store = $store; + $this->logger = $logger; + $this->runner = $runner; + + $this->table_header = __( 'Scheduled Actions', 'action-scheduler' ); + + $this->bulk_actions = array( + 'delete' => __( 'Delete', 'action-scheduler' ), + ); + + $this->columns = array( + 'hook' => __( 'Hook', 'action-scheduler' ), + 'status' => __( 'Status', 'action-scheduler' ), + 'args' => __( 'Arguments', 'action-scheduler' ), + 'group' => __( 'Group', 'action-scheduler' ), + 'recurrence' => __( 'Recurrence', 'action-scheduler' ), + 'schedule' => __( 'Scheduled Date', 'action-scheduler' ), + 'log_entries' => __( 'Log', 'action-scheduler' ), + ); + + $this->sort_by = array( + 'schedule', + 'hook', + 'group', + ); + + $this->search_by = array( + 'hook', + 'args', + 'claim_id', + ); + + $request_status = $this->get_request_status(); + + if ( empty( $request_status ) ) { + $this->sort_by[] = 'status'; + } elseif ( in_array( $request_status, array( 'in-progress', 'failed' ) ) ) { + $this->columns += array( 'claim_id' => __( 'Claim ID', 'action-scheduler' ) ); + $this->sort_by[] = 'claim_id'; + } + + $this->row_actions = array( + 'hook' => array( + 'run' => array( + 'name' => __( 'Run', 'action-scheduler' ), + 'desc' => __( 'Process the action now as if it were run as part of a queue', 'action-scheduler' ), + ), + 'cancel' => array( + 'name' => __( 'Cancel', 'action-scheduler' ), + 'desc' => __( 'Cancel the action now to avoid it being run in future', 'action-scheduler' ), + 'class' => 'cancel trash', + ), + ), + ); + + self::$time_periods = array( + array( + 'seconds' => YEAR_IN_SECONDS, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s year', '%s years', 'action-scheduler' ), + ), + array( + 'seconds' => MONTH_IN_SECONDS, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s month', '%s months', 'action-scheduler' ), + ), + array( + 'seconds' => WEEK_IN_SECONDS, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s week', '%s weeks', 'action-scheduler' ), + ), + array( + 'seconds' => DAY_IN_SECONDS, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s day', '%s days', 'action-scheduler' ), + ), + array( + 'seconds' => HOUR_IN_SECONDS, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s hour', '%s hours', 'action-scheduler' ), + ), + array( + 'seconds' => MINUTE_IN_SECONDS, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s minute', '%s minutes', 'action-scheduler' ), + ), + array( + 'seconds' => 1, + /* translators: %s: amount of time */ + 'names' => _n_noop( '%s second', '%s seconds', 'action-scheduler' ), + ), + ); + + parent::__construct( array( + 'singular' => 'action-scheduler', + 'plural' => 'action-scheduler', + 'ajax' => false, + ) ); + } + + /** + * Convert an interval of seconds into a two part human friendly string. + * + * The WordPress human_time_diff() function only calculates the time difference to one degree, meaning + * even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step + * further to display two degrees of accuracy. + * + * Inspired by the Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/ + * + * @param int $interval A interval in seconds. + * @param int $periods_to_include Depth of time periods to include, e.g. for an interval of 70, and $periods_to_include of 2, both minutes and seconds would be included. With a value of 1, only minutes would be included. + * @return string A human friendly string representation of the interval. + */ + private static function human_interval( $interval, $periods_to_include = 2 ) { + + if ( $interval <= 0 ) { + return __( 'Now!', 'action-scheduler' ); + } + + $output = ''; + + for ( $time_period_index = 0, $periods_included = 0, $seconds_remaining = $interval; $time_period_index < count( self::$time_periods ) && $seconds_remaining > 0 && $periods_included < $periods_to_include; $time_period_index++ ) { + + $periods_in_interval = floor( $seconds_remaining / self::$time_periods[ $time_period_index ]['seconds'] ); + + if ( $periods_in_interval > 0 ) { + if ( ! empty( $output ) ) { + $output .= ' '; + } + $output .= sprintf( _n( self::$time_periods[ $time_period_index ]['names'][0], self::$time_periods[ $time_period_index ]['names'][1], $periods_in_interval, 'action-scheduler' ), $periods_in_interval ); + $seconds_remaining -= $periods_in_interval * self::$time_periods[ $time_period_index ]['seconds']; + $periods_included++; + } + } + + return $output; + } + + /** + * Returns the recurrence of an action or 'Non-repeating'. The output is human readable. + * + * @param ActionScheduler_Action $action + * + * @return string + */ + protected function get_recurrence( $action ) { + $schedule = $action->get_schedule(); + if ( $schedule->is_recurring() ) { + $recurrence = $schedule->get_recurrence(); + + if ( is_numeric( $recurrence ) ) { + /* translators: %s: time interval */ + return sprintf( __( 'Every %s', 'action-scheduler' ), self::human_interval( $recurrence ) ); + } else { + return $recurrence; + } + } + + return __( 'Non-repeating', 'action-scheduler' ); + } + + /** + * Serializes the argument of an action to render it in a human friendly format. + * + * @param array $row The array representation of the current row of the table + * + * @return string + */ + public function column_args( array $row ) { + if ( empty( $row['args'] ) ) { + return apply_filters( 'action_scheduler_list_table_column_args', '', $row ); + } + + $row_html = '
    '; + foreach ( $row['args'] as $key => $value ) { + $row_html .= sprintf( '
  • %s => %s
  • ', esc_html( var_export( $key, true ) ), esc_html( var_export( $value, true ) ) ); + } + $row_html .= '
'; + + return apply_filters( 'action_scheduler_list_table_column_args', $row_html, $row ); + } + + /** + * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal. + * + * @param array $row Action array. + * @return string + */ + public function column_log_entries( array $row ) { + + $log_entries_html = '
    '; + + $timezone = new DateTimezone( 'UTC' ); + + foreach ( $row['log_entries'] as $log_entry ) { + $log_entries_html .= $this->get_log_entry_html( $log_entry, $timezone ); + } + + $log_entries_html .= '
'; + + return $log_entries_html; + } + + /** + * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal. + * + * @param ActionScheduler_LogEntry $log_entry + * @param DateTimezone $timezone + * @return string + */ + protected function get_log_entry_html( ActionScheduler_LogEntry $log_entry, DateTimezone $timezone ) { + $date = $log_entry->get_date(); + $date->setTimezone( $timezone ); + return sprintf( '
  • %s
    %s
  • ', esc_html( $date->format( 'Y-m-d H:i:s O' ) ), esc_html( $log_entry->get_message() ) ); + } + + /** + * Only display row actions for pending actions. + * + * @param array $row Row to render + * @param string $column_name Current row + * + * @return string + */ + protected function maybe_render_actions( $row, $column_name ) { + if ( 'pending' === strtolower( $row[ 'status_name' ] ) ) { + return parent::maybe_render_actions( $row, $column_name ); + } + + return ''; + } + + /** + * Renders admin notifications + * + * Notifications: + * 1. When the maximum number of tasks are being executed simultaneously. + * 2. Notifications when a task is manually executed. + * 3. Tables are missing. + */ + public function display_admin_notices() { + global $wpdb; + + if ( ( is_a( $this->store, 'ActionScheduler_HybridStore' ) || is_a( $this->store, 'ActionScheduler_DBStore' ) ) && apply_filters( 'action_scheduler_enable_recreate_data_store', true ) ) { + $table_list = array( + 'actionscheduler_actions', + 'actionscheduler_logs', + 'actionscheduler_groups', + 'actionscheduler_claims', + ); + + $found_tables = $wpdb->get_col( "SHOW TABLES LIKE '{$wpdb->prefix}actionscheduler%'" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + foreach ( $table_list as $table_name ) { + if ( ! in_array( $wpdb->prefix . $table_name, $found_tables ) ) { + $this->admin_notices[] = array( + 'class' => 'error', + 'message' => __( 'It appears one or more database tables were missing. Attempting to re-create the missing table(s).' , 'action-scheduler' ), + ); + $this->recreate_tables(); + parent::display_admin_notices(); + + return; + } + } + } + + if ( $this->runner->has_maximum_concurrent_batches() ) { + $claim_count = $this->store->get_claim_count(); + $this->admin_notices[] = array( + 'class' => 'updated', + 'message' => sprintf( + /* translators: %s: amount of claims */ + _n( + 'Maximum simultaneous queues already in progress (%s queue). No additional queues will begin processing until the current queues are complete.', + 'Maximum simultaneous queues already in progress (%s queues). No additional queues will begin processing until the current queues are complete.', + $claim_count, + 'action-scheduler' + ), + $claim_count + ), + ); + } elseif ( $this->store->has_pending_actions_due() ) { + + $async_request_lock_expiration = ActionScheduler::lock()->get_expiration( 'async-request-runner' ); + + // No lock set or lock expired + if ( false === $async_request_lock_expiration || $async_request_lock_expiration < time() ) { + $in_progress_url = add_query_arg( 'status', 'in-progress', remove_query_arg( 'status' ) ); + /* translators: %s: process URL */ + $async_request_message = sprintf( __( 'A new queue has begun processing. View actions in-progress »', 'action-scheduler' ), esc_url( $in_progress_url ) ); + } else { + /* translators: %d: seconds */ + $async_request_message = sprintf( __( 'The next queue will begin processing in approximately %d seconds.', 'action-scheduler' ), $async_request_lock_expiration - time() ); + } + + $this->admin_notices[] = array( + 'class' => 'notice notice-info', + 'message' => $async_request_message, + ); + } + + $notification = get_transient( 'action_scheduler_admin_notice' ); + + if ( is_array( $notification ) ) { + delete_transient( 'action_scheduler_admin_notice' ); + + $action = $this->store->fetch_action( $notification['action_id'] ); + $action_hook_html = '' . $action->get_hook() . ''; + if ( 1 == $notification['success'] ) { + $class = 'updated'; + switch ( $notification['row_action_type'] ) { + case 'run' : + /* translators: %s: action HTML */ + $action_message_html = sprintf( __( 'Successfully executed action: %s', 'action-scheduler' ), $action_hook_html ); + break; + case 'cancel' : + /* translators: %s: action HTML */ + $action_message_html = sprintf( __( 'Successfully canceled action: %s', 'action-scheduler' ), $action_hook_html ); + break; + default : + /* translators: %s: action HTML */ + $action_message_html = sprintf( __( 'Successfully processed change for action: %s', 'action-scheduler' ), $action_hook_html ); + break; + } + } else { + $class = 'error'; + /* translators: 1: action HTML 2: action ID 3: error message */ + $action_message_html = sprintf( __( 'Could not process change for action: "%1$s" (ID: %2$d). Error: %3$s', 'action-scheduler' ), $action_hook_html, esc_html( $notification['action_id'] ), esc_html( $notification['error_message'] ) ); + } + + $action_message_html = apply_filters( 'action_scheduler_admin_notice_html', $action_message_html, $action, $notification ); + + $this->admin_notices[] = array( + 'class' => $class, + 'message' => $action_message_html, + ); + } + + parent::display_admin_notices(); + } + + /** + * Prints the scheduled date in a human friendly format. + * + * @param array $row The array representation of the current row of the table + * + * @return string + */ + public function column_schedule( $row ) { + return $this->get_schedule_display_string( $row['schedule'] ); + } + + /** + * Get the scheduled date in a human friendly format. + * + * @param ActionScheduler_Schedule $schedule + * @return string + */ + protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) { + + $schedule_display_string = ''; + + if ( ! $schedule->get_date() ) { + return '0000-00-00 00:00:00'; + } + + $next_timestamp = $schedule->get_date()->getTimestamp(); + + $schedule_display_string .= $schedule->get_date()->format( 'Y-m-d H:i:s O' ); + $schedule_display_string .= '
    '; + + if ( gmdate( 'U' ) > $next_timestamp ) { + /* translators: %s: date interval */ + $schedule_display_string .= sprintf( __( ' (%s ago)', 'action-scheduler' ), self::human_interval( gmdate( 'U' ) - $next_timestamp ) ); + } else { + /* translators: %s: date interval */ + $schedule_display_string .= sprintf( __( ' (%s)', 'action-scheduler' ), self::human_interval( $next_timestamp - gmdate( 'U' ) ) ); + } + + return $schedule_display_string; + } + + /** + * Bulk delete + * + * Deletes actions based on their ID. This is the handler for the bulk delete. It assumes the data + * properly validated by the callee and it will delete the actions without any extra validation. + * + * @param array $ids + * @param string $ids_sql Inherited and unused + */ + protected function bulk_delete( array $ids, $ids_sql ) { + foreach ( $ids as $id ) { + $this->store->delete_action( $id ); + } + } + + /** + * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their + * parameters are valid. + * + * @param int $action_id + */ + protected function row_action_cancel( $action_id ) { + $this->process_row_action( $action_id, 'cancel' ); + } + + /** + * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their + * parameters are valid. + * + * @param int $action_id + */ + protected function row_action_run( $action_id ) { + $this->process_row_action( $action_id, 'run' ); + } + + /** + * Force the data store schema updates. + */ + protected function recreate_tables() { + if ( is_a( $this->store, 'ActionScheduler_HybridStore' ) ) { + $store = $this->store; + } else { + $store = new ActionScheduler_HybridStore(); + } + add_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10, 2 ); + + $store_schema = new ActionScheduler_StoreSchema(); + $logger_schema = new ActionScheduler_LoggerSchema(); + $store_schema->register_tables( true ); + $logger_schema->register_tables( true ); + + remove_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10 ); + } + /** + * Implements the logic behind processing an action once an action link is clicked on the list table. + * + * @param int $action_id + * @param string $row_action_type The type of action to perform on the action. + */ + protected function process_row_action( $action_id, $row_action_type ) { + try { + switch ( $row_action_type ) { + case 'run' : + $this->runner->process_action( $action_id, 'Admin List Table' ); + break; + case 'cancel' : + $this->store->cancel_action( $action_id ); + break; + } + $success = 1; + $error_message = ''; + } catch ( Exception $e ) { + $success = 0; + $error_message = $e->getMessage(); + } + + set_transient( 'action_scheduler_admin_notice', compact( 'action_id', 'success', 'error_message', 'row_action_type' ), 30 ); + } + + /** + * {@inheritDoc} + */ + public function prepare_items() { + $this->prepare_column_headers(); + + $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); + $query = array( + 'per_page' => $per_page, + 'offset' => $this->get_items_offset(), + 'status' => $this->get_request_status(), + 'orderby' => $this->get_request_orderby(), + 'order' => $this->get_request_order(), + 'search' => $this->get_request_search_query(), + ); + + $this->items = array(); + + $total_items = $this->store->query_actions( $query, 'count' ); + + $status_labels = $this->store->get_status_labels(); + + foreach ( $this->store->query_actions( $query ) as $action_id ) { + try { + $action = $this->store->fetch_action( $action_id ); + } catch ( Exception $e ) { + continue; + } + if ( is_a( $action, 'ActionScheduler_NullAction' ) ) { + continue; + } + $this->items[ $action_id ] = array( + 'ID' => $action_id, + 'hook' => $action->get_hook(), + 'status_name' => $this->store->get_status( $action_id ), + 'status' => $status_labels[ $this->store->get_status( $action_id ) ], + 'args' => $action->get_args(), + 'group' => $action->get_group(), + 'log_entries' => $this->logger->get_logs( $action_id ), + 'claim_id' => $this->store->get_claim_id( $action_id ), + 'recurrence' => $this->get_recurrence( $action ), + 'schedule' => $action->get_schedule(), + ); + } + + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'per_page' => $per_page, + 'total_pages' => ceil( $total_items / $per_page ), + ) ); + } + + /** + * Prints the available statuses so the user can click to filter. + */ + protected function display_filter_by_status() { + $this->status_counts = $this->store->action_counts(); + parent::display_filter_by_status(); + } + + /** + * Get the text to display in the search box on the list table. + */ + protected function get_search_box_button_text() { + return __( 'Search hook, args and claim ID', 'action-scheduler' ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php new file mode 100644 index 0000000..649636d --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php @@ -0,0 +1,67 @@ +comment_type + * to ActionScheduler_LogEntry::__construct(), goodness knows why, and the Follow-up Emails plugin + * hard-codes loading its own version of ActionScheduler_wpCommentLogger with that out-dated method, + * goodness knows why, so we need to guard against that here instead of using a DateTime type declaration + * for the constructor's 3rd param of $date and causing a fatal error with older versions of FUE. + */ + if ( null !== $date && ! is_a( $date, 'DateTime' ) ) { + _doing_it_wrong( __METHOD__, 'The third parameter must be a valid DateTime instance, or null.', '2.0.0' ); + $date = null; + } + + $this->action_id = $action_id; + $this->message = $message; + $this->date = $date ? $date : new Datetime; + } + + /** + * Returns the date when this log entry was created + * + * @return Datetime + */ + public function get_date() { + return $this->date; + } + + public function get_action_id() { + return $this->action_id; + } + + public function get_message() { + return $this->message; + } +} + diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php new file mode 100644 index 0000000..6f8f218 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php @@ -0,0 +1,11 @@ +maybe_dispatch_async_request() uses a lock to avoid + * calling ActionScheduler_QueueRunner->has_maximum_concurrent_batches() every time the 'shutdown', + * hook is triggered, because that method calls ActionScheduler_QueueRunner->store->get_claim_count() + * to find the current number of claims in the database. + * + * @param string $lock_type A string to identify different lock types. + * @bool True if lock value has changed, false if not or if set failed. + */ + public function set( $lock_type ) { + return update_option( $this->get_key( $lock_type ), time() + $this->get_duration( $lock_type ) ); + } + + /** + * If a lock is set, return the timestamp it was set to expiry. + * + * @param string $lock_type A string to identify different lock types. + * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire. + */ + public function get_expiration( $lock_type ) { + return get_option( $this->get_key( $lock_type ) ); + } + + /** + * Get the key to use for storing the lock in the transient + * + * @param string $lock_type A string to identify different lock types. + * @return string + */ + protected function get_key( $lock_type ) { + return sprintf( 'action_scheduler_lock_%s', $lock_type ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php new file mode 100644 index 0000000..1da13ab --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php @@ -0,0 +1,155 @@ +store = $store ? $store : ActionScheduler_Store::instance(); + $this->batch_size = $batch_size; + } + + public function delete_old_actions() { + $lifespan = apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds ); + $cutoff = as_get_datetime_object($lifespan.' seconds ago'); + + $statuses_to_purge = array( + ActionScheduler_Store::STATUS_COMPLETE, + ActionScheduler_Store::STATUS_CANCELED, + ); + + foreach ( $statuses_to_purge as $status ) { + $actions_to_delete = $this->store->query_actions( array( + 'status' => $status, + 'modified' => $cutoff, + 'modified_compare' => '<=', + 'per_page' => $this->get_batch_size(), + ) ); + + foreach ( $actions_to_delete as $action_id ) { + try { + $this->store->delete_action( $action_id ); + } catch ( Exception $e ) { + + /** + * Notify 3rd party code of exceptions when deleting a completed action older than the retention period + * + * This hook provides a way for 3rd party code to log or otherwise handle exceptions relating to their + * actions. + * + * @since 2.0.0 + * + * @param int $action_id The scheduled actions ID in the data store + * @param Exception $e The exception thrown when attempting to delete the action from the data store + * @param int $lifespan The retention period, in seconds, for old actions + * @param int $count_of_actions_to_delete The number of old actions being deleted in this batch + */ + do_action( 'action_scheduler_failed_old_action_deletion', $action_id, $e, $lifespan, count( $actions_to_delete ) ); + } + } + } + } + + /** + * Unclaim pending actions that have not been run within a given time limit. + * + * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed + * as a parameter is 10x the time limit used for queue processing. + * + * @param int $time_limit The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes). + */ + public function reset_timeouts( $time_limit = 300 ) { + $timeout = apply_filters( 'action_scheduler_timeout_period', $time_limit ); + if ( $timeout < 0 ) { + return; + } + $cutoff = as_get_datetime_object($timeout.' seconds ago'); + $actions_to_reset = $this->store->query_actions( array( + 'status' => ActionScheduler_Store::STATUS_PENDING, + 'modified' => $cutoff, + 'modified_compare' => '<=', + 'claimed' => true, + 'per_page' => $this->get_batch_size(), + ) ); + + foreach ( $actions_to_reset as $action_id ) { + $this->store->unclaim_action( $action_id ); + do_action( 'action_scheduler_reset_action', $action_id ); + } + } + + /** + * Mark actions that have been running for more than a given time limit as failed, based on + * the assumption some uncatachable and unloggable fatal error occurred during processing. + * + * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed + * as a parameter is 10x the time limit used for queue processing. + * + * @param int $time_limit The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes). + */ + public function mark_failures( $time_limit = 300 ) { + $timeout = apply_filters( 'action_scheduler_failure_period', $time_limit ); + if ( $timeout < 0 ) { + return; + } + $cutoff = as_get_datetime_object($timeout.' seconds ago'); + $actions_to_reset = $this->store->query_actions( array( + 'status' => ActionScheduler_Store::STATUS_RUNNING, + 'modified' => $cutoff, + 'modified_compare' => '<=', + 'per_page' => $this->get_batch_size(), + ) ); + + foreach ( $actions_to_reset as $action_id ) { + $this->store->mark_failure( $action_id ); + do_action( 'action_scheduler_failed_action', $action_id, $timeout ); + } + } + + /** + * Do all of the cleaning actions. + * + * @param int $time_limit The number of seconds to use as the timeout and failure period. Default 300 (5 minutes). + * @author Jeremy Pry + */ + public function clean( $time_limit = 300 ) { + $this->delete_old_actions(); + $this->reset_timeouts( $time_limit ); + $this->mark_failures( $time_limit ); + } + + /** + * Get the batch size for cleaning the queue. + * + * @author Jeremy Pry + * @return int + */ + protected function get_batch_size() { + /** + * Filter the batch size when cleaning the queue. + * + * @param int $batch_size The number of actions to clean in one batch. + */ + return absint( apply_filters( 'action_scheduler_cleanup_batch_size', $this->batch_size ) ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php new file mode 100644 index 0000000..cd76807 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php @@ -0,0 +1,197 @@ +store ); + } + + $this->async_request = $async_request; + } + + /** + * @codeCoverageIgnore + */ + public function init() { + + add_filter( 'cron_schedules', array( self::instance(), 'add_wp_cron_schedule' ) ); + + // Check for and remove any WP Cron hook scheduled by Action Scheduler < 3.0.0, which didn't include the $context param + $next_timestamp = wp_next_scheduled( self::WP_CRON_HOOK ); + if ( $next_timestamp ) { + wp_unschedule_event( $next_timestamp, self::WP_CRON_HOOK ); + } + + $cron_context = array( 'WP Cron' ); + + if ( ! wp_next_scheduled( self::WP_CRON_HOOK, $cron_context ) ) { + $schedule = apply_filters( 'action_scheduler_run_schedule', self::WP_CRON_SCHEDULE ); + wp_schedule_event( time(), $schedule, self::WP_CRON_HOOK, $cron_context ); + } + + add_action( self::WP_CRON_HOOK, array( self::instance(), 'run' ) ); + $this->hook_dispatch_async_request(); + } + + /** + * Hook check for dispatching an async request. + */ + public function hook_dispatch_async_request() { + add_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) ); + } + + /** + * Unhook check for dispatching an async request. + */ + public function unhook_dispatch_async_request() { + remove_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) ); + } + + /** + * Check if we should dispatch an async request to process actions. + * + * This method is attached to 'shutdown', so is called frequently. To avoid slowing down + * the site, it mitigates the work performed in each request by: + * 1. checking if it's in the admin context and then + * 2. haven't run on the 'shutdown' hook within the lock time (60 seconds by default) + * 3. haven't exceeded the number of allowed batches. + * + * The order of these checks is important, because they run from a check on a value: + * 1. in memory - is_admin() maps to $GLOBALS or the WP_ADMIN constant + * 2. in memory - transients use autoloaded options by default + * 3. from a database query - has_maximum_concurrent_batches() run the query + * $this->store->get_claim_count() to find the current number of claims in the DB. + * + * If all of these conditions are met, then we request an async runner check whether it + * should dispatch a request to process pending actions. + */ + public function maybe_dispatch_async_request() { + if ( is_admin() && ! ActionScheduler::lock()->is_locked( 'async-request-runner' ) ) { + // Only start an async queue at most once every 60 seconds + ActionScheduler::lock()->set( 'async-request-runner' ); + $this->async_request->maybe_dispatch(); + } + } + + /** + * Process actions in the queue. Attached to self::WP_CRON_HOOK i.e. 'action_scheduler_run_queue' + * + * The $context param of this method defaults to 'WP Cron', because prior to Action Scheduler 3.0.0 + * that was the only context in which this method was run, and the self::WP_CRON_HOOK hook had no context + * passed along with it. New code calling this method directly, or by triggering the self::WP_CRON_HOOK, + * should set a context as the first parameter. For an example of this, refer to the code seen in + * @see ActionScheduler_AsyncRequest_QueueRunner::handle() + * + * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' + * Generally, this should be capitalised and not localised as it's a proper noun. + * @return int The number of actions processed. + */ + public function run( $context = 'WP Cron' ) { + ActionScheduler_Compatibility::raise_memory_limit(); + ActionScheduler_Compatibility::raise_time_limit( $this->get_time_limit() ); + do_action( 'action_scheduler_before_process_queue' ); + $this->run_cleanup(); + $processed_actions = 0; + if ( false === $this->has_maximum_concurrent_batches() ) { + $batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 ); + do { + $processed_actions_in_batch = $this->do_batch( $batch_size, $context ); + $processed_actions += $processed_actions_in_batch; + } while ( $processed_actions_in_batch > 0 && ! $this->batch_limits_exceeded( $processed_actions ) ); // keep going until we run out of actions, time, or memory + } + + do_action( 'action_scheduler_after_process_queue' ); + return $processed_actions; + } + + /** + * Process a batch of actions pending in the queue. + * + * Actions are processed by claiming a set of pending actions then processing each one until either the batch + * size is completed, or memory or time limits are reached, defined by @see $this->batch_limits_exceeded(). + * + * @param int $size The maximum number of actions to process in the batch. + * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' + * Generally, this should be capitalised and not localised as it's a proper noun. + * @return int The number of actions processed. + */ + protected function do_batch( $size = 100, $context = '' ) { + $claim = $this->store->stake_claim($size); + $this->monitor->attach($claim); + $processed_actions = 0; + + foreach ( $claim->get_actions() as $action_id ) { + // bail if we lost the claim + if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $claim->get_id() ) ) ) { + break; + } + $this->process_action( $action_id, $context ); + $processed_actions++; + + if ( $this->batch_limits_exceeded( $processed_actions ) ) { + break; + } + } + $this->store->release_claim($claim); + $this->monitor->detach(); + $this->clear_caches(); + return $processed_actions; + } + + /** + * Running large batches can eat up memory, as WP adds data to its object cache. + * + * If using a persistent object store, this has the side effect of flushing that + * as well, so this is disabled by default. To enable: + * + * add_filter( 'action_scheduler_queue_runner_flush_cache', '__return_true' ); + */ + protected function clear_caches() { + if ( ! wp_using_ext_object_cache() || apply_filters( 'action_scheduler_queue_runner_flush_cache', false ) ) { + wp_cache_flush(); + } + } + + public function add_wp_cron_schedule( $schedules ) { + $schedules['every_minute'] = array( + 'interval' => 60, // in seconds + 'display' => __( 'Every minute', 'action-scheduler' ), + ); + + return $schedules; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php new file mode 100644 index 0000000..915c2e6 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php @@ -0,0 +1,62 @@ +versions[$version_string]) ) { + return FALSE; + } + $this->versions[$version_string] = $initialization_callback; + return TRUE; + } + + public function get_versions() { + return $this->versions; + } + + public function latest_version() { + $keys = array_keys($this->versions); + if ( empty($keys) ) { + return false; + } + uasort( $keys, 'version_compare' ); + return end($keys); + } + + public function latest_version_callback() { + $latest = $this->latest_version(); + if ( empty($latest) || !isset($this->versions[$latest]) ) { + return '__return_null'; + } + return $this->versions[$latest]; + } + + /** + * @return ActionScheduler_Versions + * @codeCoverageIgnore + */ + public static function instance() { + if ( empty(self::$instance) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * @codeCoverageIgnore + */ + public static function initialize_latest_version() { + $self = self::instance(); + call_user_func($self->latest_version_callback()); + } +} + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php new file mode 100644 index 0000000..1ba552c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php @@ -0,0 +1,115 @@ + Status administration screen + add_action( 'load-tools_page_action-scheduler', array( __CLASS__, 'register_admin_notice' ) ); + add_action( 'load-woocommerce_page_wc-status', array( __CLASS__, 'register_admin_notice' ) ); + } + + /** + * Determines if there are log entries in the wp comments table. + * + * Uses the flag set on migration completion set by @see self::maybe_schedule_cleanup(). + * + * @return boolean Whether there are scheduled action comments in the comments table. + */ + public static function has_logs() { + return 'yes' === get_option( self::$has_logs_option_key ); + } + + /** + * Schedules the WP Post comment table cleanup to run in 6 months if it's not already scheduled. + * Attached to the migration complete hook 'action_scheduler/migration_complete'. + */ + public static function maybe_schedule_cleanup() { + if ( (bool) get_comments( array( 'type' => ActionScheduler_wpCommentLogger::TYPE, 'number' => 1, 'fields' => 'ids' ) ) ) { + update_option( self::$has_logs_option_key, 'yes' ); + + if ( ! as_next_scheduled_action( self::$cleanup_hook ) ) { + as_schedule_single_action( gmdate( 'U' ) + ( 6 * MONTH_IN_SECONDS ), self::$cleanup_hook ); + } + } + } + + /** + * Delete all action comments from the WP Comments table. + */ + public static function delete_all_action_comments() { + global $wpdb; + $wpdb->delete( $wpdb->comments, array( 'comment_type' => ActionScheduler_wpCommentLogger::TYPE, 'comment_agent' => ActionScheduler_wpCommentLogger::AGENT ) ); + delete_option( self::$has_logs_option_key ); + } + + /** + * Registers admin notices about the orphaned action logs. + */ + public static function register_admin_notice() { + add_action( 'admin_notices', array( __CLASS__, 'print_admin_notice' ) ); + } + + /** + * Prints details about the orphaned action logs and includes information on where to learn more. + */ + public static function print_admin_notice() { + $next_cleanup_message = ''; + $next_scheduled_cleanup_hook = as_next_scheduled_action( self::$cleanup_hook ); + + if ( $next_scheduled_cleanup_hook ) { + /* translators: %s: date interval */ + $next_cleanup_message = sprintf( __( 'This data will be deleted in %s.', 'action-scheduler' ), human_time_diff( gmdate( 'U' ), $next_scheduled_cleanup_hook ) ); + } + + $notice = sprintf( + /* translators: 1: next cleanup message 2: github issue URL */ + __( 'Action Scheduler has migrated data to custom tables; however, orphaned log entries exist in the WordPress Comments table. %1$s Learn more »', 'action-scheduler' ), + $next_cleanup_message, + 'https://github.com/woocommerce/action-scheduler/issues/368' + ); + + echo '

    ' . wp_kses_post( $notice ) . '

    '; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php new file mode 100644 index 0000000..e81382a --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php @@ -0,0 +1,152 @@ +store = $store; + } + + /** + * Display action data, including number of actions grouped by status and the oldest & newest action in each status. + * + * Helpful to identify issues, like a clogged queue. + */ + public function render() { + $action_counts = $this->store->action_counts(); + $status_labels = $this->store->get_status_labels(); + $oldest_and_newest = $this->get_oldest_and_newest( array_keys( $status_labels ) ); + + $this->get_template( $status_labels, $action_counts, $oldest_and_newest ); + } + + /** + * Get oldest and newest scheduled dates for a given set of statuses. + * + * @param array $status_keys Set of statuses to find oldest & newest action for. + * @return array + */ + protected function get_oldest_and_newest( $status_keys ) { + + $oldest_and_newest = array(); + + foreach ( $status_keys as $status ) { + $oldest_and_newest[ $status ] = array( + 'oldest' => '–', + 'newest' => '–', + ); + + if ( 'in-progress' === $status ) { + continue; + } + + $oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' ); + $oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' ); + } + + return $oldest_and_newest; + } + + /** + * Get oldest or newest scheduled date for a given status. + * + * @param string $status Action status label/name string. + * @param string $date_type Oldest or Newest. + * @return DateTime + */ + protected function get_action_status_date( $status, $date_type = 'oldest' ) { + + $order = 'oldest' === $date_type ? 'ASC' : 'DESC'; + + $action = $this->store->query_actions( array( + 'claimed' => false, + 'status' => $status, + 'per_page' => 1, + 'order' => $order, + ) ); + + if ( ! empty( $action ) ) { + $date_object = $this->store->get_date( $action[0] ); + $action_date = $date_object->format( 'Y-m-d H:i:s O' ); + } else { + $action_date = '–'; + } + + return $action_date; + } + + /** + * Get oldest or newest scheduled date for a given status. + * + * @param array $status_labels Set of statuses to find oldest & newest action for. + * @param array $action_counts Number of actions grouped by status. + * @param array $oldest_and_newest Date of the oldest and newest action with each status. + */ + protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) { + $as_version = ActionScheduler_Versions::instance()->latest_version(); + ?> + + + + + + + + + + + + + + + + + + + + $count ) { + // WC uses the 3rd column for export, so we need to display more data in that (hidden when viewed as part of the table) and add an empty 2nd column. + printf( + '', + esc_html( $status_labels[ $status ] ), + number_format_i18n( $count ), + $oldest_and_newest[ $status ]['oldest'], + $oldest_and_newest[ $status ]['newest'] + ); + } + ?> + +

     
    %1$s %2$s, Oldest: %3$s, Newest: %4$s%3$s%4$s
    + + run_cleanup(); + $this->add_hooks(); + + // Check to make sure there aren't too many concurrent processes running. + if ( $this->has_maximum_concurrent_batches() ) { + if ( $force ) { + WP_CLI::warning( __( 'There are too many concurrent batches, but the run is forced to continue.', 'action-scheduler' ) ); + } else { + WP_CLI::error( __( 'There are too many concurrent batches.', 'action-scheduler' ) ); + } + } + + // Stake a claim and store it. + $this->claim = $this->store->stake_claim( $batch_size, null, $hooks, $group ); + $this->monitor->attach( $this->claim ); + $this->actions = $this->claim->get_actions(); + + return count( $this->actions ); + } + + /** + * Add our hooks to the appropriate actions. + * + * @author Jeremy Pry + */ + protected function add_hooks() { + add_action( 'action_scheduler_before_execute', array( $this, 'before_execute' ) ); + add_action( 'action_scheduler_after_execute', array( $this, 'after_execute' ), 10, 2 ); + add_action( 'action_scheduler_failed_execution', array( $this, 'action_failed' ), 10, 2 ); + } + + /** + * Set up the WP CLI progress bar. + * + * @author Jeremy Pry + */ + protected function setup_progress_bar() { + $count = count( $this->actions ); + $this->progress_bar = new ProgressBar( + /* translators: %d: amount of actions */ + sprintf( _n( 'Running %d action', 'Running %d actions', $count, 'action-scheduler' ), number_format_i18n( $count ) ), + $count + ); + } + + /** + * Process actions in the queue. + * + * @author Jeremy Pry + * + * @param string $context Optional runner context. Default 'WP CLI'. + * + * @return int The number of actions processed. + */ + public function run( $context = 'WP CLI' ) { + do_action( 'action_scheduler_before_process_queue' ); + $this->setup_progress_bar(); + foreach ( $this->actions as $action_id ) { + // Error if we lost the claim. + if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $this->claim->get_id() ) ) ) { + WP_CLI::warning( __( 'The claim has been lost. Aborting current batch.', 'action-scheduler' ) ); + break; + } + + $this->process_action( $action_id, $context ); + $this->progress_bar->tick(); + } + + $completed = $this->progress_bar->current(); + $this->progress_bar->finish(); + $this->store->release_claim( $this->claim ); + do_action( 'action_scheduler_after_process_queue' ); + + return $completed; + } + + /** + * Handle WP CLI message when the action is starting. + * + * @author Jeremy Pry + * + * @param $action_id + */ + public function before_execute( $action_id ) { + /* translators: %s refers to the action ID */ + WP_CLI::log( sprintf( __( 'Started processing action %s', 'action-scheduler' ), $action_id ) ); + } + + /** + * Handle WP CLI message when the action has completed. + * + * @author Jeremy Pry + * + * @param int $action_id + * @param null|ActionScheduler_Action $action The instance of the action. Default to null for backward compatibility. + */ + public function after_execute( $action_id, $action = null ) { + // backward compatibility + if ( null === $action ) { + $action = $this->store->fetch_action( $action_id ); + } + /* translators: 1: action ID 2: hook name */ + WP_CLI::log( sprintf( __( 'Completed processing action %1$s with hook: %2$s', 'action-scheduler' ), $action_id, $action->get_hook() ) ); + } + + /** + * Handle WP CLI message when the action has failed. + * + * @author Jeremy Pry + * + * @param int $action_id + * @param Exception $exception + * @throws \WP_CLI\ExitException With failure message. + */ + public function action_failed( $action_id, $exception ) { + WP_CLI::error( + /* translators: 1: action ID 2: exception message */ + sprintf( __( 'Error processing action %1$s: %2$s', 'action-scheduler' ), $action_id, $exception->getMessage() ), + false + ); + } + + /** + * Sleep and help avoid hitting memory limit + * + * @param int $sleep_time Amount of seconds to sleep + * @deprecated 3.0.0 + */ + protected function stop_the_insanity( $sleep_time = 0 ) { + _deprecated_function( 'ActionScheduler_WPCLI_QueueRunner::stop_the_insanity', '3.0.0', 'ActionScheduler_DataController::free_memory' ); + + ActionScheduler_DataController::free_memory(); + } + + /** + * Maybe trigger the stop_the_insanity() method to free up memory. + */ + protected function maybe_stop_the_insanity() { + // The value returned by progress_bar->current() might be padded. Remove padding, and convert to int. + $current_iteration = intval( trim( $this->progress_bar->current() ) ); + if ( 0 === $current_iteration % 50 ) { + $this->stop_the_insanity(); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php new file mode 100644 index 0000000..6cf27d4 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php @@ -0,0 +1,158 @@ +] + * : The maximum number of actions to run. Defaults to 100. + * + * [--batches=] + * : Limit execution to a number of batches. Defaults to 0, meaning batches will continue being executed until all actions are complete. + * + * [--cleanup-batch-size=] + * : The maximum number of actions to clean up. Defaults to the value of --batch-size. + * + * [--hooks=] + * : Only run actions with the specified hook. Omitting this option runs actions with any hook. Define multiple hooks as a comma separated string (without spaces), e.g. `--hooks=hook_one,hook_two,hook_three` + * + * [--group=] + * : Only run actions from the specified group. Omitting this option runs actions from all groups. + * + * [--free-memory-on=] + * : The number of actions to process between freeing memory. 0 disables freeing memory. Default 50. + * + * [--pause=] + * : The number of seconds to pause when freeing memory. Default no pause. + * + * [--force] + * : Whether to force execution despite the maximum number of concurrent processes being exceeded. + * + * @param array $args Positional arguments. + * @param array $assoc_args Keyed arguments. + * @throws \WP_CLI\ExitException When an error occurs. + * + * @subcommand run + */ + public function run( $args, $assoc_args ) { + // Handle passed arguments. + $batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 100 ) ); + $batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) ); + $clean = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'cleanup-batch-size', $batch ) ); + $hooks = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'hooks', '' ) ); + $hooks = array_filter( array_map( 'trim', $hooks ) ); + $group = \WP_CLI\Utils\get_flag_value( $assoc_args, 'group', '' ); + $free_on = \WP_CLI\Utils\get_flag_value( $assoc_args, 'free-memory-on', 50 ); + $sleep = \WP_CLI\Utils\get_flag_value( $assoc_args, 'pause', 0 ); + $force = \WP_CLI\Utils\get_flag_value( $assoc_args, 'force', false ); + + ActionScheduler_DataController::set_free_ticks( $free_on ); + ActionScheduler_DataController::set_sleep_time( $sleep ); + + $batches_completed = 0; + $actions_completed = 0; + $unlimited = $batches === 0; + + try { + // Custom queue cleaner instance. + $cleaner = new ActionScheduler_QueueCleaner( null, $clean ); + + // Get the queue runner instance + $runner = new ActionScheduler_WPCLI_QueueRunner( null, null, $cleaner ); + + // Determine how many tasks will be run in the first batch. + $total = $runner->setup( $batch, $hooks, $group, $force ); + + // Run actions for as long as possible. + while ( $total > 0 ) { + $this->print_total_actions( $total ); + $actions_completed += $runner->run(); + $batches_completed++; + + // Maybe set up tasks for the next batch. + $total = ( $unlimited || $batches_completed < $batches ) ? $runner->setup( $batch, $hooks, $group, $force ) : 0; + } + } catch ( Exception $e ) { + $this->print_error( $e ); + } + + $this->print_total_batches( $batches_completed ); + $this->print_success( $actions_completed ); + } + + /** + * Print WP CLI message about how many actions are about to be processed. + * + * @author Jeremy Pry + * + * @param int $total + */ + protected function print_total_actions( $total ) { + WP_CLI::log( + sprintf( + /* translators: %d refers to how many scheduled taks were found to run */ + _n( 'Found %d scheduled task', 'Found %d scheduled tasks', $total, 'action-scheduler' ), + number_format_i18n( $total ) + ) + ); + } + + /** + * Print WP CLI message about how many batches of actions were processed. + * + * @author Jeremy Pry + * + * @param int $batches_completed + */ + protected function print_total_batches( $batches_completed ) { + WP_CLI::log( + sprintf( + /* translators: %d refers to the total number of batches executed */ + _n( '%d batch executed.', '%d batches executed.', $batches_completed, 'action-scheduler' ), + number_format_i18n( $batches_completed ) + ) + ); + } + + /** + * Convert an exception into a WP CLI error. + * + * @author Jeremy Pry + * + * @param Exception $e The error object. + * + * @throws \WP_CLI\ExitException + */ + protected function print_error( Exception $e ) { + WP_CLI::error( + sprintf( + /* translators: %s refers to the exception error message */ + __( 'There was an error running the action scheduler: %s', 'action-scheduler' ), + $e->getMessage() + ) + ); + } + + /** + * Print a success message with the number of completed actions. + * + * @author Jeremy Pry + * + * @param int $actions_completed + */ + protected function print_success( $actions_completed ) { + WP_CLI::success( + sprintf( + /* translators: %d refers to the total number of taskes completed */ + _n( '%d scheduled task completed.', '%d scheduled tasks completed.', $actions_completed, 'action-scheduler' ), + number_format_i18n( $actions_completed ) + ) + ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php new file mode 100644 index 0000000..066697e --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php @@ -0,0 +1,148 @@ + 'Migrates actions to the DB tables store', + 'synopsis' => [ + [ + 'type' => 'assoc', + 'name' => 'batch-size', + 'optional' => true, + 'default' => 100, + 'description' => 'The number of actions to process in each batch', + ], + [ + 'type' => 'assoc', + 'name' => 'free-memory-on', + 'optional' => true, + 'default' => 50, + 'description' => 'The number of actions to process between freeing memory. 0 disables freeing memory', + ], + [ + 'type' => 'assoc', + 'name' => 'pause', + 'optional' => true, + 'default' => 0, + 'description' => 'The number of seconds to pause when freeing memory', + ], + [ + 'type' => 'flag', + 'name' => 'dry-run', + 'optional' => true, + 'description' => 'Reports on the actions that would have been migrated, but does not change any data', + ], + ], + ] ); + } + + /** + * Process the data migration. + * + * @param array $positional_args Required for WP CLI. Not used in migration. + * @param array $assoc_args Optional arguments. + * + * @return void + */ + public function migrate( $positional_args, $assoc_args ) { + $this->init_logging(); + + $config = $this->get_migration_config( $assoc_args ); + $runner = new Runner( $config ); + $runner->init_destination(); + + $batch_size = isset( $assoc_args[ 'batch-size' ] ) ? (int) $assoc_args[ 'batch-size' ] : 100; + $free_on = isset( $assoc_args[ 'free-memory-on' ] ) ? (int) $assoc_args[ 'free-memory-on' ] : 50; + $sleep = isset( $assoc_args[ 'pause' ] ) ? (int) $assoc_args[ 'pause' ] : 0; + \ActionScheduler_DataController::set_free_ticks( $free_on ); + \ActionScheduler_DataController::set_sleep_time( $sleep ); + + do { + $actions_processed = $runner->run( $batch_size ); + $this->total_processed += $actions_processed; + } while ( $actions_processed > 0 ); + + if ( ! $config->get_dry_run() ) { + // let the scheduler know that there's nothing left to do + $scheduler = new Scheduler(); + $scheduler->mark_complete(); + } + + WP_CLI::success( sprintf( '%s complete. %d actions processed.', $config->get_dry_run() ? 'Dry run' : 'Migration', $this->total_processed ) ); + } + + /** + * Build the config object used to create the Runner + * + * @param array $args Optional arguments. + * + * @return ActionScheduler\Migration\Config + */ + private function get_migration_config( $args ) { + $args = wp_parse_args( $args, [ + 'dry-run' => false, + ] ); + + $config = Controller::instance()->get_migration_config_object(); + $config->set_dry_run( ! empty( $args[ 'dry-run' ] ) ); + + return $config; + } + + /** + * Hook command line logging into migration actions. + */ + private function init_logging() { + add_action( 'action_scheduler/migrate_action_dry_run', function ( $action_id ) { + WP_CLI::debug( sprintf( 'Dry-run: migrated action %d', $action_id ) ); + }, 10, 1 ); + add_action( 'action_scheduler/no_action_to_migrate', function ( $action_id ) { + WP_CLI::debug( sprintf( 'No action found to migrate for ID %d', $action_id ) ); + }, 10, 1 ); + add_action( 'action_scheduler/migrate_action_failed', function ( $action_id ) { + WP_CLI::warning( sprintf( 'Failed migrating action with ID %d', $action_id ) ); + }, 10, 1 ); + add_action( 'action_scheduler/migrate_action_incomplete', function ( $source_id, $destination_id ) { + WP_CLI::warning( sprintf( 'Unable to remove source action with ID %d after migrating to new ID %d', $source_id, $destination_id ) ); + }, 10, 2 ); + add_action( 'action_scheduler/migrated_action', function ( $source_id, $destination_id ) { + WP_CLI::debug( sprintf( 'Migrated source action with ID %d to new store with ID %d', $source_id, $destination_id ) ); + }, 10, 2 ); + add_action( 'action_scheduler/migration_batch_starting', function ( $batch ) { + WP_CLI::debug( 'Beginning migration of batch: ' . print_r( $batch, true ) ); + }, 10, 1 ); + add_action( 'action_scheduler/migration_batch_complete', function ( $batch ) { + WP_CLI::log( sprintf( 'Completed migration of %d actions', count( $batch ) ) ); + }, 10, 1 ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php new file mode 100644 index 0000000..c86c74e --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php @@ -0,0 +1,119 @@ +total_ticks = 0; + $this->message = $message; + $this->count = $count; + $this->interval = $interval; + } + + /** + * Increment the progress bar ticks. + */ + public function tick() { + if ( null === $this->progress_bar ) { + $this->setup_progress_bar(); + } + + $this->progress_bar->tick(); + $this->total_ticks++; + + do_action( 'action_scheduler/progress_tick', $this->total_ticks ); + } + + /** + * Get the progress bar tick count. + * + * @return int + */ + public function current() { + return $this->progress_bar ? $this->progress_bar->current() : 0; + } + + /** + * Finish the current progress bar. + */ + public function finish() { + if ( null !== $this->progress_bar ) { + $this->progress_bar->finish(); + } + + $this->progress_bar = null; + } + + /** + * Set the message used when creating the progress bar. + * + * @param string $message The message to be used when the next progress bar is created. + */ + public function set_message( $message ) { + $this->message = $message; + } + + /** + * Set the count for a new progress bar. + * + * @param integer $count The total number of ticks expected to complete. + */ + public function set_count( $count ) { + $this->count = $count; + $this->finish(); + } + + /** + * Set up the progress bar. + */ + protected function setup_progress_bar() { + $this->progress_bar = \WP_CLI\Utils\make_progress_bar( + $this->message, + $this->count, + $this->interval + ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php new file mode 100644 index 0000000..a5a6161 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php @@ -0,0 +1,304 @@ +init(); + $store->init(); + $logger->init(); + $runner->init(); + } + + if ( apply_filters( 'action_scheduler_load_deprecated_functions', true ) ) { + require_once( self::plugin_path( 'deprecated/functions.php' ) ); + } + + if ( defined( 'WP_CLI' ) && WP_CLI ) { + WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Scheduler_command' ); + if ( ! ActionScheduler_DataController::is_migration_complete() && Controller::instance()->allow_migration() ) { + $command = new Migration_Command(); + $command->register(); + } + } + + self::$data_store_initialized = true; + + /** + * Handle WP comment cleanup after migration. + */ + if ( is_a( $logger, 'ActionScheduler_DBLogger' ) && ActionScheduler_DataController::is_migration_complete() && ActionScheduler_WPCommentCleaner::has_logs() ) { + ActionScheduler_WPCommentCleaner::init(); + } + + add_action( 'action_scheduler/migration_complete', 'ActionScheduler_WPCommentCleaner::maybe_schedule_cleanup' ); + } + + /** + * Check whether the AS data store has been initialized. + * + * @param string $function_name The name of the function being called. Optional. Default `null`. + * @return bool + */ + public static function is_initialized( $function_name = null ) { + if ( ! self::$data_store_initialized && ! empty( $function_name ) ) { + $message = sprintf( __( '%s() was called before the Action Scheduler data store was initialized', 'action-scheduler' ), esc_attr( $function_name ) ); + error_log( $message, E_WARNING ); + } + + return self::$data_store_initialized; + } + + /** + * Determine if the class is one of our abstract classes. + * + * @since 3.0.0 + * + * @param string $class The class name. + * + * @return bool + */ + protected static function is_class_abstract( $class ) { + static $abstracts = array( + 'ActionScheduler' => true, + 'ActionScheduler_Abstract_ListTable' => true, + 'ActionScheduler_Abstract_QueueRunner' => true, + 'ActionScheduler_Abstract_Schedule' => true, + 'ActionScheduler_Abstract_RecurringSchedule' => true, + 'ActionScheduler_Lock' => true, + 'ActionScheduler_Logger' => true, + 'ActionScheduler_Abstract_Schema' => true, + 'ActionScheduler_Store' => true, + 'ActionScheduler_TimezoneHelper' => true, + ); + + return isset( $abstracts[ $class ] ) && $abstracts[ $class ]; + } + + /** + * Determine if the class is one of our migration classes. + * + * @since 3.0.0 + * + * @param string $class The class name. + * + * @return bool + */ + protected static function is_class_migration( $class ) { + static $migration_segments = array( + 'ActionMigrator' => true, + 'BatchFetcher' => true, + 'DBStoreMigrator' => true, + 'DryRun' => true, + 'LogMigrator' => true, + 'Config' => true, + 'Controller' => true, + 'Runner' => true, + 'Scheduler' => true, + ); + + $segments = explode( '_', $class ); + $segment = isset( $segments[ 1 ] ) ? $segments[ 1 ] : $class; + + return isset( $migration_segments[ $segment ] ) && $migration_segments[ $segment ]; + } + + /** + * Determine if the class is one of our WP CLI classes. + * + * @since 3.0.0 + * + * @param string $class The class name. + * + * @return bool + */ + protected static function is_class_cli( $class ) { + static $cli_segments = array( + 'QueueRunner' => true, + 'Command' => true, + 'ProgressBar' => true, + ); + + $segments = explode( '_', $class ); + $segment = isset( $segments[ 1 ] ) ? $segments[ 1 ] : $class; + + return isset( $cli_segments[ $segment ] ) && $cli_segments[ $segment ]; + } + + final public function __clone() { + trigger_error("Singleton. No cloning allowed!", E_USER_ERROR); + } + + final public function __wakeup() { + trigger_error("Singleton. No serialization allowed!", E_USER_ERROR); + } + + final private function __construct() {} + + /** Deprecated **/ + + public static function get_datetime_object( $when = null, $timezone = 'UTC' ) { + _deprecated_function( __METHOD__, '2.0', 'wcs_add_months()' ); + return as_get_datetime_object( $when, $timezone ); + } + + /** + * Issue deprecated warning if an Action Scheduler function is called in the shutdown hook. + * + * @param string $function_name The name of the function being called. + * @deprecated 3.1.6. + */ + public static function check_shutdown_hook( $function_name ) { + _deprecated_function( __FUNCTION__, '3.1.6' ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php new file mode 100644 index 0000000..334d5b5 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php @@ -0,0 +1,674 @@ + value pair. The + * key must much the table column name and the value is the label, which is + * automatically translated. + */ + protected $columns = array(); + + /** + * Defines the row-actions. It expects an array where the key + * is the column name and the value is an array of actions. + * + * The array of actions are key => value, where key is the method name + * (with the prefix row_action_) and the value is the label + * and title. + */ + protected $row_actions = array(); + + /** + * The Primary key of our table + */ + protected $ID = 'ID'; + + /** + * Enables sorting, it expects an array + * of columns (the column names are the values) + */ + protected $sort_by = array(); + + protected $filter_by = array(); + + /** + * @var array The status name => count combinations for this table's items. Used to display status filters. + */ + protected $status_counts = array(); + + /** + * @var array Notices to display when loading the table. Array of arrays of form array( 'class' => {updated|error}, 'message' => 'This is the notice text display.' ). + */ + protected $admin_notices = array(); + + /** + * @var string Localised string displayed in the

    element above the able. + */ + protected $table_header; + + /** + * Enables bulk actions. It must be an array where the key is the action name + * and the value is the label (which is translated automatically). It is important + * to notice that it will check that the method exists (`bulk_$name`) and will throw + * an exception if it does not exists. + * + * This class will automatically check if the current request has a bulk action, will do the + * validations and afterwards will execute the bulk method, with two arguments. The first argument + * is the array with primary keys, the second argument is a string with a list of the primary keys, + * escaped and ready to use (with `IN`). + */ + protected $bulk_actions = array(); + + /** + * Makes translation easier, it basically just wraps + * `_x` with some default (the package name). + * + * @deprecated 3.0.0 + */ + protected function translate( $text, $context = '' ) { + return $text; + } + + /** + * Reads `$this->bulk_actions` and returns an array that WP_List_Table understands. It + * also validates that the bulk method handler exists. It throws an exception because + * this is a library meant for developers and missing a bulk method is a development-time error. + */ + protected function get_bulk_actions() { + $actions = array(); + + foreach ( $this->bulk_actions as $action => $label ) { + if ( ! is_callable( array( $this, 'bulk_' . $action ) ) ) { + throw new RuntimeException( "The bulk action $action does not have a callback method" ); + } + + $actions[ $action ] = $label; + } + + return $actions; + } + + /** + * Checks if the current request has a bulk action. If that is the case it will validate and will + * execute the bulk method handler. Regardless if the action is valid or not it will redirect to + * the previous page removing the current arguments that makes this request a bulk action. + */ + protected function process_bulk_action() { + global $wpdb; + // Detect when a bulk action is being triggered. + $action = $this->current_action(); + if ( ! $action ) { + return; + } + + check_admin_referer( 'bulk-' . $this->_args['plural'] ); + + $method = 'bulk_' . $action; + if ( array_key_exists( $action, $this->bulk_actions ) && is_callable( array( $this, $method ) ) && ! empty( $_GET['ID'] ) && is_array( $_GET['ID'] ) ) { + $ids_sql = '(' . implode( ',', array_fill( 0, count( $_GET['ID'] ), '%s' ) ) . ')'; + $this->$method( $_GET['ID'], $wpdb->prepare( $ids_sql, $_GET['ID'] ) ); + } + + wp_redirect( remove_query_arg( + array( '_wp_http_referer', '_wpnonce', 'ID', 'action', 'action2' ), + wp_unslash( $_SERVER['REQUEST_URI'] ) + ) ); + exit; + } + + /** + * Default code for deleting entries. + * validated already by process_bulk_action() + */ + protected function bulk_delete( array $ids, $ids_sql ) { + $store = ActionScheduler::store(); + foreach ( $ids as $action_id ) { + $store->delete( $action_id ); + } + } + + /** + * Prepares the _column_headers property which is used by WP_Table_List at rendering. + * It merges the columns and the sortable columns. + */ + protected function prepare_column_headers() { + $this->_column_headers = array( + $this->get_columns(), + array(), + $this->get_sortable_columns(), + ); + } + + /** + * Reads $this->sort_by and returns the columns name in a format that WP_Table_List + * expects + */ + public function get_sortable_columns() { + $sort_by = array(); + foreach ( $this->sort_by as $column ) { + $sort_by[ $column ] = array( $column, true ); + } + return $sort_by; + } + + /** + * Returns the columns names for rendering. It adds a checkbox for selecting everything + * as the first column + */ + public function get_columns() { + $columns = array_merge( + array( 'cb' => '' ), + $this->columns + ); + + return $columns; + } + + /** + * Get prepared LIMIT clause for items query + * + * @global wpdb $wpdb + * + * @return string Prepared LIMIT clause for items query. + */ + protected function get_items_query_limit() { + global $wpdb; + + $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); + return $wpdb->prepare( 'LIMIT %d', $per_page ); + } + + /** + * Returns the number of items to offset/skip for this current view. + * + * @return int + */ + protected function get_items_offset() { + $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); + $current_page = $this->get_pagenum(); + if ( 1 < $current_page ) { + $offset = $per_page * ( $current_page - 1 ); + } else { + $offset = 0; + } + + return $offset; + } + + /** + * Get prepared OFFSET clause for items query + * + * @global wpdb $wpdb + * + * @return string Prepared OFFSET clause for items query. + */ + protected function get_items_query_offset() { + global $wpdb; + + return $wpdb->prepare( 'OFFSET %d', $this->get_items_offset() ); + } + + /** + * Prepares the ORDER BY sql statement. It uses `$this->sort_by` to know which + * columns are sortable. This requests validates the orderby $_GET parameter is a valid + * column and sortable. It will also use order (ASC|DESC) using DESC by default. + */ + protected function get_items_query_order() { + if ( empty( $this->sort_by ) ) { + return ''; + } + + $orderby = esc_sql( $this->get_request_orderby() ); + $order = esc_sql( $this->get_request_order() ); + + return "ORDER BY {$orderby} {$order}"; + } + + /** + * Return the sortable column specified for this request to order the results by, if any. + * + * @return string + */ + protected function get_request_orderby() { + + $valid_sortable_columns = array_values( $this->sort_by ); + + if ( ! empty( $_GET['orderby'] ) && in_array( $_GET['orderby'], $valid_sortable_columns ) ) { + $orderby = sanitize_text_field( $_GET['orderby'] ); + } else { + $orderby = $valid_sortable_columns[0]; + } + + return $orderby; + } + + /** + * Return the sortable column order specified for this request. + * + * @return string + */ + protected function get_request_order() { + + if ( ! empty( $_GET['order'] ) && 'desc' === strtolower( $_GET['order'] ) ) { + $order = 'DESC'; + } else { + $order = 'ASC'; + } + + return $order; + } + + /** + * Return the status filter for this request, if any. + * + * @return string + */ + protected function get_request_status() { + $status = ( ! empty( $_GET['status'] ) ) ? $_GET['status'] : ''; + return $status; + } + + /** + * Return the search filter for this request, if any. + * + * @return string + */ + protected function get_request_search_query() { + $search_query = ( ! empty( $_GET['s'] ) ) ? $_GET['s'] : ''; + return $search_query; + } + + /** + * Process and return the columns name. This is meant for using with SQL, this means it + * always includes the primary key. + * + * @return array + */ + protected function get_table_columns() { + $columns = array_keys( $this->columns ); + if ( ! in_array( $this->ID, $columns ) ) { + $columns[] = $this->ID; + } + + return $columns; + } + + /** + * Check if the current request is doing a "full text" search. If that is the case + * prepares the SQL to search texts using LIKE. + * + * If the current request does not have any search or if this list table does not support + * that feature it will return an empty string. + * + * TODO: + * - Improve search doing LIKE by word rather than by phrases. + * + * @return string + */ + protected function get_items_query_search() { + global $wpdb; + + if ( empty( $_GET['s'] ) || empty( $this->search_by ) ) { + return ''; + } + + $filter = array(); + foreach ( $this->search_by as $column ) { + $filter[] = $wpdb->prepare('`' . $column . '` like "%%s%"', $wpdb->esc_like( $_GET['s'] )); + } + return implode( ' OR ', $filter ); + } + + /** + * Prepares the SQL to filter rows by the options defined at `$this->filter_by`. Before trusting + * any data sent by the user it validates that it is a valid option. + */ + protected function get_items_query_filters() { + global $wpdb; + + if ( ! $this->filter_by || empty( $_GET['filter_by'] ) || ! is_array( $_GET['filter_by'] ) ) { + return ''; + } + + $filter = array(); + + foreach ( $this->filter_by as $column => $options ) { + if ( empty( $_GET['filter_by'][ $column ] ) || empty( $options[ $_GET['filter_by'][ $column ] ] ) ) { + continue; + } + + $filter[] = $wpdb->prepare( "`$column` = %s", $_GET['filter_by'][ $column ] ); + } + + return implode( ' AND ', $filter ); + + } + + /** + * Prepares the data to feed WP_Table_List. + * + * This has the core for selecting, sorting and filting data. To keep the code simple + * its logic is split among many methods (get_items_query_*). + * + * Beside populating the items this function will also count all the records that matches + * the filtering criteria and will do fill the pagination variables. + */ + public function prepare_items() { + global $wpdb; + + $this->process_bulk_action(); + + $this->process_row_actions(); + + if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { + // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; + } + + $this->prepare_column_headers(); + + $limit = $this->get_items_query_limit(); + $offset = $this->get_items_query_offset(); + $order = $this->get_items_query_order(); + $where = array_filter(array( + $this->get_items_query_search(), + $this->get_items_query_filters(), + )); + $columns = '`' . implode( '`, `', $this->get_table_columns() ) . '`'; + + if ( ! empty( $where ) ) { + $where = 'WHERE ('. implode( ') AND (', $where ) . ')'; + } else { + $where = ''; + } + + $sql = "SELECT $columns FROM {$this->table_name} {$where} {$order} {$limit} {$offset}"; + + $this->set_items( $wpdb->get_results( $sql, ARRAY_A ) ); + + $query_count = "SELECT COUNT({$this->ID}) FROM {$this->table_name} {$where}"; + $total_items = $wpdb->get_var( $query_count ); + $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page ); + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'per_page' => $per_page, + 'total_pages' => ceil( $total_items / $per_page ), + ) ); + } + + public function extra_tablenav( $which ) { + if ( ! $this->filter_by || 'top' !== $which ) { + return; + } + + echo '
    '; + + foreach ( $this->filter_by as $id => $options ) { + $default = ! empty( $_GET['filter_by'][ $id ] ) ? $_GET['filter_by'][ $id ] : ''; + if ( empty( $options[ $default ] ) ) { + $default = ''; + } + + echo ''; + } + + submit_button( esc_html__( 'Filter', 'action-scheduler' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + echo '
    '; + } + + /** + * Set the data for displaying. It will attempt to unserialize (There is a chance that some columns + * are serialized). This can be override in child classes for futher data transformation. + */ + protected function set_items( array $items ) { + $this->items = array(); + foreach ( $items as $item ) { + $this->items[ $item[ $this->ID ] ] = array_map( 'maybe_unserialize', $item ); + } + } + + /** + * Renders the checkbox for each row, this is the first column and it is named ID regardless + * of how the primary key is named (to keep the code simpler). The bulk actions will do the proper + * name transformation though using `$this->ID`. + */ + public function column_cb( $row ) { + return ''; + } + + /** + * Renders the row-actions. + * + * This method renders the action menu, it reads the definition from the $row_actions property, + * and it checks that the row action method exists before rendering it. + * + * @param array $row Row to render + * @param $column_name Current row + * @return + */ + protected function maybe_render_actions( $row, $column_name ) { + if ( empty( $this->row_actions[ $column_name ] ) ) { + return; + } + + $row_id = $row[ $this->ID ]; + + $actions = '
    '; + $action_count = 0; + foreach ( $this->row_actions[ $column_name ] as $action_key => $action ) { + + $action_count++; + + if ( ! method_exists( $this, 'row_action_' . $action_key ) ) { + continue; + } + + $action_link = ! empty( $action['link'] ) ? $action['link'] : add_query_arg( array( 'row_action' => $action_key, 'row_id' => $row_id, 'nonce' => wp_create_nonce( $action_key . '::' . $row_id ) ) ); + $span_class = ! empty( $action['class'] ) ? $action['class'] : $action_key; + $separator = ( $action_count < count( $this->row_actions[ $column_name ] ) ) ? ' | ' : ''; + + $actions .= sprintf( '', esc_attr( $span_class ) ); + $actions .= sprintf( '%3$s', esc_url( $action_link ), esc_attr( $action['desc'] ), esc_html( $action['name'] ) ); + $actions .= sprintf( '%s', $separator ); + } + $actions .= '
    '; + return $actions; + } + + protected function process_row_actions() { + $parameters = array( 'row_action', 'row_id', 'nonce' ); + foreach ( $parameters as $parameter ) { + if ( empty( $_REQUEST[ $parameter ] ) ) { + return; + } + } + + $method = 'row_action_' . $_REQUEST['row_action']; + + if ( $_REQUEST['nonce'] === wp_create_nonce( $_REQUEST[ 'row_action' ] . '::' . $_REQUEST[ 'row_id' ] ) && method_exists( $this, $method ) ) { + $this->$method( $_REQUEST['row_id'] ); + } + + wp_redirect( remove_query_arg( + array( 'row_id', 'row_action', 'nonce' ), + wp_unslash( $_SERVER['REQUEST_URI'] ) + ) ); + exit; + } + + /** + * Default column formatting, it will escape everythig for security. + */ + public function column_default( $item, $column_name ) { + $column_html = esc_html( $item[ $column_name ] ); + $column_html .= $this->maybe_render_actions( $item, $column_name ); + return $column_html; + } + + /** + * Display the table heading and search query, if any + */ + protected function display_header() { + echo '

    ' . esc_attr( $this->table_header ) . '

    '; + if ( $this->get_request_search_query() ) { + /* translators: %s: search query */ + echo '' . esc_attr( sprintf( __( 'Search results for "%s"', 'action-scheduler' ), $this->get_request_search_query() ) ) . ''; + } + echo '
    '; + } + + /** + * Display the table heading and search query, if any + */ + protected function display_admin_notices() { + foreach ( $this->admin_notices as $notice ) { + echo '
    '; + echo '

    ' . wp_kses_post( $notice['message'] ) . '

    '; + echo '
    '; + } + } + + /** + * Prints the available statuses so the user can click to filter. + */ + protected function display_filter_by_status() { + + $status_list_items = array(); + $request_status = $this->get_request_status(); + + // Helper to set 'all' filter when not set on status counts passed in + if ( ! isset( $this->status_counts['all'] ) ) { + $this->status_counts = array( 'all' => array_sum( $this->status_counts ) ) + $this->status_counts; + } + + foreach ( $this->status_counts as $status_name => $count ) { + + if ( 0 === $count ) { + continue; + } + + if ( $status_name === $request_status || ( empty( $request_status ) && 'all' === $status_name ) ) { + $status_list_item = '
  • %3$s (%4$d)
  • '; + } else { + $status_list_item = '
  • %3$s (%4$d)
  • '; + } + + $status_filter_url = ( 'all' === $status_name ) ? remove_query_arg( 'status' ) : add_query_arg( 'status', $status_name ); + $status_filter_url = remove_query_arg( array( 'paged', 's' ), $status_filter_url ); + $status_list_items[] = sprintf( $status_list_item, esc_attr( $status_name ), esc_url( $status_filter_url ), esc_html( ucfirst( $status_name ) ), absint( $count ) ); + } + + if ( $status_list_items ) { + echo '
      '; + echo implode( " | \n", $status_list_items ); + echo '
    '; + } + } + + /** + * Renders the table list, we override the original class to render the table inside a form + * and to render any needed HTML (like the search box). By doing so the callee of a function can simple + * forget about any extra HTML. + */ + protected function display_table() { + echo '
    '; + foreach ( $_GET as $key => $value ) { + if ( '_' === $key[0] || 'paged' === $key ) { + continue; + } + echo ''; + } + if ( ! empty( $this->search_by ) ) { + echo $this->search_box( $this->get_search_box_button_text(), 'plugin' ); // WPCS: XSS OK + } + parent::display(); + echo '
    '; + } + + /** + * Process any pending actions. + */ + public function process_actions() { + $this->process_bulk_action(); + $this->process_row_actions(); + + if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { + // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; + } + } + + /** + * Render the list table page, including header, notices, status filters and table. + */ + public function display_page() { + $this->prepare_items(); + + echo '
    '; + $this->display_header(); + $this->display_admin_notices(); + $this->display_filter_by_status(); + $this->display_table(); + echo '
    '; + } + + /** + * Get the text to display in the search box on the list table. + */ + protected function get_search_box_placeholder() { + return esc_html__( 'Search', 'action-scheduler' ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php new file mode 100644 index 0000000..82ecbc6 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php @@ -0,0 +1,240 @@ +created_time = microtime( true ); + + $this->store = $store ? $store : ActionScheduler_Store::instance(); + $this->monitor = $monitor ? $monitor : new ActionScheduler_FatalErrorMonitor( $this->store ); + $this->cleaner = $cleaner ? $cleaner : new ActionScheduler_QueueCleaner( $this->store ); + } + + /** + * Process an individual action. + * + * @param int $action_id The action ID to process. + * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' + * Generally, this should be capitalised and not localised as it's a proper noun. + */ + public function process_action( $action_id, $context = '' ) { + try { + $valid_action = false; + do_action( 'action_scheduler_before_execute', $action_id, $context ); + + if ( ActionScheduler_Store::STATUS_PENDING !== $this->store->get_status( $action_id ) ) { + do_action( 'action_scheduler_execution_ignored', $action_id, $context ); + return; + } + + $valid_action = true; + do_action( 'action_scheduler_begin_execute', $action_id, $context ); + + $action = $this->store->fetch_action( $action_id ); + $this->store->log_execution( $action_id ); + $action->execute(); + do_action( 'action_scheduler_after_execute', $action_id, $action, $context ); + $this->store->mark_complete( $action_id ); + } catch ( Exception $e ) { + if ( $valid_action ) { + $this->store->mark_failure( $action_id ); + do_action( 'action_scheduler_failed_execution', $action_id, $e, $context ); + } else { + do_action( 'action_scheduler_failed_validation', $action_id, $e, $context ); + } + } + + if ( isset( $action ) && is_a( $action, 'ActionScheduler_Action' ) && $action->get_schedule()->is_recurring() ) { + $this->schedule_next_instance( $action, $action_id ); + } + } + + /** + * Schedule the next instance of the action if necessary. + * + * @param ActionScheduler_Action $action + * @param int $action_id + */ + protected function schedule_next_instance( ActionScheduler_Action $action, $action_id ) { + try { + ActionScheduler::factory()->repeat( $action ); + } catch ( Exception $e ) { + do_action( 'action_scheduler_failed_to_schedule_next_instance', $action_id, $e, $action ); + } + } + + /** + * Run the queue cleaner. + * + * @author Jeremy Pry + */ + protected function run_cleanup() { + $this->cleaner->clean( 10 * $this->get_time_limit() ); + } + + /** + * Get the number of concurrent batches a runner allows. + * + * @return int + */ + public function get_allowed_concurrent_batches() { + return apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 1 ); + } + + /** + * Check if the number of allowed concurrent batches is met or exceeded. + * + * @return bool + */ + public function has_maximum_concurrent_batches() { + return $this->store->get_claim_count() >= $this->get_allowed_concurrent_batches(); + } + + /** + * Get the maximum number of seconds a batch can run for. + * + * @return int The number of seconds. + */ + protected function get_time_limit() { + + $time_limit = 30; + + // Apply deprecated filter from deprecated get_maximum_execution_time() method + if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) { + _deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' ); + $time_limit = apply_filters( 'action_scheduler_maximum_execution_time', $time_limit ); + } + + return absint( apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ) ); + } + + /** + * Get the number of seconds the process has been running. + * + * @return int The number of seconds. + */ + protected function get_execution_time() { + $execution_time = microtime( true ) - $this->created_time; + + // Get the CPU time if the hosting environment uses it rather than wall-clock time to calculate a process's execution time. + if ( function_exists( 'getrusage' ) && apply_filters( 'action_scheduler_use_cpu_execution_time', defined( 'PANTHEON_ENVIRONMENT' ) ) ) { + $resource_usages = getrusage(); + + if ( isset( $resource_usages['ru_stime.tv_usec'], $resource_usages['ru_stime.tv_usec'] ) ) { + $execution_time = $resource_usages['ru_stime.tv_sec'] + ( $resource_usages['ru_stime.tv_usec'] / 1000000 ); + } + } + + return $execution_time; + } + + /** + * Check if the host's max execution time is (likely) to be exceeded if processing more actions. + * + * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action + * @return bool + */ + protected function time_likely_to_be_exceeded( $processed_actions ) { + + $execution_time = $this->get_execution_time(); + $max_execution_time = $this->get_time_limit(); + $time_per_action = $execution_time / $processed_actions; + $estimated_time = $execution_time + ( $time_per_action * 3 ); + $likely_to_be_exceeded = $estimated_time > $max_execution_time; + + return apply_filters( 'action_scheduler_maximum_execution_time_likely_to_be_exceeded', $likely_to_be_exceeded, $this, $processed_actions, $execution_time, $max_execution_time ); + } + + /** + * Get memory limit + * + * Based on WP_Background_Process::get_memory_limit() + * + * @return int + */ + protected function get_memory_limit() { + if ( function_exists( 'ini_get' ) ) { + $memory_limit = ini_get( 'memory_limit' ); + } else { + $memory_limit = '128M'; // Sensible default, and minimum required by WooCommerce + } + + if ( ! $memory_limit || -1 === $memory_limit || '-1' === $memory_limit ) { + // Unlimited, set to 32GB. + $memory_limit = '32G'; + } + + return ActionScheduler_Compatibility::convert_hr_to_bytes( $memory_limit ); + } + + /** + * Memory exceeded + * + * Ensures the batch process never exceeds 90% of the maximum WordPress memory. + * + * Based on WP_Background_Process::memory_exceeded() + * + * @return bool + */ + protected function memory_exceeded() { + + $memory_limit = $this->get_memory_limit() * 0.90; + $current_memory = memory_get_usage( true ); + $memory_exceeded = $current_memory >= $memory_limit; + + return apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this ); + } + + /** + * See if the batch limits have been exceeded, which is when memory usage is almost at + * the maximum limit, or the time to process more actions will exceed the max time limit. + * + * Based on WC_Background_Process::batch_limits_exceeded() + * + * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action + * @return bool + */ + protected function batch_limits_exceeded( $processed_actions ) { + return $this->memory_exceeded() || $this->time_likely_to_be_exceeded( $processed_actions ); + } + + /** + * Process actions in the queue. + * + * @author Jeremy Pry + * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' + * Generally, this should be capitalised and not localised as it's a proper noun. + * @return int The number of actions processed. + */ + abstract public function run( $context = '' ); +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php new file mode 100644 index 0000000..131d475 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php @@ -0,0 +1,102 @@ +start - and logic to calculate the next run date after + * that - @see $this->calculate_next(). The $first_date property also keeps a record of when the very + * first instance of this chain of schedules ran. + * + * @var DateTime + */ + private $first_date = NULL; + + /** + * Timestamp equivalent of @see $this->first_date + * + * @var int + */ + protected $first_timestamp = NULL; + + /** + * The recurrance between each time an action is run using this schedule. + * Used to calculate the start date & time. Can be a number of seconds, in the + * case of ActionScheduler_IntervalSchedule, or a cron expression, as in the + * case of ActionScheduler_CronSchedule. Or something else. + * + * @var mixed + */ + protected $recurrence; + + /** + * @param DateTime $date The date & time to run the action. + * @param mixed $recurrence The data used to determine the schedule's recurrance. + * @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance. + */ + public function __construct( DateTime $date, $recurrence, DateTime $first = null ) { + parent::__construct( $date ); + $this->first_date = empty( $first ) ? $date : $first; + $this->recurrence = $recurrence; + } + + /** + * @return bool + */ + public function is_recurring() { + return true; + } + + /** + * Get the date & time of the first schedule in this recurring series. + * + * @return DateTime|null + */ + public function get_first_date() { + return clone $this->first_date; + } + + /** + * @return string + */ + public function get_recurrence() { + return $this->recurrence; + } + + /** + * For PHP 5.2 compat, since DateTime objects can't be serialized + * @return array + */ + public function __sleep() { + $sleep_params = parent::__sleep(); + $this->first_timestamp = $this->first_date->getTimestamp(); + return array_merge( $sleep_params, array( + 'first_timestamp', + 'recurrence' + ) ); + } + + /** + * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 + * + * Prior to Action Scheduler 3.0.0, schedules used different property names to refer + * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp + * was the same as ActionScheduler_SimpleSchedule::timestamp. This was addressed in + * Action Scheduler 3.0.0, where properties and property names were aligned for better + * inheritance. To maintain backward compatibility with scheduled serialized and stored + * prior to 3.0, we need to correctly map the old property names. + */ + public function __wakeup() { + parent::__wakeup(); + if ( $this->first_timestamp > 0 ) { + $this->first_date = as_get_datetime_object( $this->first_timestamp ); + } else { + $this->first_date = $this->get_date(); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php new file mode 100644 index 0000000..2631ef5 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php @@ -0,0 +1,83 @@ +scheduled_date + * + * @var int + */ + protected $scheduled_timestamp = NULL; + + /** + * @param DateTime $date The date & time to run the action. + */ + public function __construct( DateTime $date ) { + $this->scheduled_date = $date; + } + + /** + * Check if a schedule should recur. + * + * @return bool + */ + abstract public function is_recurring(); + + /** + * Calculate when the next instance of this schedule would run based on a given date & time. + * + * @param DateTime $after + * @return DateTime + */ + abstract protected function calculate_next( DateTime $after ); + + /** + * Get the next date & time when this schedule should run after a given date & time. + * + * @param DateTime $after + * @return DateTime|null + */ + public function get_next( DateTime $after ) { + $after = clone $after; + if ( $after > $this->scheduled_date ) { + $after = $this->calculate_next( $after ); + return $after; + } + return clone $this->scheduled_date; + } + + /** + * Get the date & time the schedule is set to run. + * + * @return DateTime|null + */ + public function get_date() { + return $this->scheduled_date; + } + + /** + * For PHP 5.2 compat, since DateTime objects can't be serialized + * @return array + */ + public function __sleep() { + $this->scheduled_timestamp = $this->scheduled_date->getTimestamp(); + return array( + 'scheduled_timestamp', + ); + } + + public function __wakeup() { + $this->scheduled_date = as_get_datetime_object( $this->scheduled_timestamp ); + unset( $this->scheduled_timestamp ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php new file mode 100644 index 0000000..62699c7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php @@ -0,0 +1,135 @@ +tables as $table ) { + $wpdb->tables[] = $table; + $name = $this->get_full_table_name( $table ); + $wpdb->$table = $name; + } + + // create the tables + if ( $this->schema_update_required() || $force_update ) { + foreach ( $this->tables as $table ) { + $this->update_table( $table ); + } + $this->mark_schema_update_complete(); + } + } + + /** + * @param string $table The name of the table + * + * @return string The CREATE TABLE statement, suitable for passing to dbDelta + */ + abstract protected function get_table_definition( $table ); + + /** + * Determine if the database schema is out of date + * by comparing the integer found in $this->schema_version + * with the option set in the WordPress options table + * + * @return bool + */ + private function schema_update_required() { + $option_name = 'schema-' . static::class; + $version_found_in_db = get_option( $option_name, 0 ); + + // Check for schema option stored by the Action Scheduler Custom Tables plugin in case site has migrated from that plugin with an older schema + if ( 0 === $version_found_in_db ) { + + $plugin_option_name = 'schema-'; + + switch ( static::class ) { + case 'ActionScheduler_StoreSchema' : + $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Store_Table_Maker'; + break; + case 'ActionScheduler_LoggerSchema' : + $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Logger_Table_Maker'; + break; + } + + $version_found_in_db = get_option( $plugin_option_name, 0 ); + + delete_option( $plugin_option_name ); + } + + return version_compare( $version_found_in_db, $this->schema_version, '<' ); + } + + /** + * Update the option in WordPress to indicate that + * our schema is now up to date + * + * @return void + */ + private function mark_schema_update_complete() { + $option_name = 'schema-' . static::class; + + // work around race conditions and ensure that our option updates + $value_to_save = (string) $this->schema_version . '.0.' . time(); + + update_option( $option_name, $value_to_save ); + } + + /** + * Update the schema for the given table + * + * @param string $table The name of the table to update + * + * @return void + */ + private function update_table( $table ) { + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); + $definition = $this->get_table_definition( $table ); + if ( $definition ) { + $updated = dbDelta( $definition ); + foreach ( $updated as $updated_table => $update_description ) { + if ( strpos( $update_description, 'Created table' ) === 0 ) { + do_action( 'action_scheduler/created_table', $updated_table, $table ); + } + } + } + } + + /** + * @param string $table + * + * @return string The full name of the table, including the + * table prefix for the current blog + */ + protected function get_full_table_name( $table ) { + return $GLOBALS[ 'wpdb' ]->prefix . $table; + } +} \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php new file mode 100644 index 0000000..86e8528 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php @@ -0,0 +1,62 @@ +get_expiration( $lock_type ) >= time() ); + } + + /** + * Set a lock. + * + * @param string $lock_type A string to identify different lock types. + * @return bool + */ + abstract public function set( $lock_type ); + + /** + * If a lock is set, return the timestamp it was set to expiry. + * + * @param string $lock_type A string to identify different lock types. + * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire. + */ + abstract public function get_expiration( $lock_type ); + + /** + * Get the amount of time to set for a given lock. 60 seconds by default. + * + * @param string $lock_type A string to identify different lock types. + * @return int + */ + protected function get_duration( $lock_type ) { + return apply_filters( 'action_scheduler_lock_duration', self::$lock_duration, $lock_type ); + } + + /** + * @return ActionScheduler_Lock + */ + public static function instance() { + if ( empty( self::$locker ) ) { + $class = apply_filters( 'action_scheduler_lock_class', 'ActionScheduler_OptionLock' ); + self::$locker = new $class(); + } + return self::$locker; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php new file mode 100644 index 0000000..3e7252c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php @@ -0,0 +1,176 @@ +hook_stored_action(); + add_action( 'action_scheduler_canceled_action', array( $this, 'log_canceled_action' ), 10, 1 ); + add_action( 'action_scheduler_begin_execute', array( $this, 'log_started_action' ), 10, 2 ); + add_action( 'action_scheduler_after_execute', array( $this, 'log_completed_action' ), 10, 3 ); + add_action( 'action_scheduler_failed_execution', array( $this, 'log_failed_action' ), 10, 3 ); + add_action( 'action_scheduler_failed_action', array( $this, 'log_timed_out_action' ), 10, 2 ); + add_action( 'action_scheduler_unexpected_shutdown', array( $this, 'log_unexpected_shutdown' ), 10, 2 ); + add_action( 'action_scheduler_reset_action', array( $this, 'log_reset_action' ), 10, 1 ); + add_action( 'action_scheduler_execution_ignored', array( $this, 'log_ignored_action' ), 10, 2 ); + add_action( 'action_scheduler_failed_fetch_action', array( $this, 'log_failed_fetch_action' ), 10, 2 ); + add_action( 'action_scheduler_failed_to_schedule_next_instance', array( $this, 'log_failed_schedule_next_instance' ), 10, 2 ); + add_action( 'action_scheduler_bulk_cancel_actions', array( $this, 'bulk_log_cancel_actions' ), 10, 1 ); + } + + public function hook_stored_action() { + add_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) ); + } + + public function unhook_stored_action() { + remove_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) ); + } + + public function log_stored_action( $action_id ) { + $this->log( $action_id, __( 'action created', 'action-scheduler' ) ); + } + + public function log_canceled_action( $action_id ) { + $this->log( $action_id, __( 'action canceled', 'action-scheduler' ) ); + } + + public function log_started_action( $action_id, $context = '' ) { + if ( ! empty( $context ) ) { + /* translators: %s: context */ + $message = sprintf( __( 'action started via %s', 'action-scheduler' ), $context ); + } else { + $message = __( 'action started', 'action-scheduler' ); + } + $this->log( $action_id, $message ); + } + + public function log_completed_action( $action_id, $action = NULL, $context = '' ) { + if ( ! empty( $context ) ) { + /* translators: %s: context */ + $message = sprintf( __( 'action complete via %s', 'action-scheduler' ), $context ); + } else { + $message = __( 'action complete', 'action-scheduler' ); + } + $this->log( $action_id, $message ); + } + + public function log_failed_action( $action_id, Exception $exception, $context = '' ) { + if ( ! empty( $context ) ) { + /* translators: 1: context 2: exception message */ + $message = sprintf( __( 'action failed via %1$s: %2$s', 'action-scheduler' ), $context, $exception->getMessage() ); + } else { + /* translators: %s: exception message */ + $message = sprintf( __( 'action failed: %s', 'action-scheduler' ), $exception->getMessage() ); + } + $this->log( $action_id, $message ); + } + + public function log_timed_out_action( $action_id, $timeout ) { + /* translators: %s: amount of time */ + $this->log( $action_id, sprintf( __( 'action timed out after %s seconds', 'action-scheduler' ), $timeout ) ); + } + + public function log_unexpected_shutdown( $action_id, $error ) { + if ( ! empty( $error ) ) { + /* translators: 1: error message 2: filename 3: line */ + $this->log( $action_id, sprintf( __( 'unexpected shutdown: PHP Fatal error %1$s in %2$s on line %3$s', 'action-scheduler' ), $error['message'], $error['file'], $error['line'] ) ); + } + } + + public function log_reset_action( $action_id ) { + $this->log( $action_id, __( 'action reset', 'action-scheduler' ) ); + } + + public function log_ignored_action( $action_id, $context = '' ) { + if ( ! empty( $context ) ) { + /* translators: %s: context */ + $message = sprintf( __( 'action ignored via %s', 'action-scheduler' ), $context ); + } else { + $message = __( 'action ignored', 'action-scheduler' ); + } + $this->log( $action_id, $message ); + } + + /** + * @param string $action_id + * @param Exception|NULL $exception The exception which occured when fetching the action. NULL by default for backward compatibility. + * + * @return ActionScheduler_LogEntry[] + */ + public function log_failed_fetch_action( $action_id, Exception $exception = NULL ) { + + if ( ! is_null( $exception ) ) { + /* translators: %s: exception message */ + $log_message = sprintf( __( 'There was a failure fetching this action: %s', 'action-scheduler' ), $exception->getMessage() ); + } else { + $log_message = __( 'There was a failure fetching this action', 'action-scheduler' ); + } + + $this->log( $action_id, $log_message ); + } + + public function log_failed_schedule_next_instance( $action_id, Exception $exception ) { + /* translators: %s: exception message */ + $this->log( $action_id, sprintf( __( 'There was a failure scheduling the next instance of this action: %s', 'action-scheduler' ), $exception->getMessage() ) ); + } + + /** + * Bulk add cancel action log entries. + * + * Implemented here for backward compatibility. Should be implemented in parent loggers + * for more performant bulk logging. + * + * @param array $action_ids List of action ID. + */ + public function bulk_log_cancel_actions( $action_ids ) { + if ( empty( $action_ids ) ) { + return; + } + + foreach ( $action_ids as $action_id ) { + $this->log_canceled_action( $action_id ); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php new file mode 100644 index 0000000..95b5ee7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php @@ -0,0 +1,345 @@ +', '>=', '<', '<=', '=') ) ) { + return $comparison_operator; + } + return '='; + } + + /** + * Get the time MySQL formated date/time string for an action's (next) scheduled date. + * + * @param ActionScheduler_Action $action + * @param DateTime $scheduled_date (optional) + * @return string + */ + protected function get_scheduled_date_string( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) { + $next = null === $scheduled_date ? $action->get_schedule()->get_date() : $scheduled_date; + if ( ! $next ) { + return '0000-00-00 00:00:00'; + } + $next->setTimezone( new DateTimeZone( 'UTC' ) ); + + return $next->format( 'Y-m-d H:i:s' ); + } + + /** + * Get the time MySQL formated date/time string for an action's (next) scheduled date. + * + * @param ActionScheduler_Action $action + * @param DateTime $scheduled_date (optional) + * @return string + */ + protected function get_scheduled_date_string_local( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) { + $next = null === $scheduled_date ? $action->get_schedule()->get_date() : $scheduled_date; + if ( ! $next ) { + return '0000-00-00 00:00:00'; + } + + ActionScheduler_TimezoneHelper::set_local_timezone( $next ); + return $next->format( 'Y-m-d H:i:s' ); + } + + /** + * Validate that we could decode action arguments. + * + * @param mixed $args The decoded arguments. + * @param int $action_id The action ID. + * + * @throws ActionScheduler_InvalidActionException When the decoded arguments are invalid. + */ + protected function validate_args( $args, $action_id ) { + // Ensure we have an array of args. + if ( ! is_array( $args ) ) { + throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id ); + } + + // Validate JSON decoding if possible. + if ( function_exists( 'json_last_error' ) && JSON_ERROR_NONE !== json_last_error() ) { + throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id, $args ); + } + } + + /** + * Validate a ActionScheduler_Schedule object. + * + * @param mixed $schedule The unserialized ActionScheduler_Schedule object. + * @param int $action_id The action ID. + * + * @throws ActionScheduler_InvalidActionException When the schedule is invalid. + */ + protected function validate_schedule( $schedule, $action_id ) { + if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) { + throw ActionScheduler_InvalidActionException::from_schedule( $action_id, $schedule ); + } + } + + /** + * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4. + * + * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However, + * with custom tables, we use an indexed VARCHAR column instead. + * + * @param ActionScheduler_Action $action Action to be validated. + * @throws InvalidArgumentException When json encoded args is too long. + */ + protected function validate_action( ActionScheduler_Action $action ) { + if ( strlen( json_encode( $action->get_args() ) ) > static::$max_args_length ) { + throw new InvalidArgumentException( sprintf( __( 'ActionScheduler_Action::$args too long. To ensure the args column can be indexed, action args should not be more than %d characters when encoded as JSON.', 'action-scheduler' ), static::$max_args_length ) ); + } + } + + /** + * Cancel pending actions by hook. + * + * @since 3.0.0 + * + * @param string $hook Hook name. + * + * @return void + */ + public function cancel_actions_by_hook( $hook ) { + $action_ids = true; + while ( ! empty( $action_ids ) ) { + $action_ids = $this->query_actions( + array( + 'hook' => $hook, + 'status' => self::STATUS_PENDING, + 'per_page' => 1000, + ) + ); + + $this->bulk_cancel_actions( $action_ids ); + } + } + + /** + * Cancel pending actions by group. + * + * @since 3.0.0 + * + * @param string $group Group slug. + * + * @return void + */ + public function cancel_actions_by_group( $group ) { + $action_ids = true; + while ( ! empty( $action_ids ) ) { + $action_ids = $this->query_actions( + array( + 'group' => $group, + 'status' => self::STATUS_PENDING, + 'per_page' => 1000, + ) + ); + + $this->bulk_cancel_actions( $action_ids ); + } + } + + /** + * Cancel a set of action IDs. + * + * @since 3.0.0 + * + * @param array $action_ids List of action IDs. + * + * @return void + */ + private function bulk_cancel_actions( $action_ids ) { + foreach ( $action_ids as $action_id ) { + $this->cancel_action( $action_id ); + } + + do_action( 'action_scheduler_bulk_cancel_actions', $action_ids ); + } + + /** + * @return array + */ + public function get_status_labels() { + return array( + self::STATUS_COMPLETE => __( 'Complete', 'action-scheduler' ), + self::STATUS_PENDING => __( 'Pending', 'action-scheduler' ), + self::STATUS_RUNNING => __( 'In-progress', 'action-scheduler' ), + self::STATUS_FAILED => __( 'Failed', 'action-scheduler' ), + self::STATUS_CANCELED => __( 'Canceled', 'action-scheduler' ), + ); + } + + /** + * Check if there are any pending scheduled actions due to run. + * + * @param ActionScheduler_Action $action + * @param DateTime $scheduled_date (optional) + * @return string + */ + public function has_pending_actions_due() { + $pending_actions = $this->query_actions( array( + 'date' => as_get_datetime_object(), + 'status' => ActionScheduler_Store::STATUS_PENDING, + ) ); + + return ! empty( $pending_actions ); + } + + /** + * Callable initialization function optionally overridden in derived classes. + */ + public function init() {} + + /** + * Callable function to mark an action as migrated optionally overridden in derived classes. + */ + public function mark_migrated( $action_id ) {} + + /** + * @return ActionScheduler_Store + */ + public static function instance() { + if ( empty( self::$store ) ) { + $class = apply_filters( 'action_scheduler_store_class', self::DEFAULT_CLASS ); + self::$store = new $class(); + } + return self::$store; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php new file mode 100644 index 0000000..fd01449 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php @@ -0,0 +1,152 @@ +format( 'U' ) ); + } + + if ( get_option( 'timezone_string' ) ) { + $date->setTimezone( new DateTimeZone( self::get_local_timezone_string() ) ); + } else { + $date->setUtcOffset( self::get_local_timezone_offset() ); + } + + return $date; + } + + /** + * Helper to retrieve the timezone string for a site until a WP core method exists + * (see https://core.trac.wordpress.org/ticket/24730). + * + * Adapted from wc_timezone_string() and https://secure.php.net/manual/en/function.timezone-name-from-abbr.php#89155. + * + * If no timezone string is set, and its not possible to match the UTC offset set for the site to a timezone + * string, then an empty string will be returned, and the UTC offset should be used to set a DateTime's + * timezone. + * + * @since 2.1.0 + * @return string PHP timezone string for the site or empty if no timezone string is available. + */ + protected static function get_local_timezone_string( $reset = false ) { + // If site timezone string exists, return it. + $timezone = get_option( 'timezone_string' ); + if ( $timezone ) { + return $timezone; + } + + // Get UTC offset, if it isn't set then return UTC. + $utc_offset = intval( get_option( 'gmt_offset', 0 ) ); + if ( 0 === $utc_offset ) { + return 'UTC'; + } + + // Adjust UTC offset from hours to seconds. + $utc_offset *= 3600; + + // Attempt to guess the timezone string from the UTC offset. + $timezone = timezone_name_from_abbr( '', $utc_offset ); + if ( $timezone ) { + return $timezone; + } + + // Last try, guess timezone string manually. + foreach ( timezone_abbreviations_list() as $abbr ) { + foreach ( $abbr as $city ) { + if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) { + return $city['timezone_id']; + } + } + } + + // No timezone string + return ''; + } + + /** + * Get timezone offset in seconds. + * + * @since 2.1.0 + * @return float + */ + protected static function get_local_timezone_offset() { + $timezone = get_option( 'timezone_string' ); + + if ( $timezone ) { + $timezone_object = new DateTimeZone( $timezone ); + return $timezone_object->getOffset( new DateTime( 'now' ) ); + } else { + return floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS; + } + } + + /** + * @deprecated 2.1.0 + */ + public static function get_local_timezone( $reset = FALSE ) { + _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); + if ( $reset ) { + self::$local_timezone = NULL; + } + if ( !isset(self::$local_timezone) ) { + $tzstring = get_option('timezone_string'); + + if ( empty($tzstring) ) { + $gmt_offset = get_option('gmt_offset'); + if ( $gmt_offset == 0 ) { + $tzstring = 'UTC'; + } else { + $gmt_offset *= HOUR_IN_SECONDS; + $tzstring = timezone_name_from_abbr( '', $gmt_offset, 1 ); + + // If there's no timezone string, try again with no DST. + if ( false === $tzstring ) { + $tzstring = timezone_name_from_abbr( '', $gmt_offset, 0 ); + } + + // Try mapping to the first abbreviation we can find. + if ( false === $tzstring ) { + $is_dst = date( 'I' ); + foreach ( timezone_abbreviations_list() as $abbr ) { + foreach ( $abbr as $city ) { + if ( $city['dst'] == $is_dst && $city['offset'] == $gmt_offset ) { + // If there's no valid timezone ID, keep looking. + if ( null === $city['timezone_id'] ) { + continue; + } + + $tzstring = $city['timezone_id']; + break 2; + } + } + } + } + + // If we still have no valid string, then fall back to UTC. + if ( false === $tzstring ) { + $tzstring = 'UTC'; + } + } + } + + self::$local_timezone = new DateTimeZone($tzstring); + } + return self::$local_timezone; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php new file mode 100644 index 0000000..6258ba1 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php @@ -0,0 +1,75 @@ +set_hook($hook); + $this->set_schedule($schedule); + $this->set_args($args); + $this->set_group($group); + } + + public function execute() { + return do_action_ref_array($this->get_hook(), $this->get_args()); + } + + /** + * @param string $hook + */ + protected function set_hook( $hook ) { + $this->hook = $hook; + } + + public function get_hook() { + return $this->hook; + } + + protected function set_schedule( ActionScheduler_Schedule $schedule ) { + $this->schedule = $schedule; + } + + /** + * @return ActionScheduler_Schedule + */ + public function get_schedule() { + return $this->schedule; + } + + protected function set_args( array $args ) { + $this->args = $args; + } + + public function get_args() { + return $this->args; + } + + /** + * @param string $group + */ + protected function set_group( $group ) { + $this->group = $group; + } + + /** + * @return string + */ + public function get_group() { + return $this->group; + } + + /** + * @return bool If the action has been finished + */ + public function is_finished() { + return FALSE; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php new file mode 100644 index 0000000..8bbc5d1 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php @@ -0,0 +1,23 @@ +set_schedule( new ActionScheduler_NullSchedule() ); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php new file mode 100644 index 0000000..b23a56c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php @@ -0,0 +1,16 @@ +set_schedule( new ActionScheduler_NullSchedule() ); + } + + public function execute() { + // don't execute + } +} + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php new file mode 100644 index 0000000..d21e869 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php @@ -0,0 +1,146 @@ +format( 'Y-m-d H:i:s' ); + ActionScheduler_TimezoneHelper::set_local_timezone( $date ); + $date_local = $date->format( 'Y-m-d H:i:s' ); + + /** @var \wpdb $wpdb */ + global $wpdb; + $wpdb->insert( $wpdb->actionscheduler_logs, [ + 'action_id' => $action_id, + 'message' => $message, + 'log_date_gmt' => $date_gmt, + 'log_date_local' => $date_local, + ], [ '%d', '%s', '%s', '%s' ] ); + + return $wpdb->insert_id; + } + + /** + * Retrieve an action log entry. + * + * @param int $entry_id Log entry ID. + * + * @return ActionScheduler_LogEntry + */ + public function get_entry( $entry_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $entry = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE log_id=%d", $entry_id ) ); + + return $this->create_entry_from_db_record( $entry ); + } + + /** + * Create an action log entry from a database record. + * + * @param object $record Log entry database record object. + * + * @return ActionScheduler_LogEntry + */ + private function create_entry_from_db_record( $record ) { + if ( empty( $record ) ) { + return new ActionScheduler_NullLogEntry(); + } + + $date = as_get_datetime_object( $record->log_date_gmt ); + + return new ActionScheduler_LogEntry( $record->action_id, $record->message, $date ); + } + + /** + * Retrieve the an action's log entries from the database. + * + * @param int $action_id Action ID. + * + * @return ActionScheduler_LogEntry[] + */ + public function get_logs( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + $records = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE action_id=%d", $action_id ) ); + + return array_map( [ $this, 'create_entry_from_db_record' ], $records ); + } + + /** + * Initialize the data store. + * + * @codeCoverageIgnore + */ + public function init() { + + $table_maker = new ActionScheduler_LoggerSchema(); + $table_maker->register_tables(); + + parent::init(); + + add_action( 'action_scheduler_deleted_action', [ $this, 'clear_deleted_action_logs' ], 10, 1 ); + } + + /** + * Delete the action logs for an action. + * + * @param int $action_id Action ID. + */ + public function clear_deleted_action_logs( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $wpdb->delete( $wpdb->actionscheduler_logs, [ 'action_id' => $action_id, ], [ '%d' ] ); + } + + /** + * Bulk add cancel action log entries. + * + * @param array $action_ids List of action ID. + */ + public function bulk_log_cancel_actions( $action_ids ) { + if ( empty( $action_ids ) ) { + return; + } + + /** @var \wpdb $wpdb */ + global $wpdb; + $date = as_get_datetime_object(); + $date_gmt = $date->format( 'Y-m-d H:i:s' ); + ActionScheduler_TimezoneHelper::set_local_timezone( $date ); + $date_local = $date->format( 'Y-m-d H:i:s' ); + $message = __( 'action canceled', 'action-scheduler' ); + $format = '(%d, ' . $wpdb->prepare( '%s, %s, %s', $message, $date_gmt, $date_local ) . ')'; + $sql_query = "INSERT {$wpdb->actionscheduler_logs} (action_id, message, log_date_gmt, log_date_local) VALUES "; + $value_rows = []; + + foreach ( $action_ids as $action_id ) { + $value_rows[] = $wpdb->prepare( $format, $action_id ); + } + $sql_query .= implode( ',', $value_rows ); + + $wpdb->query( $sql_query ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php new file mode 100644 index 0000000..d70e4ce --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php @@ -0,0 +1,845 @@ +register_tables(); + } + + /** + * Save an action. + * + * @param ActionScheduler_Action $action Action object. + * @param DateTime $date Optional schedule date. Default null. + * + * @return int Action ID. + */ + public function save_action( ActionScheduler_Action $action, \DateTime $date = null ) { + try { + + $this->validate_action( $action ); + + /** @var \wpdb $wpdb */ + global $wpdb; + $data = [ + 'hook' => $action->get_hook(), + 'status' => ( $action->is_finished() ? self::STATUS_COMPLETE : self::STATUS_PENDING ), + 'scheduled_date_gmt' => $this->get_scheduled_date_string( $action, $date ), + 'scheduled_date_local' => $this->get_scheduled_date_string_local( $action, $date ), + 'schedule' => serialize( $action->get_schedule() ), + 'group_id' => $this->get_group_id( $action->get_group() ), + ]; + $args = wp_json_encode( $action->get_args() ); + if ( strlen( $args ) <= static::$max_index_length ) { + $data['args'] = $args; + } else { + $data['args'] = $this->hash_args( $args ); + $data['extended_args'] = $args; + } + + $table_name = ! empty( $wpdb->actionscheduler_actions ) ? $wpdb->actionscheduler_actions : $wpdb->prefix . 'actionscheduler_actions'; + $wpdb->insert( $table_name, $data ); + $action_id = $wpdb->insert_id; + + if ( is_wp_error( $action_id ) ) { + throw new RuntimeException( $action_id->get_error_message() ); + } + elseif ( empty( $action_id ) ) { + throw new RuntimeException( $wpdb->last_error ? $wpdb->last_error : __( 'Database error.', 'action-scheduler' ) ); + } + + do_action( 'action_scheduler_stored_action', $action_id ); + + return $action_id; + } catch ( \Exception $e ) { + /* translators: %s: error message */ + throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); + } + } + + /** + * Generate a hash from json_encoded $args using MD5 as this isn't for security. + * + * @param string $args JSON encoded action args. + * @return string + */ + protected function hash_args( $args ) { + return md5( $args ); + } + + /** + * Get action args query param value from action args. + * + * @param array $args Action args. + * @return string + */ + protected function get_args_for_query( $args ) { + $encoded = wp_json_encode( $args ); + if ( strlen( $encoded ) <= static::$max_index_length ) { + return $encoded; + } + return $this->hash_args( $encoded ); + } + /** + * Get a group's ID based on its name/slug. + * + * @param string $slug The string name of a group. + * @param bool $create_if_not_exists Whether to create the group if it does not already exist. Default, true - create the group. + * + * @return int The group's ID, if it exists or is created, or 0 if it does not exist and is not created. + */ + protected function get_group_id( $slug, $create_if_not_exists = true ) { + if ( empty( $slug ) ) { + return 0; + } + /** @var \wpdb $wpdb */ + global $wpdb; + $group_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT group_id FROM {$wpdb->actionscheduler_groups} WHERE slug=%s", $slug ) ); + if ( empty( $group_id ) && $create_if_not_exists ) { + $group_id = $this->create_group( $slug ); + } + + return $group_id; + } + + /** + * Create an action group. + * + * @param string $slug Group slug. + * + * @return int Group ID. + */ + protected function create_group( $slug ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $wpdb->insert( $wpdb->actionscheduler_groups, [ 'slug' => $slug ] ); + + return (int) $wpdb->insert_id; + } + + /** + * Retrieve an action. + * + * @param int $action_id Action ID. + * + * @return ActionScheduler_Action + */ + public function fetch_action( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $data = $wpdb->get_row( $wpdb->prepare( + "SELECT a.*, g.slug AS `group` FROM {$wpdb->actionscheduler_actions} a LEFT JOIN {$wpdb->actionscheduler_groups} g ON a.group_id=g.group_id WHERE a.action_id=%d", + $action_id + ) ); + + if ( empty( $data ) ) { + return $this->get_null_action(); + } + + if ( ! empty( $data->extended_args ) ) { + $data->args = $data->extended_args; + unset( $data->extended_args ); + } + + try { + $action = $this->make_action_from_db_record( $data ); + } catch ( ActionScheduler_InvalidActionException $exception ) { + do_action( 'action_scheduler_failed_fetch_action', $action_id, $exception ); + return $this->get_null_action(); + } + + return $action; + } + + /** + * Create a null action. + * + * @return ActionScheduler_NullAction + */ + protected function get_null_action() { + return new ActionScheduler_NullAction(); + } + + /** + * Create an action from a database record. + * + * @param object $data Action database record. + * + * @return ActionScheduler_Action|ActionScheduler_CanceledAction|ActionScheduler_FinishedAction + */ + protected function make_action_from_db_record( $data ) { + + $hook = $data->hook; + $args = json_decode( $data->args, true ); + $schedule = unserialize( $data->schedule ); + + $this->validate_args( $args, $data->action_id ); + $this->validate_schedule( $schedule, $data->action_id ); + + if ( empty( $schedule ) ) { + $schedule = new ActionScheduler_NullSchedule(); + } + $group = $data->group ? $data->group : ''; + + return ActionScheduler::factory()->get_stored_action( $data->status, $data->hook, $args, $schedule, $group ); + } + + /** + * Find an action. + * + * @param string $hook Action hook. + * @param array $params Parameters of the action to find. + * + * @return string|null ID of the next action matching the criteria or NULL if not found. + */ + public function find_action( $hook, $params = [] ) { + $params = wp_parse_args( $params, [ + 'args' => null, + 'status' => self::STATUS_PENDING, + 'group' => '', + ] ); + + /** @var wpdb $wpdb */ + global $wpdb; + $query = "SELECT a.action_id FROM {$wpdb->actionscheduler_actions} a"; + $args = []; + if ( ! empty( $params[ 'group' ] ) ) { + $query .= " INNER JOIN {$wpdb->actionscheduler_groups} g ON g.group_id=a.group_id AND g.slug=%s"; + $args[] = $params[ 'group' ]; + } + $query .= " WHERE a.hook=%s"; + $args[] = $hook; + if ( ! is_null( $params[ 'args' ] ) ) { + $query .= " AND a.args=%s"; + $args[] = $this->get_args_for_query( $params[ 'args' ] ); + } + + $order = 'ASC'; + if ( ! empty( $params[ 'status' ] ) ) { + $query .= " AND a.status=%s"; + $args[] = $params[ 'status' ]; + + if ( self::STATUS_PENDING == $params[ 'status' ] ) { + $order = 'ASC'; // Find the next action that matches. + } else { + $order = 'DESC'; // Find the most recent action that matches. + } + } + + $query .= " ORDER BY scheduled_date_gmt $order LIMIT 1"; + + $query = $wpdb->prepare( $query, $args ); + + $id = $wpdb->get_var( $query ); + + return $id; + } + + /** + * Returns the SQL statement to query (or count) actions. + * + * @param array $query Filtering options. + * @param string $select_or_count Whether the SQL should select and return the IDs or just the row count. + * + * @return string SQL statement already properly escaped. + */ + protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) { + + if ( ! in_array( $select_or_count, array( 'select', 'count' ) ) ) { + throw new InvalidArgumentException( __( 'Invalid value for select or count parameter. Cannot query actions.', 'action-scheduler' ) ); + } + + $query = wp_parse_args( $query, [ + 'hook' => '', + 'args' => null, + 'date' => null, + 'date_compare' => '<=', + 'modified' => null, + 'modified_compare' => '<=', + 'group' => '', + 'status' => '', + 'claimed' => null, + 'per_page' => 5, + 'offset' => 0, + 'orderby' => 'date', + 'order' => 'ASC', + ] ); + + /** @var \wpdb $wpdb */ + global $wpdb; + $sql = ( 'count' === $select_or_count ) ? 'SELECT count(a.action_id)' : 'SELECT a.action_id'; + $sql .= " FROM {$wpdb->actionscheduler_actions} a"; + $sql_params = []; + + if ( ! empty( $query[ 'group' ] ) || 'group' === $query[ 'orderby' ] ) { + $sql .= " LEFT JOIN {$wpdb->actionscheduler_groups} g ON g.group_id=a.group_id"; + } + + $sql .= " WHERE 1=1"; + + if ( ! empty( $query[ 'group' ] ) ) { + $sql .= " AND g.slug=%s"; + $sql_params[] = $query[ 'group' ]; + } + + if ( $query[ 'hook' ] ) { + $sql .= " AND a.hook=%s"; + $sql_params[] = $query[ 'hook' ]; + } + if ( ! is_null( $query[ 'args' ] ) ) { + $sql .= " AND a.args=%s"; + $sql_params[] = $this->get_args_for_query( $query[ 'args' ] ); + } + + if ( $query[ 'status' ] ) { + $sql .= " AND a.status=%s"; + $sql_params[] = $query[ 'status' ]; + } + + if ( $query[ 'date' ] instanceof \DateTime ) { + $date = clone $query[ 'date' ]; + $date->setTimezone( new \DateTimeZone( 'UTC' ) ); + $date_string = $date->format( 'Y-m-d H:i:s' ); + $comparator = $this->validate_sql_comparator( $query[ 'date_compare' ] ); + $sql .= " AND a.scheduled_date_gmt $comparator %s"; + $sql_params[] = $date_string; + } + + if ( $query[ 'modified' ] instanceof \DateTime ) { + $modified = clone $query[ 'modified' ]; + $modified->setTimezone( new \DateTimeZone( 'UTC' ) ); + $date_string = $modified->format( 'Y-m-d H:i:s' ); + $comparator = $this->validate_sql_comparator( $query[ 'modified_compare' ] ); + $sql .= " AND a.last_attempt_gmt $comparator %s"; + $sql_params[] = $date_string; + } + + if ( $query[ 'claimed' ] === true ) { + $sql .= " AND a.claim_id != 0"; + } elseif ( $query[ 'claimed' ] === false ) { + $sql .= " AND a.claim_id = 0"; + } elseif ( ! is_null( $query[ 'claimed' ] ) ) { + $sql .= " AND a.claim_id = %d"; + $sql_params[] = $query[ 'claimed' ]; + } + + if ( ! empty( $query['search'] ) ) { + $sql .= " AND (a.hook LIKE %s OR (a.extended_args IS NULL AND a.args LIKE %s) OR a.extended_args LIKE %s"; + for( $i = 0; $i < 3; $i++ ) { + $sql_params[] = sprintf( '%%%s%%', $query['search'] ); + } + + $search_claim_id = (int) $query['search']; + if ( $search_claim_id ) { + $sql .= ' OR a.claim_id = %d'; + $sql_params[] = $search_claim_id; + } + + $sql .= ')'; + } + + if ( 'select' === $select_or_count ) { + switch ( $query['orderby'] ) { + case 'hook': + $orderby = 'a.hook'; + break; + case 'group': + $orderby = 'g.slug'; + break; + case 'modified': + $orderby = 'a.last_attempt_gmt'; + break; + case 'date': + default: + $orderby = 'a.scheduled_date_gmt'; + break; + } + if ( strtoupper( $query[ 'order' ] ) == 'ASC' ) { + $order = 'ASC'; + } else { + $order = 'DESC'; + } + $sql .= " ORDER BY $orderby $order"; + if ( $query[ 'per_page' ] > 0 ) { + $sql .= " LIMIT %d, %d"; + $sql_params[] = $query[ 'offset' ]; + $sql_params[] = $query[ 'per_page' ]; + } + } + + if ( ! empty( $sql_params ) ) { + $sql = $wpdb->prepare( $sql, $sql_params ); + } + + return $sql; + } + + /** + * Query for action count of list of action IDs. + * + * @param array $query Query parameters. + * @param string $query_type Whether to select or count the results. Default, select. + * + * @return null|string|array The IDs of actions matching the query + */ + public function query_actions( $query = [], $query_type = 'select' ) { + /** @var wpdb $wpdb */ + global $wpdb; + + $sql = $this->get_query_actions_sql( $query, $query_type ); + + return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); + } + + /** + * Get a count of all actions in the store, grouped by status. + * + * @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status. + */ + public function action_counts() { + global $wpdb; + + $sql = "SELECT a.status, count(a.status) as 'count'"; + $sql .= " FROM {$wpdb->actionscheduler_actions} a"; + $sql .= " GROUP BY a.status"; + + $actions_count_by_status = array(); + $action_stati_and_labels = $this->get_status_labels(); + + foreach ( $wpdb->get_results( $sql ) as $action_data ) { + // Ignore any actions with invalid status + if ( array_key_exists( $action_data->status, $action_stati_and_labels ) ) { + $actions_count_by_status[ $action_data->status ] = $action_data->count; + } + } + + return $actions_count_by_status; + } + + /** + * Cancel an action. + * + * @param int $action_id Action ID. + * + * @return void + */ + public function cancel_action( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + $updated = $wpdb->update( + $wpdb->actionscheduler_actions, + [ 'status' => self::STATUS_CANCELED ], + [ 'action_id' => $action_id ], + [ '%s' ], + [ '%d' ] + ); + if ( empty( $updated ) ) { + /* translators: %s: action ID */ + throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + do_action( 'action_scheduler_canceled_action', $action_id ); + } + + /** + * Cancel pending actions by hook. + * + * @since 3.0.0 + * + * @param string $hook Hook name. + * + * @return void + */ + public function cancel_actions_by_hook( $hook ) { + $this->bulk_cancel_actions( [ 'hook' => $hook ] ); + } + + /** + * Cancel pending actions by group. + * + * @param string $group Group slug. + * + * @return void + */ + public function cancel_actions_by_group( $group ) { + $this->bulk_cancel_actions( [ 'group' => $group ] ); + } + + /** + * Bulk cancel actions. + * + * @since 3.0.0 + * + * @param array $query_args Query parameters. + */ + protected function bulk_cancel_actions( $query_args ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + if ( ! is_array( $query_args ) ) { + return; + } + + // Don't cancel actions that are already canceled. + if ( isset( $query_args['status'] ) && $query_args['status'] == self::STATUS_CANCELED ) { + return; + } + + $action_ids = true; + $query_args = wp_parse_args( + $query_args, + [ + 'per_page' => 1000, + 'status' => self::STATUS_PENDING, + ] + ); + + while ( $action_ids ) { + $action_ids = $this->query_actions( $query_args ); + if ( empty( $action_ids ) ) { + break; + } + + $format = array_fill( 0, count( $action_ids ), '%d' ); + $query_in = '(' . implode( ',', $format ) . ')'; + $parameters = $action_ids; + array_unshift( $parameters, self::STATUS_CANCELED ); + + $wpdb->query( + $wpdb->prepare( // wpcs: PreparedSQLPlaceholders replacement count ok. + "UPDATE {$wpdb->actionscheduler_actions} SET status = %s WHERE action_id IN {$query_in}", + $parameters + ) + ); + + do_action( 'action_scheduler_bulk_cancel_actions', $action_ids ); + } + } + + /** + * Delete an action. + * + * @param int $action_id Action ID. + */ + public function delete_action( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $deleted = $wpdb->delete( $wpdb->actionscheduler_actions, [ 'action_id' => $action_id ], [ '%d' ] ); + if ( empty( $deleted ) ) { + throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + do_action( 'action_scheduler_deleted_action', $action_id ); + } + + /** + * Get the schedule date for an action. + * + * @param string $action_id Action ID. + * + * @throws \InvalidArgumentException + * @return \DateTime The local date the action is scheduled to run, or the date that it ran. + */ + public function get_date( $action_id ) { + $date = $this->get_date_gmt( $action_id ); + ActionScheduler_TimezoneHelper::set_local_timezone( $date ); + return $date; + } + + /** + * Get the GMT schedule date for an action. + * + * @param int $action_id Action ID. + * + * @throws \InvalidArgumentException + * @return \DateTime The GMT date the action is scheduled to run, or the date that it ran. + */ + protected function get_date_gmt( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $record = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d", $action_id ) ); + if ( empty( $record ) ) { + throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + if ( $record->status == self::STATUS_PENDING ) { + return as_get_datetime_object( $record->scheduled_date_gmt ); + } else { + return as_get_datetime_object( $record->last_attempt_gmt ); + } + } + + /** + * Stake a claim on actions. + * + * @param int $max_actions Maximum number of action to include in claim. + * @param \DateTime $before_date Jobs must be schedule before this date. Defaults to now. + * + * @return ActionScheduler_ActionClaim + */ + public function stake_claim( $max_actions = 10, \DateTime $before_date = null, $hooks = array(), $group = '' ) { + $claim_id = $this->generate_claim_id(); + $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group ); + $action_ids = $this->find_actions_by_claim_id( $claim_id ); + + return new ActionScheduler_ActionClaim( $claim_id, $action_ids ); + } + + /** + * Generate a new action claim. + * + * @return int Claim ID. + */ + protected function generate_claim_id() { + /** @var \wpdb $wpdb */ + global $wpdb; + $now = as_get_datetime_object(); + $wpdb->insert( $wpdb->actionscheduler_claims, [ 'date_created_gmt' => $now->format( 'Y-m-d H:i:s' ) ] ); + + return $wpdb->insert_id; + } + + /** + * Mark actions claimed. + * + * @param string $claim_id Claim Id. + * @param int $limit Number of action to include in claim. + * @param \DateTime $before_date Should use UTC timezone. + * + * @return int The number of actions that were claimed. + * @throws \RuntimeException + */ + protected function claim_actions( $claim_id, $limit, \DateTime $before_date = null, $hooks = array(), $group = '' ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + $now = as_get_datetime_object(); + $date = is_null( $before_date ) ? $now : clone $before_date; + + // can't use $wpdb->update() because of the <= condition + $update = "UPDATE {$wpdb->actionscheduler_actions} SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s"; + $params = array( + $claim_id, + $now->format( 'Y-m-d H:i:s' ), + current_time( 'mysql' ), + ); + + $where = "WHERE claim_id = 0 AND scheduled_date_gmt <= %s AND status=%s"; + $params[] = $date->format( 'Y-m-d H:i:s' ); + $params[] = self::STATUS_PENDING; + + if ( ! empty( $hooks ) ) { + $placeholders = array_fill( 0, count( $hooks ), '%s' ); + $where .= ' AND hook IN (' . join( ', ', $placeholders ) . ')'; + $params = array_merge( $params, array_values( $hooks ) ); + } + + if ( ! empty( $group ) ) { + + $group_id = $this->get_group_id( $group, false ); + + // throw exception if no matching group found, this matches ActionScheduler_wpPostStore's behaviour + if ( empty( $group_id ) ) { + /* translators: %s: group name */ + throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'action-scheduler' ), $group ) ); + } + + $where .= ' AND group_id = %d'; + $params[] = $group_id; + } + + $order = "ORDER BY attempts ASC, scheduled_date_gmt ASC, action_id ASC LIMIT %d"; + $params[] = $limit; + + $sql = $wpdb->prepare( "{$update} {$where} {$order}", $params ); + + $rows_affected = $wpdb->query( $sql ); + if ( $rows_affected === false ) { + throw new \RuntimeException( __( 'Unable to claim actions. Database error.', 'action-scheduler' ) ); + } + + return (int) $rows_affected; + } + + /** + * Get the number of active claims. + * + * @return int + */ + public function get_claim_count() { + global $wpdb; + + $sql = "SELECT COUNT(DISTINCT claim_id) FROM {$wpdb->actionscheduler_actions} WHERE claim_id != 0 AND status IN ( %s, %s)"; + $sql = $wpdb->prepare( $sql, [ self::STATUS_PENDING, self::STATUS_RUNNING ] ); + + return (int) $wpdb->get_var( $sql ); + } + + /** + * Return an action's claim ID, as stored in the claim_id column. + * + * @param string $action_id Action ID. + * @return mixed + */ + public function get_claim_id( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + $sql = "SELECT claim_id FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"; + $sql = $wpdb->prepare( $sql, $action_id ); + + return (int) $wpdb->get_var( $sql ); + } + + /** + * Retrieve the action IDs of action in a claim. + * + * @param string $claim_id Claim ID. + * + * @return int[] + */ + public function find_actions_by_claim_id( $claim_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + $sql = "SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id=%d"; + $sql = $wpdb->prepare( $sql, $claim_id ); + + $action_ids = $wpdb->get_col( $sql ); + + return array_map( 'intval', $action_ids ); + } + + /** + * Release actions from a claim and delete the claim. + * + * @param ActionScheduler_ActionClaim $claim Claim object. + */ + public function release_claim( ActionScheduler_ActionClaim $claim ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $wpdb->update( $wpdb->actionscheduler_actions, [ 'claim_id' => 0 ], [ 'claim_id' => $claim->get_id() ], [ '%d' ], [ '%d' ] ); + $wpdb->delete( $wpdb->actionscheduler_claims, [ 'claim_id' => $claim->get_id() ], [ '%d' ] ); + } + + /** + * Remove the claim from an action. + * + * @param int $action_id Action ID. + * + * @return void + */ + public function unclaim_action( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $wpdb->update( + $wpdb->actionscheduler_actions, + [ 'claim_id' => 0 ], + [ 'action_id' => $action_id ], + [ '%s' ], + [ '%d' ] + ); + } + + /** + * Mark an action as failed. + * + * @param int $action_id Action ID. + */ + public function mark_failure( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $updated = $wpdb->update( + $wpdb->actionscheduler_actions, + [ 'status' => self::STATUS_FAILED ], + [ 'action_id' => $action_id ], + [ '%s' ], + [ '%d' ] + ); + if ( empty( $updated ) ) { + throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + } + + /** + * Add execution message to action log. + * + * @param int $action_id Action ID. + * + * @return void + */ + public function log_execution( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + + $sql = "UPDATE {$wpdb->actionscheduler_actions} SET attempts = attempts+1, status=%s, last_attempt_gmt = %s, last_attempt_local = %s WHERE action_id = %d"; + $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time( 'mysql', true ), current_time( 'mysql' ), $action_id ); + $wpdb->query( $sql ); + } + + /** + * Mark an action as complete. + * + * @param int $action_id Action ID. + * + * @return void + */ + public function mark_complete( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $updated = $wpdb->update( + $wpdb->actionscheduler_actions, + [ + 'status' => self::STATUS_COMPLETE, + 'last_attempt_gmt' => current_time( 'mysql', true ), + 'last_attempt_local' => current_time( 'mysql' ), + ], + [ 'action_id' => $action_id ], + [ '%s' ], + [ '%d' ] + ); + if ( empty( $updated ) ) { + throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + } + + /** + * Get an action's status. + * + * @param int $action_id Action ID. + * + * @return string + */ + public function get_status( $action_id ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $sql = "SELECT status FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"; + $sql = $wpdb->prepare( $sql, $action_id ); + $status = $wpdb->get_var( $sql ); + + if ( $status === null ) { + throw new \InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) ); + } elseif ( empty( $status ) ) { + throw new \RuntimeException( __( 'Unknown status found for action.', 'action-scheduler' ) ); + } else { + return $status; + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php new file mode 100644 index 0000000..22d61a6 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php @@ -0,0 +1,426 @@ +demarkation_id = (int) get_option( self::DEMARKATION_OPTION, 0 ); + if ( empty( $config ) ) { + $config = Controller::instance()->get_migration_config_object(); + } + $this->primary_store = $config->get_destination_store(); + $this->secondary_store = $config->get_source_store(); + $this->migration_runner = new Runner( $config ); + } + + /** + * Initialize the table data store tables. + * + * @codeCoverageIgnore + */ + public function init() { + add_action( 'action_scheduler/created_table', [ $this, 'set_autoincrement' ], 10, 2 ); + $this->primary_store->init(); + $this->secondary_store->init(); + remove_action( 'action_scheduler/created_table', [ $this, 'set_autoincrement' ], 10 ); + } + + /** + * When the actions table is created, set its autoincrement + * value to be one higher than the posts table to ensure that + * there are no ID collisions. + * + * @param string $table_name + * @param string $table_suffix + * + * @return void + * @codeCoverageIgnore + */ + public function set_autoincrement( $table_name, $table_suffix ) { + if ( ActionScheduler_StoreSchema::ACTIONS_TABLE === $table_suffix ) { + if ( empty( $this->demarkation_id ) ) { + $this->demarkation_id = $this->set_demarkation_id(); + } + /** @var \wpdb $wpdb */ + global $wpdb; + /** + * A default date of '0000-00-00 00:00:00' is invalid in MySQL 5.7 when configured with + * sql_mode including both STRICT_TRANS_TABLES and NO_ZERO_DATE. + */ + $default_date = new DateTime( 'tomorrow' ); + $null_action = new ActionScheduler_NullAction(); + $date_gmt = $this->get_scheduled_date_string( $null_action, $default_date ); + $date_local = $this->get_scheduled_date_string_local( $null_action, $default_date ); + + $row_count = $wpdb->insert( + $wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE}, + [ + 'action_id' => $this->demarkation_id, + 'hook' => '', + 'status' => '', + 'scheduled_date_gmt' => $date_gmt, + 'scheduled_date_local' => $date_local, + 'last_attempt_gmt' => $date_gmt, + 'last_attempt_local' => $date_local, + ] + ); + if ( $row_count > 0 ) { + $wpdb->delete( + $wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE}, + [ 'action_id' => $this->demarkation_id ] + ); + } + } + } + + /** + * Store the demarkation id in WP options. + * + * @param int $id The ID to set as the demarkation point between the two stores + * Leave null to use the next ID from the WP posts table. + * + * @return int The new ID. + * + * @codeCoverageIgnore + */ + private function set_demarkation_id( $id = null ) { + if ( empty( $id ) ) { + /** @var \wpdb $wpdb */ + global $wpdb; + $id = (int) $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" ); + $id ++; + } + update_option( self::DEMARKATION_OPTION, $id ); + + return $id; + } + + /** + * Find the first matching action from the secondary store. + * If it exists, migrate it to the primary store immediately. + * After it migrates, the secondary store will logically contain + * the next matching action, so return the result thence. + * + * @param string $hook + * @param array $params + * + * @return string + */ + public function find_action( $hook, $params = [] ) { + $found_unmigrated_action = $this->secondary_store->find_action( $hook, $params ); + if ( ! empty( $found_unmigrated_action ) ) { + $this->migrate( [ $found_unmigrated_action ] ); + } + + return $this->primary_store->find_action( $hook, $params ); + } + + /** + * Find actions matching the query in the secondary source first. + * If any are found, migrate them immediately. Then the secondary + * store will contain the canonical results. + * + * @param array $query + * @param string $query_type Whether to select or count the results. Default, select. + * + * @return int[] + */ + public function query_actions( $query = [], $query_type = 'select' ) { + $found_unmigrated_actions = $this->secondary_store->query_actions( $query, 'select' ); + if ( ! empty( $found_unmigrated_actions ) ) { + $this->migrate( $found_unmigrated_actions ); + } + + return $this->primary_store->query_actions( $query, $query_type ); + } + + /** + * Get a count of all actions in the store, grouped by status + * + * @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status. + */ + public function action_counts() { + $unmigrated_actions_count = $this->secondary_store->action_counts(); + $migrated_actions_count = $this->primary_store->action_counts(); + $actions_count_by_status = array(); + + foreach ( $this->get_status_labels() as $status_key => $status_label ) { + + $count = 0; + + if ( isset( $unmigrated_actions_count[ $status_key ] ) ) { + $count += $unmigrated_actions_count[ $status_key ]; + } + + if ( isset( $migrated_actions_count[ $status_key ] ) ) { + $count += $migrated_actions_count[ $status_key ]; + } + + $actions_count_by_status[ $status_key ] = $count; + } + + $actions_count_by_status = array_filter( $actions_count_by_status ); + + return $actions_count_by_status; + } + + /** + * If any actions would have been claimed by the secondary store, + * migrate them immediately, then ask the primary store for the + * canonical claim. + * + * @param int $max_actions + * @param DateTime|null $before_date + * + * @return ActionScheduler_ActionClaim + */ + public function stake_claim( $max_actions = 10, DateTime $before_date = null, $hooks = array(), $group = '' ) { + $claim = $this->secondary_store->stake_claim( $max_actions, $before_date, $hooks, $group ); + + $claimed_actions = $claim->get_actions(); + if ( ! empty( $claimed_actions ) ) { + $this->migrate( $claimed_actions ); + } + + $this->secondary_store->release_claim( $claim ); + + return $this->primary_store->stake_claim( $max_actions, $before_date, $hooks, $group ); + } + + /** + * Migrate a list of actions to the table data store. + * + * @param array $action_ids List of action IDs. + */ + private function migrate( $action_ids ) { + $this->migration_runner->migrate_actions( $action_ids ); + } + + /** + * Save an action to the primary store. + * + * @param ActionScheduler_Action $action Action object to be saved. + * @param DateTime $date Optional. Schedule date. Default null. + * + * @return int The action ID + */ + public function save_action( ActionScheduler_Action $action, DateTime $date = null ) { + return $this->primary_store->save_action( $action, $date ); + } + + /** + * Retrieve an existing action whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function fetch_action( $action_id ) { + $store = $this->get_store_from_action_id( $action_id, true ); + if ( $store ) { + return $store->fetch_action( $action_id ); + } else { + return new ActionScheduler_NullAction(); + } + } + + /** + * Cancel an existing action whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function cancel_action( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + $store->cancel_action( $action_id ); + } + } + + /** + * Delete an existing action whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function delete_action( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + $store->delete_action( $action_id ); + } + } + + /** + * Get the schedule date an existing action whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function get_date( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + return $store->get_date( $action_id ); + } else { + return null; + } + } + + /** + * Mark an existing action as failed whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function mark_failure( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + $store->mark_failure( $action_id ); + } + } + + /** + * Log the execution of an existing action whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function log_execution( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + $store->log_execution( $action_id ); + } + } + + /** + * Mark an existing action complete whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function mark_complete( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + $store->mark_complete( $action_id ); + } + } + + /** + * Get an existing action status whether migrated or not. + * + * @param int $action_id Action ID. + */ + public function get_status( $action_id ) { + $store = $this->get_store_from_action_id( $action_id ); + if ( $store ) { + return $store->get_status( $action_id ); + } + return null; + } + + /** + * Return which store an action is stored in. + * + * @param int $action_id ID of the action. + * @param bool $primary_first Optional flag indicating search the primary store first. + * @return ActionScheduler_Store + */ + protected function get_store_from_action_id( $action_id, $primary_first = false ) { + if ( $primary_first ) { + $stores = [ + $this->primary_store, + $this->secondary_store, + ]; + } elseif ( $action_id < $this->demarkation_id ) { + $stores = [ + $this->secondary_store, + $this->primary_store, + ]; + } else { + $stores = [ + $this->primary_store, + ]; + } + + foreach ( $stores as $store ) { + $action = $store->fetch_action( $action_id ); + if ( ! is_a( $action, 'ActionScheduler_NullAction' ) ) { + return $store; + } + } + return null; + } + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * All claim-related functions should operate solely + * on the primary store. + * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Get the claim count from the table data store. + */ + public function get_claim_count() { + return $this->primary_store->get_claim_count(); + } + + /** + * Retrieve the claim ID for an action from the table data store. + * + * @param int $action_id Action ID. + */ + public function get_claim_id( $action_id ) { + return $this->primary_store->get_claim_id( $action_id ); + } + + /** + * Release a claim in the table data store. + * + * @param ActionScheduler_ActionClaim $claim Claim object. + */ + public function release_claim( ActionScheduler_ActionClaim $claim ) { + $this->primary_store->release_claim( $claim ); + } + + /** + * Release claims on an action in the table data store. + * + * @param int $action_id Action ID. + */ + public function unclaim_action( $action_id ) { + $this->primary_store->unclaim_action( $action_id ); + } + + /** + * Retrieve a list of action IDs by claim. + * + * @param int $claim_id Claim ID. + */ + public function find_actions_by_claim_id( $claim_id ) { + return $this->primary_store->find_actions_by_claim_id( $claim_id ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php new file mode 100644 index 0000000..7215ddd --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php @@ -0,0 +1,240 @@ +create_wp_comment( $action_id, $message, $date ); + return $comment_id; + } + + protected function create_wp_comment( $action_id, $message, DateTime $date ) { + + $comment_date_gmt = $date->format('Y-m-d H:i:s'); + ActionScheduler_TimezoneHelper::set_local_timezone( $date ); + $comment_data = array( + 'comment_post_ID' => $action_id, + 'comment_date' => $date->format('Y-m-d H:i:s'), + 'comment_date_gmt' => $comment_date_gmt, + 'comment_author' => self::AGENT, + 'comment_content' => $message, + 'comment_agent' => self::AGENT, + 'comment_type' => self::TYPE, + ); + return wp_insert_comment($comment_data); + } + + /** + * @param string $entry_id + * + * @return ActionScheduler_LogEntry + */ + public function get_entry( $entry_id ) { + $comment = $this->get_comment( $entry_id ); + if ( empty($comment) || $comment->comment_type != self::TYPE ) { + return new ActionScheduler_NullLogEntry(); + } + + $date = as_get_datetime_object( $comment->comment_date_gmt ); + ActionScheduler_TimezoneHelper::set_local_timezone( $date ); + return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $date ); + } + + /** + * @param string $action_id + * + * @return ActionScheduler_LogEntry[] + */ + public function get_logs( $action_id ) { + $status = 'all'; + if ( get_post_status($action_id) == 'trash' ) { + $status = 'post-trashed'; + } + $comments = get_comments(array( + 'post_id' => $action_id, + 'orderby' => 'comment_date_gmt', + 'order' => 'ASC', + 'type' => self::TYPE, + 'status' => $status, + )); + $logs = array(); + foreach ( $comments as $c ) { + $entry = $this->get_entry( $c ); + if ( !empty($entry) ) { + $logs[] = $entry; + } + } + return $logs; + } + + protected function get_comment( $comment_id ) { + return get_comment( $comment_id ); + } + + + + /** + * @param WP_Comment_Query $query + */ + public function filter_comment_queries( $query ) { + foreach ( array('ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID') as $key ) { + if ( !empty($query->query_vars[$key]) ) { + return; // don't slow down queries that wouldn't include action_log comments anyway + } + } + $query->query_vars['action_log_filter'] = TRUE; + add_filter( 'comments_clauses', array( $this, 'filter_comment_query_clauses' ), 10, 2 ); + } + + /** + * @param array $clauses + * @param WP_Comment_Query $query + * + * @return array + */ + public function filter_comment_query_clauses( $clauses, $query ) { + if ( !empty($query->query_vars['action_log_filter']) ) { + $clauses['where'] .= $this->get_where_clause(); + } + return $clauses; + } + + /** + * Make sure Action Scheduler logs are excluded from comment feeds, which use WP_Query, not + * the WP_Comment_Query class handled by @see self::filter_comment_queries(). + * + * @param string $where + * @param WP_Query $query + * + * @return string + */ + public function filter_comment_feed( $where, $query ) { + if ( is_comment_feed() ) { + $where .= $this->get_where_clause(); + } + return $where; + } + + /** + * Return a SQL clause to exclude Action Scheduler comments. + * + * @return string + */ + protected function get_where_clause() { + global $wpdb; + return sprintf( " AND {$wpdb->comments}.comment_type != '%s'", self::TYPE ); + } + + /** + * Remove action log entries from wp_count_comments() + * + * @param array $stats + * @param int $post_id + * + * @return object + */ + public function filter_comment_count( $stats, $post_id ) { + global $wpdb; + + if ( 0 === $post_id ) { + $stats = $this->get_comment_count(); + } + + return $stats; + } + + /** + * Retrieve the comment counts from our cache, or the database if the cached version isn't set. + * + * @return object + */ + protected function get_comment_count() { + global $wpdb; + + $stats = get_transient( 'as_comment_count' ); + + if ( ! $stats ) { + $stats = array(); + + $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} WHERE comment_type NOT IN('order_note','action_log') GROUP BY comment_approved", ARRAY_A ); + + $total = 0; + $stats = array(); + $approved = array( '0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed' ); + + foreach ( (array) $count as $row ) { + // Don't count post-trashed toward totals + if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] ) { + $total += $row['num_comments']; + } + if ( isset( $approved[ $row['comment_approved'] ] ) ) { + $stats[ $approved[ $row['comment_approved'] ] ] = $row['num_comments']; + } + } + + $stats['total_comments'] = $total; + $stats['all'] = $total; + + foreach ( $approved as $key ) { + if ( empty( $stats[ $key ] ) ) { + $stats[ $key ] = 0; + } + } + + $stats = (object) $stats; + set_transient( 'as_comment_count', $stats ); + } + + return $stats; + } + + /** + * Delete comment count cache whenever there is new comment or the status of a comment changes. Cache + * will be regenerated next time ActionScheduler_wpCommentLogger::filter_comment_count() is called. + */ + public function delete_comment_count_cache() { + delete_transient( 'as_comment_count' ); + } + + /** + * @codeCoverageIgnore + */ + public function init() { + add_action( 'action_scheduler_before_process_queue', array( $this, 'disable_comment_counting' ), 10, 0 ); + add_action( 'action_scheduler_after_process_queue', array( $this, 'enable_comment_counting' ), 10, 0 ); + + parent::init(); + + add_action( 'pre_get_comments', array( $this, 'filter_comment_queries' ), 10, 1 ); + add_action( 'wp_count_comments', array( $this, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs + add_action( 'comment_feed_where', array( $this, 'filter_comment_feed' ), 10, 2 ); + + // Delete comments count cache whenever there is a new comment or a comment status changes + add_action( 'wp_insert_comment', array( $this, 'delete_comment_count_cache' ) ); + add_action( 'wp_set_comment_status', array( $this, 'delete_comment_count_cache' ) ); + } + + public function disable_comment_counting() { + wp_defer_comment_counting(true); + } + public function enable_comment_counting() { + wp_defer_comment_counting(false); + } + +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php new file mode 100644 index 0000000..3618b1e --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php @@ -0,0 +1,860 @@ +validate_action( $action ); + $post_array = $this->create_post_array( $action, $scheduled_date ); + $post_id = $this->save_post_array( $post_array ); + $this->save_post_schedule( $post_id, $action->get_schedule() ); + $this->save_action_group( $post_id, $action->get_group() ); + do_action( 'action_scheduler_stored_action', $post_id ); + return $post_id; + } catch ( Exception $e ) { + throw new RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); + } + } + + protected function create_post_array( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) { + $post = array( + 'post_type' => self::POST_TYPE, + 'post_title' => $action->get_hook(), + 'post_content' => json_encode($action->get_args()), + 'post_status' => ( $action->is_finished() ? 'publish' : 'pending' ), + 'post_date_gmt' => $this->get_scheduled_date_string( $action, $scheduled_date ), + 'post_date' => $this->get_scheduled_date_string_local( $action, $scheduled_date ), + ); + return $post; + } + + protected function save_post_array( $post_array ) { + add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 ); + add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); + + $has_kses = false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ); + + if ( $has_kses ) { + // Prevent KSES from corrupting JSON in post_content. + kses_remove_filters(); + } + + $post_id = wp_insert_post($post_array); + + if ( $has_kses ) { + kses_init_filters(); + } + + remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 ); + remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); + + if ( is_wp_error($post_id) || empty($post_id) ) { + throw new RuntimeException( __( 'Unable to save action.', 'action-scheduler' ) ); + } + return $post_id; + } + + public function filter_insert_post_data( $postdata ) { + if ( $postdata['post_type'] == self::POST_TYPE ) { + $postdata['post_author'] = 0; + if ( $postdata['post_status'] == 'future' ) { + $postdata['post_status'] = 'publish'; + } + } + return $postdata; + } + + /** + * Create a (probably unique) post name for scheduled actions in a more performant manner than wp_unique_post_slug(). + * + * When an action's post status is transitioned to something other than 'draft', 'pending' or 'auto-draft, like 'publish' + * or 'failed' or 'trash', WordPress will find a unique slug (stored in post_name column) using the wp_unique_post_slug() + * function. This is done to ensure URL uniqueness. The approach taken by wp_unique_post_slug() is to iterate over existing + * post_name values that match, and append a number 1 greater than the largest. This makes sense when manually creating a + * post from the Edit Post screen. It becomes a bottleneck when automatically processing thousands of actions, with a + * database containing thousands of related post_name values. + * + * WordPress 5.1 introduces the 'pre_wp_unique_post_slug' filter for plugins to address this issue. + * + * We can short-circuit WordPress's wp_unique_post_slug() approach using the 'pre_wp_unique_post_slug' filter. This + * method is available to be used as a callback on that filter. It provides a more scalable approach to generating a + * post_name/slug that is probably unique. Because Action Scheduler never actually uses the post_name field, or an + * action's slug, being probably unique is good enough. + * + * For more backstory on this issue, see: + * - https://github.com/woocommerce/action-scheduler/issues/44 and + * - https://core.trac.wordpress.org/ticket/21112 + * + * @param string $override_slug Short-circuit return value. + * @param string $slug The desired slug (post_name). + * @param int $post_ID Post ID. + * @param string $post_status The post status. + * @param string $post_type Post type. + * @return string + */ + public function set_unique_post_slug( $override_slug, $slug, $post_ID, $post_status, $post_type ) { + if ( self::POST_TYPE == $post_type ) { + $override_slug = uniqid( self::POST_TYPE . '-', true ) . '-' . wp_generate_password( 32, false ); + } + return $override_slug; + } + + protected function save_post_schedule( $post_id, $schedule ) { + update_post_meta( $post_id, self::SCHEDULE_META_KEY, $schedule ); + } + + protected function save_action_group( $post_id, $group ) { + if ( empty($group) ) { + wp_set_object_terms( $post_id, array(), self::GROUP_TAXONOMY, FALSE ); + } else { + wp_set_object_terms( $post_id, array($group), self::GROUP_TAXONOMY, FALSE ); + } + } + + public function fetch_action( $action_id ) { + $post = $this->get_post( $action_id ); + if ( empty($post) || $post->post_type != self::POST_TYPE ) { + return $this->get_null_action(); + } + + try { + $action = $this->make_action_from_post( $post ); + } catch ( ActionScheduler_InvalidActionException $exception ) { + do_action( 'action_scheduler_failed_fetch_action', $post->ID, $exception ); + return $this->get_null_action(); + } + + return $action; + } + + protected function get_post( $action_id ) { + if ( empty($action_id) ) { + return NULL; + } + return get_post($action_id); + } + + protected function get_null_action() { + return new ActionScheduler_NullAction(); + } + + protected function make_action_from_post( $post ) { + $hook = $post->post_title; + + $args = json_decode( $post->post_content, true ); + $this->validate_args( $args, $post->ID ); + + $schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true ); + $this->validate_schedule( $schedule, $post->ID ); + + $group = wp_get_object_terms( $post->ID, self::GROUP_TAXONOMY, array('fields' => 'names') ); + $group = empty( $group ) ? '' : reset($group); + + return ActionScheduler::factory()->get_stored_action( $this->get_action_status_by_post_status( $post->post_status ), $hook, $args, $schedule, $group ); + } + + /** + * @param string $post_status + * + * @throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels() + * @return string + */ + protected function get_action_status_by_post_status( $post_status ) { + + switch ( $post_status ) { + case 'publish' : + $action_status = self::STATUS_COMPLETE; + break; + case 'trash' : + $action_status = self::STATUS_CANCELED; + break; + default : + if ( ! array_key_exists( $post_status, $this->get_status_labels() ) ) { + throw new InvalidArgumentException( sprintf( 'Invalid post status: "%s". No matching action status available.', $post_status ) ); + } + $action_status = $post_status; + break; + } + + return $action_status; + } + + /** + * @param string $action_status + * @throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels() + * @return string + */ + protected function get_post_status_by_action_status( $action_status ) { + + switch ( $action_status ) { + case self::STATUS_COMPLETE : + $post_status = 'publish'; + break; + case self::STATUS_CANCELED : + $post_status = 'trash'; + break; + default : + if ( ! array_key_exists( $action_status, $this->get_status_labels() ) ) { + throw new InvalidArgumentException( sprintf( 'Invalid action status: "%s".', $action_status ) ); + } + $post_status = $action_status; + break; + } + + return $post_status; + } + + /** + * @param string $hook + * @param array $params + * + * @return string ID of the next action matching the criteria or NULL if not found + */ + public function find_action( $hook, $params = array() ) { + $params = wp_parse_args( $params, array( + 'args' => NULL, + 'status' => ActionScheduler_Store::STATUS_PENDING, + 'group' => '', + )); + /** @var wpdb $wpdb */ + global $wpdb; + $query = "SELECT p.ID FROM {$wpdb->posts} p"; + $args = array(); + if ( !empty($params['group']) ) { + $query .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; + $query .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; + $query .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id AND t.slug=%s"; + $args[] = $params['group']; + } + $query .= " WHERE p.post_title=%s"; + $args[] = $hook; + $query .= " AND p.post_type=%s"; + $args[] = self::POST_TYPE; + if ( !is_null($params['args']) ) { + $query .= " AND p.post_content=%s"; + $args[] = json_encode($params['args']); + } + + if ( ! empty( $params['status'] ) ) { + $query .= " AND p.post_status=%s"; + $args[] = $this->get_post_status_by_action_status( $params['status'] ); + } + + switch ( $params['status'] ) { + case self::STATUS_COMPLETE: + case self::STATUS_RUNNING: + case self::STATUS_FAILED: + $order = 'DESC'; // Find the most recent action that matches + break; + case self::STATUS_PENDING: + default: + $order = 'ASC'; // Find the next action that matches + break; + } + $query .= " ORDER BY post_date_gmt $order LIMIT 1"; + + $query = $wpdb->prepare( $query, $args ); + + $id = $wpdb->get_var($query); + return $id; + } + + /** + * Returns the SQL statement to query (or count) actions. + * + * @param array $query Filtering options + * @param string $select_or_count Whether the SQL should select and return the IDs or just the row count + * @throws InvalidArgumentException if $select_or_count not count or select + * @return string SQL statement. The returned SQL is already properly escaped. + */ + protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) { + + if ( ! in_array( $select_or_count, array( 'select', 'count' ) ) ) { + throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'action-scheduler' ) ); + } + + $query = wp_parse_args( $query, array( + 'hook' => '', + 'args' => NULL, + 'date' => NULL, + 'date_compare' => '<=', + 'modified' => NULL, + 'modified_compare' => '<=', + 'group' => '', + 'status' => '', + 'claimed' => NULL, + 'per_page' => 5, + 'offset' => 0, + 'orderby' => 'date', + 'order' => 'ASC', + 'search' => '', + ) ); + + /** @var wpdb $wpdb */ + global $wpdb; + $sql = ( 'count' === $select_or_count ) ? 'SELECT count(p.ID)' : 'SELECT p.ID '; + $sql .= "FROM {$wpdb->posts} p"; + $sql_params = array(); + if ( empty( $query['group'] ) && 'group' === $query['orderby'] ) { + $sql .= " LEFT JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; + $sql .= " LEFT JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; + $sql .= " LEFT JOIN {$wpdb->terms} t ON tt.term_id=t.term_id"; + } elseif ( ! empty( $query['group'] ) ) { + $sql .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; + $sql .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; + $sql .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id"; + $sql .= " AND t.slug=%s"; + $sql_params[] = $query['group']; + } + $sql .= " WHERE post_type=%s"; + $sql_params[] = self::POST_TYPE; + if ( $query['hook'] ) { + $sql .= " AND p.post_title=%s"; + $sql_params[] = $query['hook']; + } + if ( !is_null($query['args']) ) { + $sql .= " AND p.post_content=%s"; + $sql_params[] = json_encode($query['args']); + } + + if ( ! empty( $query['status'] ) ) { + $sql .= " AND p.post_status=%s"; + $sql_params[] = $this->get_post_status_by_action_status( $query['status'] ); + } + + if ( $query['date'] instanceof DateTime ) { + $date = clone $query['date']; + $date->setTimezone( new DateTimeZone('UTC') ); + $date_string = $date->format('Y-m-d H:i:s'); + $comparator = $this->validate_sql_comparator($query['date_compare']); + $sql .= " AND p.post_date_gmt $comparator %s"; + $sql_params[] = $date_string; + } + + if ( $query['modified'] instanceof DateTime ) { + $modified = clone $query['modified']; + $modified->setTimezone( new DateTimeZone('UTC') ); + $date_string = $modified->format('Y-m-d H:i:s'); + $comparator = $this->validate_sql_comparator($query['modified_compare']); + $sql .= " AND p.post_modified_gmt $comparator %s"; + $sql_params[] = $date_string; + } + + if ( $query['claimed'] === TRUE ) { + $sql .= " AND p.post_password != ''"; + } elseif ( $query['claimed'] === FALSE ) { + $sql .= " AND p.post_password = ''"; + } elseif ( !is_null($query['claimed']) ) { + $sql .= " AND p.post_password = %s"; + $sql_params[] = $query['claimed']; + } + + if ( ! empty( $query['search'] ) ) { + $sql .= " AND (p.post_title LIKE %s OR p.post_content LIKE %s OR p.post_password LIKE %s)"; + for( $i = 0; $i < 3; $i++ ) { + $sql_params[] = sprintf( '%%%s%%', $query['search'] ); + } + } + + if ( 'select' === $select_or_count ) { + switch ( $query['orderby'] ) { + case 'hook': + $orderby = 'p.post_title'; + break; + case 'group': + $orderby = 't.name'; + break; + case 'status': + $orderby = 'p.post_status'; + break; + case 'modified': + $orderby = 'p.post_modified'; + break; + case 'claim_id': + $orderby = 'p.post_password'; + break; + case 'schedule': + case 'date': + default: + $orderby = 'p.post_date_gmt'; + break; + } + if ( 'ASC' === strtoupper( $query['order'] ) ) { + $order = 'ASC'; + } else { + $order = 'DESC'; + } + $sql .= " ORDER BY $orderby $order"; + if ( $query['per_page'] > 0 ) { + $sql .= " LIMIT %d, %d"; + $sql_params[] = $query['offset']; + $sql_params[] = $query['per_page']; + } + } + + return $wpdb->prepare( $sql, $sql_params ); + } + + /** + * @param array $query + * @param string $query_type Whether to select or count the results. Default, select. + * @return string|array The IDs of actions matching the query + */ + public function query_actions( $query = array(), $query_type = 'select' ) { + /** @var wpdb $wpdb */ + global $wpdb; + + $sql = $this->get_query_actions_sql( $query, $query_type ); + + return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); + } + + /** + * Get a count of all actions in the store, grouped by status + * + * @return array + */ + public function action_counts() { + + $action_counts_by_status = array(); + $action_stati_and_labels = $this->get_status_labels(); + $posts_count_by_status = (array) wp_count_posts( self::POST_TYPE, 'readable' ); + + foreach ( $posts_count_by_status as $post_status_name => $count ) { + + try { + $action_status_name = $this->get_action_status_by_post_status( $post_status_name ); + } catch ( Exception $e ) { + // Ignore any post statuses that aren't for actions + continue; + } + if ( array_key_exists( $action_status_name, $action_stati_and_labels ) ) { + $action_counts_by_status[ $action_status_name ] = $count; + } + } + + return $action_counts_by_status; + } + + /** + * @param string $action_id + * + * @throws InvalidArgumentException + */ + public function cancel_action( $action_id ) { + $post = get_post( $action_id ); + if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) { + throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + do_action( 'action_scheduler_canceled_action', $action_id ); + add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); + wp_trash_post( $action_id ); + remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); + } + + public function delete_action( $action_id ) { + $post = get_post( $action_id ); + if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) { + throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + do_action( 'action_scheduler_deleted_action', $action_id ); + + wp_delete_post( $action_id, TRUE ); + } + + /** + * @param string $action_id + * + * @throws InvalidArgumentException + * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran. + */ + public function get_date( $action_id ) { + $next = $this->get_date_gmt( $action_id ); + return ActionScheduler_TimezoneHelper::set_local_timezone( $next ); + } + + /** + * @param string $action_id + * + * @throws InvalidArgumentException + * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran. + */ + public function get_date_gmt( $action_id ) { + $post = get_post( $action_id ); + if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) { + throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + if ( $post->post_status == 'publish' ) { + return as_get_datetime_object( $post->post_modified_gmt ); + } else { + return as_get_datetime_object( $post->post_date_gmt ); + } + } + + /** + * @param int $max_actions + * @param DateTime $before_date Jobs must be schedule before this date. Defaults to now. + * @param array $hooks Claim only actions with a hook or hooks. + * @param string $group Claim only actions in the given group. + * + * @return ActionScheduler_ActionClaim + * @throws RuntimeException When there is an error staking a claim. + * @throws InvalidArgumentException When the given group is not valid. + */ + public function stake_claim( $max_actions = 10, DateTime $before_date = null, $hooks = array(), $group = '' ) { + $claim_id = $this->generate_claim_id(); + $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group ); + $action_ids = $this->find_actions_by_claim_id( $claim_id ); + + return new ActionScheduler_ActionClaim( $claim_id, $action_ids ); + } + + /** + * @return int + */ + public function get_claim_count(){ + global $wpdb; + + $sql = "SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')"; + $sql = $wpdb->prepare( $sql, array( self::POST_TYPE ) ); + + return $wpdb->get_var( $sql ); + } + + protected function generate_claim_id() { + $claim_id = md5(microtime(true) . rand(0,1000)); + return substr($claim_id, 0, 20); // to fit in db field with 20 char limit + } + + /** + * @param string $claim_id + * @param int $limit + * @param DateTime $before_date Should use UTC timezone. + * @param array $hooks Claim only actions with a hook or hooks. + * @param string $group Claim only actions in the given group. + * + * @return int The number of actions that were claimed + * @throws RuntimeException When there is a database error. + * @throws InvalidArgumentException When the group is invalid. + */ + protected function claim_actions( $claim_id, $limit, DateTime $before_date = null, $hooks = array(), $group = '' ) { + // Set up initial variables. + $date = null === $before_date ? as_get_datetime_object() : clone $before_date; + $limit_ids = ! empty( $group ); + $ids = $limit_ids ? $this->get_actions_by_group( $group, $limit, $date ) : array(); + + // If limiting by IDs and no posts found, then return early since we have nothing to update. + if ( $limit_ids && 0 === count( $ids ) ) { + return 0; + } + + /** @var wpdb $wpdb */ + global $wpdb; + + /* + * Build up custom query to update the affected posts. Parameters are built as a separate array + * to make it easier to identify where they are in the query. + * + * We can't use $wpdb->update() here because of the "ID IN ..." clause. + */ + $update = "UPDATE {$wpdb->posts} SET post_password = %s, post_modified_gmt = %s, post_modified = %s"; + $params = array( + $claim_id, + current_time( 'mysql', true ), + current_time( 'mysql' ), + ); + + // Build initial WHERE clause. + $where = "WHERE post_type = %s AND post_status = %s AND post_password = ''"; + $params[] = self::POST_TYPE; + $params[] = ActionScheduler_Store::STATUS_PENDING; + + if ( ! empty( $hooks ) ) { + $placeholders = array_fill( 0, count( $hooks ), '%s' ); + $where .= ' AND post_title IN (' . join( ', ', $placeholders ) . ')'; + $params = array_merge( $params, array_values( $hooks ) ); + } + + /* + * Add the IDs to the WHERE clause. IDs not escaped because they came directly from a prior DB query. + * + * If we're not limiting by IDs, then include the post_date_gmt clause. + */ + if ( $limit_ids ) { + $where .= ' AND ID IN (' . join( ',', $ids ) . ')'; + } else { + $where .= ' AND post_date_gmt <= %s'; + $params[] = $date->format( 'Y-m-d H:i:s' ); + } + + // Add the ORDER BY clause and,ms limit. + $order = 'ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT %d'; + $params[] = $limit; + + // Run the query and gather results. + $rows_affected = $wpdb->query( $wpdb->prepare( "{$update} {$where} {$order}", $params ) ); + if ( $rows_affected === false ) { + throw new RuntimeException( __( 'Unable to claim actions. Database error.', 'action-scheduler' ) ); + } + + return (int) $rows_affected; + } + + /** + * Get IDs of actions within a certain group and up to a certain date/time. + * + * @param string $group The group to use in finding actions. + * @param int $limit The number of actions to retrieve. + * @param DateTime $date DateTime object representing cutoff time for actions. Actions retrieved will be + * up to and including this DateTime. + * + * @return array IDs of actions in the appropriate group and before the appropriate time. + * @throws InvalidArgumentException When the group does not exist. + */ + protected function get_actions_by_group( $group, $limit, DateTime $date ) { + // Ensure the group exists before continuing. + if ( ! term_exists( $group, self::GROUP_TAXONOMY )) { + throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'action-scheduler' ), $group ) ); + } + + // Set up a query for post IDs to use later. + $query = new WP_Query(); + $query_args = array( + 'fields' => 'ids', + 'post_type' => self::POST_TYPE, + 'post_status' => ActionScheduler_Store::STATUS_PENDING, + 'has_password' => false, + 'posts_per_page' => $limit * 3, + 'suppress_filters' => true, + 'no_found_rows' => true, + 'orderby' => array( + 'menu_order' => 'ASC', + 'date' => 'ASC', + 'ID' => 'ASC', + ), + 'date_query' => array( + 'column' => 'post_date_gmt', + 'before' => $date->format( 'Y-m-d H:i' ), + 'inclusive' => true, + ), + 'tax_query' => array( + array( + 'taxonomy' => self::GROUP_TAXONOMY, + 'field' => 'slug', + 'terms' => $group, + 'include_children' => false, + ), + ), + ); + + return $query->query( $query_args ); + } + + /** + * @param string $claim_id + * @return array + */ + public function find_actions_by_claim_id( $claim_id ) { + /** @var wpdb $wpdb */ + global $wpdb; + $sql = "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s"; + $sql = $wpdb->prepare( $sql, array( self::POST_TYPE, $claim_id ) ); + $action_ids = $wpdb->get_col( $sql ); + return $action_ids; + } + + public function release_claim( ActionScheduler_ActionClaim $claim ) { + $action_ids = $this->find_actions_by_claim_id( $claim->get_id() ); + if ( empty( $action_ids ) ) { + return; // nothing to do + } + $action_id_string = implode( ',', array_map( 'intval', $action_ids ) ); + /** @var wpdb $wpdb */ + global $wpdb; + $sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID IN ($action_id_string) AND post_password = %s"; + $sql = $wpdb->prepare( $sql, array( $claim->get_id() ) ); + $result = $wpdb->query( $sql ); + if ( $result === false ) { + /* translators: %s: claim ID */ + throw new RuntimeException( sprintf( __( 'Unable to unlock claim %s. Database error.', 'action-scheduler' ), $claim->get_id() ) ); + } + } + + /** + * @param string $action_id + */ + public function unclaim_action( $action_id ) { + /** @var wpdb $wpdb */ + global $wpdb; + $sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s"; + $sql = $wpdb->prepare( $sql, $action_id, self::POST_TYPE ); + $result = $wpdb->query( $sql ); + if ( $result === false ) { + /* translators: %s: action ID */ + throw new RuntimeException( sprintf( __( 'Unable to unlock claim on action %s. Database error.', 'action-scheduler' ), $action_id ) ); + } + } + + public function mark_failure( $action_id ) { + /** @var wpdb $wpdb */ + global $wpdb; + $sql = "UPDATE {$wpdb->posts} SET post_status = %s WHERE ID = %d AND post_type = %s"; + $sql = $wpdb->prepare( $sql, self::STATUS_FAILED, $action_id, self::POST_TYPE ); + $result = $wpdb->query( $sql ); + if ( $result === false ) { + /* translators: %s: action ID */ + throw new RuntimeException( sprintf( __( 'Unable to mark failure on action %s. Database error.', 'action-scheduler' ), $action_id ) ); + } + } + + /** + * Return an action's claim ID, as stored in the post password column + * + * @param string $action_id + * @return mixed + */ + public function get_claim_id( $action_id ) { + return $this->get_post_column( $action_id, 'post_password' ); + } + + /** + * Return an action's status, as stored in the post status column + * + * @param string $action_id + * @return mixed + */ + public function get_status( $action_id ) { + $status = $this->get_post_column( $action_id, 'post_status' ); + + if ( $status === null ) { + throw new InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) ); + } + + return $this->get_action_status_by_post_status( $status ); + } + + private function get_post_column( $action_id, $column_name ) { + /** @var \wpdb $wpdb */ + global $wpdb; + return $wpdb->get_var( $wpdb->prepare( "SELECT {$column_name} FROM {$wpdb->posts} WHERE ID=%d AND post_type=%s", $action_id, self::POST_TYPE ) ); + } + + /** + * @param string $action_id + */ + public function log_execution( $action_id ) { + /** @var wpdb $wpdb */ + global $wpdb; + + $sql = "UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s"; + $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time('mysql', true), current_time('mysql'), $action_id, self::POST_TYPE ); + $wpdb->query($sql); + } + + /** + * Record that an action was completed. + * + * @param int $action_id ID of the completed action. + * @throws InvalidArgumentException|RuntimeException + */ + public function mark_complete( $action_id ) { + $post = get_post( $action_id ); + if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) { + throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) ); + } + add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 ); + add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); + $result = wp_update_post(array( + 'ID' => $action_id, + 'post_status' => 'publish', + ), TRUE); + remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 ); + remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); + if ( is_wp_error( $result ) ) { + throw new RuntimeException( $result->get_error_message() ); + } + } + + /** + * Mark action as migrated when there is an error deleting the action. + * + * @param int $action_id Action ID. + */ + public function mark_migrated( $action_id ) { + wp_update_post( + array( + 'ID' => $action_id, + 'post_status' => 'migrated' + ) + ); + } + + /** + * Determine whether the post store can be migrated. + * + * @return bool + */ + public function migration_dependencies_met( $setting ) { + global $wpdb; + + $dependencies_met = get_transient( self::DEPENDENCIES_MET ); + if ( empty( $dependencies_met ) ) { + $maximum_args_length = apply_filters( 'action_scheduler_maximum_args_length', 191 ); + $found_action = $wpdb->get_var( + $wpdb->prepare( + "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND CHAR_LENGTH(post_content) > %d LIMIT 1", + $maximum_args_length, + self::POST_TYPE + ) + ); + $dependencies_met = $found_action ? 'no' : 'yes'; + set_transient( self::DEPENDENCIES_MET, $dependencies_met, DAY_IN_SECONDS ); + } + + return 'yes' == $dependencies_met ? $setting : false; + } + + /** + * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4. + * + * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However, + * as we prepare to move to custom tables, and can use an indexed VARCHAR column instead, we want to warn + * developers of this impending requirement. + * + * @param ActionScheduler_Action $action + */ + protected function validate_action( ActionScheduler_Action $action ) { + try { + parent::validate_action( $action ); + } catch ( Exception $e ) { + $message = sprintf( __( '%s Support for strings longer than this will be removed in a future version.', 'action-scheduler' ), $e->getMessage() ); + _doing_it_wrong( 'ActionScheduler_Action::$args', $message, '2.1.0' ); + } + } + + /** + * @codeCoverageIgnore + */ + public function init() { + add_filter( 'action_scheduler_migration_dependencies_met', array( $this, 'migration_dependencies_met' ) ); + + $post_type_registrar = new ActionScheduler_wpPostStore_PostTypeRegistrar(); + $post_type_registrar->register(); + + $post_status_registrar = new ActionScheduler_wpPostStore_PostStatusRegistrar(); + $post_status_registrar->register(); + + $taxonomy_registrar = new ActionScheduler_wpPostStore_TaxonomyRegistrar(); + $taxonomy_registrar->register(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php new file mode 100644 index 0000000..246bc34 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php @@ -0,0 +1,58 @@ +post_status_args(), $this->post_status_running_labels() ) ); + register_post_status( ActionScheduler_Store::STATUS_FAILED, array_merge( $this->post_status_args(), $this->post_status_failed_labels() ) ); + } + + /** + * Build the args array for the post type definition + * + * @return array + */ + protected function post_status_args() { + $args = array( + 'public' => false, + 'exclude_from_search' => false, + 'show_in_admin_all_list' => true, + 'show_in_admin_status_list' => true, + ); + + return apply_filters( 'action_scheduler_post_status_args', $args ); + } + + /** + * Build the args array for the post type definition + * + * @return array + */ + protected function post_status_failed_labels() { + $labels = array( + 'label' => _x( 'Failed', 'post', 'action-scheduler' ), + /* translators: %s: count */ + 'label_count' => _n_noop( 'Failed (%s)', 'Failed (%s)', 'action-scheduler' ), + ); + + return apply_filters( 'action_scheduler_post_status_failed_labels', $labels ); + } + + /** + * Build the args array for the post type definition + * + * @return array + */ + protected function post_status_running_labels() { + $labels = array( + 'label' => _x( 'In-Progress', 'post', 'action-scheduler' ), + /* translators: %s: count */ + 'label_count' => _n_noop( 'In-Progress (%s)', 'In-Progress (%s)', 'action-scheduler' ), + ); + + return apply_filters( 'action_scheduler_post_status_running_labels', $labels ); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php new file mode 100644 index 0000000..8c63bd0 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php @@ -0,0 +1,50 @@ +post_type_args() ); + } + + /** + * Build the args array for the post type definition + * + * @return array + */ + protected function post_type_args() { + $args = array( + 'label' => __( 'Scheduled Actions', 'action-scheduler' ), + 'description' => __( 'Scheduled actions are hooks triggered on a cetain date and time.', 'action-scheduler' ), + 'public' => false, + 'map_meta_cap' => true, + 'hierarchical' => false, + 'supports' => array('title', 'editor','comments'), + 'rewrite' => false, + 'query_var' => false, + 'can_export' => true, + 'ep_mask' => EP_NONE, + 'labels' => array( + 'name' => __( 'Scheduled Actions', 'action-scheduler' ), + 'singular_name' => __( 'Scheduled Action', 'action-scheduler' ), + 'menu_name' => _x( 'Scheduled Actions', 'Admin menu name', 'action-scheduler' ), + 'add_new' => __( 'Add', 'action-scheduler' ), + 'add_new_item' => __( 'Add New Scheduled Action', 'action-scheduler' ), + 'edit' => __( 'Edit', 'action-scheduler' ), + 'edit_item' => __( 'Edit Scheduled Action', 'action-scheduler' ), + 'new_item' => __( 'New Scheduled Action', 'action-scheduler' ), + 'view' => __( 'View Action', 'action-scheduler' ), + 'view_item' => __( 'View Action', 'action-scheduler' ), + 'search_items' => __( 'Search Scheduled Actions', 'action-scheduler' ), + 'not_found' => __( 'No actions found', 'action-scheduler' ), + 'not_found_in_trash' => __( 'No actions found in trash', 'action-scheduler' ), + ), + ); + + $args = apply_filters('action_scheduler_post_type_args', $args); + return $args; + } +} + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php new file mode 100644 index 0000000..367401f --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php @@ -0,0 +1,26 @@ +taxonomy_args() ); + } + + protected function taxonomy_args() { + $args = array( + 'label' => __( 'Action Group', 'action-scheduler' ), + 'public' => false, + 'hierarchical' => false, + 'show_admin_column' => true, + 'query_var' => false, + 'rewrite' => false, + ); + + $args = apply_filters( 'action_scheduler_taxonomy_args', $args ); + return $args; + } +} + \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php new file mode 100644 index 0000000..c77d083 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php @@ -0,0 +1,109 @@ +source = $source_store; + $this->destination = $destination_store; + $this->log_migrator = $log_migrator; + } + + /** + * Migrate an action. + * + * @param int $source_action_id Action ID. + * + * @return int 0|new action ID + */ + public function migrate( $source_action_id ) { + try { + $action = $this->source->fetch_action( $source_action_id ); + $status = $this->source->get_status( $source_action_id ); + } catch ( \Exception $e ) { + $action = null; + $status = ''; + } + + if ( is_null( $action ) || empty( $status ) || ! $action->get_schedule()->get_date() ) { + // null action or empty status means the fetch operation failed or the action didn't exist + // null schedule means it's missing vital data + // delete it and move on + try { + $this->source->delete_action( $source_action_id ); + } catch ( \Exception $e ) { + // nothing to do, it didn't exist in the first place + } + do_action( 'action_scheduler/no_action_to_migrate', $source_action_id, $this->source, $this->destination ); + + return 0; + } + + try { + + // Make sure the last attempt date is set correctly for completed and failed actions + $last_attempt_date = ( $status !== \ActionScheduler_Store::STATUS_PENDING ) ? $this->source->get_date( $source_action_id ) : null; + + $destination_action_id = $this->destination->save_action( $action, null, $last_attempt_date ); + } catch ( \Exception $e ) { + do_action( 'action_scheduler/migrate_action_failed', $source_action_id, $this->source, $this->destination ); + + return 0; // could not save the action in the new store + } + + try { + switch ( $status ) { + case \ActionScheduler_Store::STATUS_FAILED : + $this->destination->mark_failure( $destination_action_id ); + break; + case \ActionScheduler_Store::STATUS_CANCELED : + $this->destination->cancel_action( $destination_action_id ); + break; + } + + $this->log_migrator->migrate( $source_action_id, $destination_action_id ); + $this->source->delete_action( $source_action_id ); + + $test_action = $this->source->fetch_action( $source_action_id ); + if ( ! is_a( $test_action, 'ActionScheduler_NullAction' ) ) { + throw new \RuntimeException( sprintf( __( 'Unable to remove source migrated action %s', 'action-scheduler' ), $source_action_id ) ); + } + do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination ); + + return $destination_action_id; + } catch ( \Exception $e ) { + // could not delete from the old store + $this->source->mark_migrated( $source_action_id ); + do_action( 'action_scheduler/migrate_action_incomplete', $source_action_id, $destination_action_id, $this->source, $this->destination ); + do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination ); + + return $destination_action_id; + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php new file mode 100644 index 0000000..41c21da --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php @@ -0,0 +1,47 @@ + $this->get_scheduled_date_string( $action, $last_attempt_date ), + 'last_attempt_local' => $this->get_scheduled_date_string_local( $action, $last_attempt_date ), + ]; + + $wpdb->update( $wpdb->actionscheduler_actions, $data, array( 'action_id' => $action_id ), array( '%s', '%s' ), array( '%d' ) ); + } + + return $action_id; + } catch ( \Exception $e ) { + throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php new file mode 100644 index 0000000..4872801 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php @@ -0,0 +1,86 @@ +store = $source_store; + } + + /** + * Retrieve a list of actions. + * + * @param int $count The number of actions to retrieve + * + * @return int[] A list of action IDs + */ + public function fetch( $count = 10 ) { + foreach ( $this->get_query_strategies( $count ) as $query ) { + $action_ids = $this->store->query_actions( $query ); + if ( ! empty( $action_ids ) ) { + return $action_ids; + } + } + + return []; + } + + /** + * Generate a list of prioritized of action search parameters. + * + * @param int $count Number of actions to find. + * + * @return array + */ + private function get_query_strategies( $count ) { + $now = as_get_datetime_object(); + $args = [ + 'date' => $now, + 'per_page' => $count, + 'offset' => 0, + 'orderby' => 'date', + 'order' => 'ASC', + ]; + + $priorities = [ + Store::STATUS_PENDING, + Store::STATUS_FAILED, + Store::STATUS_CANCELED, + Store::STATUS_COMPLETE, + Store::STATUS_RUNNING, + '', // any other unanticipated status + ]; + + foreach ( $priorities as $status ) { + yield wp_parse_args( [ + 'status' => $status, + 'date_compare' => '<=', + ], $args ); + yield wp_parse_args( [ + 'status' => $status, + 'date_compare' => '>=', + ], $args ); + } + } +} \ No newline at end of file diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Config.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Config.php new file mode 100644 index 0000000..50f41ff --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Config.php @@ -0,0 +1,168 @@ +source_store ) ) { + throw new \RuntimeException( __( 'Source store must be configured before running a migration', 'action-scheduler' ) ); + } + + return $this->source_store; + } + + /** + * Set the configured source store. + * + * @param ActionScheduler_Store $store Source store object. + */ + public function set_source_store( Store $store ) { + $this->source_store = $store; + } + + /** + * Get the configured source loger. + * + * @return ActionScheduler_Logger + */ + public function get_source_logger() { + if ( empty( $this->source_logger ) ) { + throw new \RuntimeException( __( 'Source logger must be configured before running a migration', 'action-scheduler' ) ); + } + + return $this->source_logger; + } + + /** + * Set the configured source logger. + * + * @param ActionScheduler_Logger $logger + */ + public function set_source_logger( Logger $logger ) { + $this->source_logger = $logger; + } + + /** + * Get the configured destination store. + * + * @return ActionScheduler_Store + */ + public function get_destination_store() { + if ( empty( $this->destination_store ) ) { + throw new \RuntimeException( __( 'Destination store must be configured before running a migration', 'action-scheduler' ) ); + } + + return $this->destination_store; + } + + /** + * Set the configured destination store. + * + * @param ActionScheduler_Store $store + */ + public function set_destination_store( Store $store ) { + $this->destination_store = $store; + } + + /** + * Get the configured destination logger. + * + * @return ActionScheduler_Logger + */ + public function get_destination_logger() { + if ( empty( $this->destination_logger ) ) { + throw new \RuntimeException( __( 'Destination logger must be configured before running a migration', 'action-scheduler' ) ); + } + + return $this->destination_logger; + } + + /** + * Set the configured destination logger. + * + * @param ActionScheduler_Logger $logger + */ + public function set_destination_logger( Logger $logger ) { + $this->destination_logger = $logger; + } + + /** + * Get flag indicating whether it's a dry run. + * + * @return bool + */ + public function get_dry_run() { + return $this->dry_run; + } + + /** + * Set flag indicating whether it's a dry run. + * + * @param bool $dry_run + */ + public function set_dry_run( $dry_run ) { + $this->dry_run = (bool) $dry_run; + } + + /** + * Get progress bar object. + * + * @return ActionScheduler\WPCLI\ProgressBar + */ + public function get_progress_bar() { + return $this->progress_bar; + } + + /** + * Set progress bar object. + * + * @param ActionScheduler\WPCLI\ProgressBar $progress_bar + */ + public function set_progress_bar( ProgressBar $progress_bar ) { + $this->progress_bar = $progress_bar; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Controller.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Controller.php new file mode 100644 index 0000000..fb282fb --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Controller.php @@ -0,0 +1,206 @@ +migration_scheduler = $migration_scheduler; + $this->store_classname = ''; + } + + /** + * Set the action store class name. + * + * @param string $class Classname of the store class. + * + * @return string + */ + public function get_store_class( $class ) { + if ( \ActionScheduler_DataController::is_migration_complete() ) { + return \ActionScheduler_DataController::DATASTORE_CLASS; + } elseif ( \ActionScheduler_Store::DEFAULT_CLASS !== $class ) { + $this->store_classname = $class; + return $class; + } else { + return 'ActionScheduler_HybridStore'; + } + } + + /** + * Set the action logger class name. + * + * @param string $class Classname of the logger class. + * + * @return string + */ + public function get_logger_class( $class ) { + \ActionScheduler_Store::instance(); + + if ( $this->has_custom_datastore() ) { + $this->logger_classname = $class; + return $class; + } else { + return \ActionScheduler_DataController::LOGGER_CLASS; + } + } + + /** + * Get flag indicating whether a custom datastore is in use. + * + * @return bool + */ + public function has_custom_datastore() { + return (bool) $this->store_classname; + } + + /** + * Set up the background migration process + * + * @return void + */ + public function schedule_migration() { + if ( \ActionScheduler_DataController::is_migration_complete() || $this->migration_scheduler->is_migration_scheduled() ) { + return; + } + + $this->migration_scheduler->schedule_migration(); + } + + /** + * Get the default migration config object + * + * @return ActionScheduler\Migration\Config + */ + public function get_migration_config_object() { + static $config = null; + + if ( ! $config ) { + $source_store = $this->store_classname ? new $this->store_classname() : new \ActionScheduler_wpPostStore(); + $source_logger = $this->logger_classname ? new $this->logger_classname() : new \ActionScheduler_wpCommentLogger(); + + $config = new Config(); + $config->set_source_store( $source_store ); + $config->set_source_logger( $source_logger ); + $config->set_destination_store( new \ActionScheduler_DBStoreMigrator() ); + $config->set_destination_logger( new \ActionScheduler_DBLogger() ); + + if ( defined( 'WP_CLI' ) && WP_CLI ) { + $config->set_progress_bar( new ProgressBar( '', 0 ) ); + } + } + + return apply_filters( 'action_scheduler/migration_config', $config ); + } + + /** + * Hook dashboard migration notice. + */ + public function hook_admin_notices() { + if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) { + return; + } + add_action( 'admin_notices', array( $this, 'display_migration_notice' ), 10, 0 ); + } + + /** + * Show a dashboard notice that migration is in progress. + */ + public function display_migration_notice() { + printf( '

    %s

    ', __( 'Action Scheduler migration in progress. The list of scheduled actions may be incomplete.', 'action-scheduler' ) ); + } + + /** + * Add store classes. Hook migration. + */ + private function hook() { + add_filter( 'action_scheduler_store_class', array( $this, 'get_store_class' ), 100, 1 ); + add_filter( 'action_scheduler_logger_class', array( $this, 'get_logger_class' ), 100, 1 ); + add_action( 'init', array( $this, 'maybe_hook_migration' ) ); + add_action( 'wp_loaded', array( $this, 'schedule_migration' ) ); + + // Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen + add_action( 'load-tools_page_action-scheduler', array( $this, 'hook_admin_notices' ), 10, 0 ); + add_action( 'load-woocommerce_page_wc-status', array( $this, 'hook_admin_notices' ), 10, 0 ); + } + + /** + * Possibly hook the migration scheduler action. + * + * @author Jeremy Pry + */ + public function maybe_hook_migration() { + if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) { + return; + } + + $this->migration_scheduler->hook(); + } + + /** + * Allow datastores to enable migration to AS tables. + */ + public function allow_migration() { + if ( ! \ActionScheduler_DataController::dependencies_met() ) { + return false; + } + + if ( null === $this->migrate_custom_store ) { + $this->migrate_custom_store = apply_filters( 'action_scheduler_migrate_data_store', false ); + } + + return ( ! $this->has_custom_datastore() ) || $this->migrate_custom_store; + } + + /** + * Proceed with the migration if the dependencies have been met. + */ + public static function init() { + if ( \ActionScheduler_DataController::dependencies_met() ) { + self::instance()->hook(); + } + } + + /** + * Singleton factory. + */ + public static function instance() { + if ( ! isset( self::$instance ) ) { + self::$instance = new static( new Scheduler() ); + } + + return self::$instance; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php new file mode 100644 index 0000000..ffc21c2 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php @@ -0,0 +1,28 @@ +source = $source_logger; + $this->destination = $destination_Logger; + } + + /** + * Migrate an action log. + * + * @param int $source_action_id Source logger object. + * @param int $destination_action_id Destination logger object. + */ + public function migrate( $source_action_id, $destination_action_id ) { + $logs = $this->source->get_logs( $source_action_id ); + foreach ( $logs as $log ) { + if ( $log->get_action_id() == $source_action_id ) { + $this->destination->log( $destination_action_id, $log->get_message(), $log->get_date() ); + } + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Runner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Runner.php new file mode 100644 index 0000000..867c5de --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Runner.php @@ -0,0 +1,136 @@ +source_store = $config->get_source_store(); + $this->destination_store = $config->get_destination_store(); + $this->source_logger = $config->get_source_logger(); + $this->destination_logger = $config->get_destination_logger(); + + $this->batch_fetcher = new BatchFetcher( $this->source_store ); + if ( $config->get_dry_run() ) { + $this->log_migrator = new DryRun_LogMigrator( $this->source_logger, $this->destination_logger ); + $this->action_migrator = new DryRun_ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator ); + } else { + $this->log_migrator = new LogMigrator( $this->source_logger, $this->destination_logger ); + $this->action_migrator = new ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator ); + } + + if ( defined( 'WP_CLI' ) && WP_CLI ) { + $this->progress_bar = $config->get_progress_bar(); + } + } + + /** + * Run migration batch. + * + * @param int $batch_size Optional batch size. Default 10. + * + * @return int Size of batch processed. + */ + public function run( $batch_size = 10 ) { + $batch = $this->batch_fetcher->fetch( $batch_size ); + $batch_size = count( $batch ); + + if ( ! $batch_size ) { + return 0; + } + + if ( $this->progress_bar ) { + /* translators: %d: amount of actions */ + $this->progress_bar->set_message( sprintf( _n( 'Migrating %d action', 'Migrating %d actions', $batch_size, 'action-scheduler' ), number_format_i18n( $batch_size ) ) ); + $this->progress_bar->set_count( $batch_size ); + } + + $this->migrate_actions( $batch ); + + return $batch_size; + } + + /** + * Migration a batch of actions. + * + * @param array $action_ids List of action IDs to migrate. + */ + public function migrate_actions( array $action_ids ) { + do_action( 'action_scheduler/migration_batch_starting', $action_ids ); + + \ActionScheduler::logger()->unhook_stored_action(); + $this->destination_logger->unhook_stored_action(); + + foreach ( $action_ids as $source_action_id ) { + $destination_action_id = $this->action_migrator->migrate( $source_action_id ); + if ( $destination_action_id ) { + $this->destination_logger->log( $destination_action_id, sprintf( + /* translators: 1: source action ID 2: source store class 3: destination action ID 4: destination store class */ + __( 'Migrated action with ID %1$d in %2$s to ID %3$d in %4$s', 'action-scheduler' ), + $source_action_id, + get_class( $this->source_store ), + $destination_action_id, + get_class( $this->destination_store ) + ) ); + } + + if ( $this->progress_bar ) { + $this->progress_bar->tick(); + } + } + + if ( $this->progress_bar ) { + $this->progress_bar->finish(); + } + + \ActionScheduler::logger()->hook_stored_action(); + + do_action( 'action_scheduler/migration_batch_complete', $action_ids ); + } + + /** + * Initialize destination store and logger. + */ + public function init_destination() { + $this->destination_store->init(); + $this->destination_logger->init(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php new file mode 100644 index 0000000..dcbe2db --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php @@ -0,0 +1,128 @@ +get_migration_runner(); + $count = $migration_runner->run( $this->get_batch_size() ); + + if ( $count === 0 ) { + $this->mark_complete(); + } else { + $this->schedule_migration( time() + $this->get_schedule_interval() ); + } + } + + /** + * Mark the migration complete. + */ + public function mark_complete() { + $this->unschedule_migration(); + + \ActionScheduler_DataController::mark_migration_complete(); + do_action( 'action_scheduler/migration_complete' ); + } + + /** + * Get a flag indicating whether the migration is scheduled. + * + * @return bool Whether there is a pending action in the store to handle the migration + */ + public function is_migration_scheduled() { + $next = as_next_scheduled_action( self::HOOK ); + + return ! empty( $next ); + } + + /** + * Schedule the migration. + * + * @param int $when Optional timestamp to run the next migration batch. Defaults to now. + * + * @return string The action ID + */ + public function schedule_migration( $when = 0 ) { + $next = as_next_scheduled_action( self::HOOK ); + + if ( ! empty( $next ) ) { + return $next; + } + + if ( empty( $when ) ) { + $when = time() + MINUTE_IN_SECONDS; + } + + return as_schedule_single_action( $when, self::HOOK, array(), self::GROUP ); + } + + /** + * Remove the scheduled migration action. + */ + public function unschedule_migration() { + as_unschedule_action( self::HOOK, null, self::GROUP ); + } + + /** + * Get migration batch schedule interval. + * + * @return int Seconds between migration runs. Defaults to 0 seconds to allow chaining migration via Async Runners. + */ + private function get_schedule_interval() { + return (int) apply_filters( 'action_scheduler/migration_interval', 0 ); + } + + /** + * Get migration batch size. + * + * @return int Number of actions to migrate in each batch. Defaults to 250. + */ + private function get_batch_size() { + return (int) apply_filters( 'action_scheduler/migration_batch_size', 250 ); + } + + /** + * Get migration runner object. + * + * @return Runner + */ + private function get_migration_runner() { + $config = Controller::instance()->get_migration_config_object(); + + return new Runner( $config ); + } + +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php new file mode 100644 index 0000000..840e482 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php @@ -0,0 +1,57 @@ +__wakeup() for details. + **/ + private $timestamp = NULL; + + /** + * @param DateTime $after + * + * @return DateTime|null + */ + public function calculate_next( DateTime $after ) { + return null; + } + + /** + * Cancelled actions should never have a next schedule, even if get_next() + * is called with $after < $this->scheduled_date. + * + * @param DateTime $after + * @return DateTime|null + */ + public function get_next( DateTime $after ) { + return null; + } + + /** + * @return bool + */ + public function is_recurring() { + return false; + } + + /** + * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 + * + * Prior to Action Scheduler 3.0.0, schedules used different property names to refer + * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp + * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 + * aligned properties and property names for better inheritance. To maintain backward + * compatibility with schedules serialized and stored prior to 3.0, we need to correctly + * map the old property names with matching visibility. + */ + public function __wakeup() { + if ( ! is_null( $this->timestamp ) ) { + $this->scheduled_timestamp = $this->timestamp; + unset( $this->timestamp ); + } + parent::__wakeup(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php new file mode 100644 index 0000000..7859307 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php @@ -0,0 +1,102 @@ +__wakeup() for details. + **/ + private $start_timestamp = NULL; + + /** + * Deprecated property @see $this->__wakeup() for details. + **/ + private $cron = NULL; + + /** + * Wrapper for parent constructor to accept a cron expression string and map it to a CronExpression for this + * objects $recurrence property. + * + * @param DateTime $start The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used. + * @param CronExpression|string $recurrence The CronExpression used to calculate the schedule's next instance. + * @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance. + */ + public function __construct( DateTime $start, $recurrence, DateTime $first = null ) { + if ( ! is_a( $recurrence, 'CronExpression' ) ) { + $recurrence = CronExpression::factory( $recurrence ); + } + + // For backward compatibility, we need to make sure the date is set to the first matching cron date, not whatever date is passed in. Importantly, by passing true as the 3rd param, if $start matches the cron expression, then it will be used. This was previously handled in the now deprecated next() method. + $date = $recurrence->getNextRunDate( $start, 0, true ); + + // parent::__construct() will set this to $date by default, but that may be different to $start now. + $first = empty( $first ) ? $start : $first; + + parent::__construct( $date, $recurrence, $first ); + } + + /** + * Calculate when an instance of this schedule would start based on a given + * date & time using its the CronExpression. + * + * @param DateTime $after + * @return DateTime + */ + protected function calculate_next( DateTime $after ) { + return $this->recurrence->getNextRunDate( $after, 0, false ); + } + + /** + * @return string + */ + public function get_recurrence() { + return strval( $this->recurrence ); + } + + /** + * Serialize cron schedules with data required prior to AS 3.0.0 + * + * Prior to Action Scheduler 3.0.0, reccuring schedules used different property names to + * refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp + * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 + * aligned properties and property names for better inheritance. To guard against the + * possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to + * also store the data with the old property names so if it's unserialized in AS < 3.0, + * the schedule doesn't end up with a null recurrence. + * + * @return array + */ + public function __sleep() { + + $sleep_params = parent::__sleep(); + + $this->start_timestamp = $this->scheduled_timestamp; + $this->cron = $this->recurrence; + + return array_merge( $sleep_params, array( + 'start_timestamp', + 'cron' + ) ); + } + + /** + * Unserialize cron schedules serialized/stored prior to AS 3.0.0 + * + * For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup(). + */ + public function __wakeup() { + if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) { + $this->scheduled_timestamp = $this->start_timestamp; + unset( $this->start_timestamp ); + } + + if ( is_null( $this->recurrence ) && ! is_null( $this->cron ) ) { + $this->recurrence = $this->cron; + unset( $this->cron ); + } + parent::__wakeup(); + } +} + diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php new file mode 100644 index 0000000..11a591e --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php @@ -0,0 +1,81 @@ +__wakeup() for details. + **/ + private $start_timestamp = NULL; + + /** + * Deprecated property @see $this->__wakeup() for details. + **/ + private $interval_in_seconds = NULL; + + /** + * Calculate when this schedule should start after a given date & time using + * the number of seconds between recurrences. + * + * @param DateTime $after + * @return DateTime + */ + protected function calculate_next( DateTime $after ) { + $after->modify( '+' . (int) $this->get_recurrence() . ' seconds' ); + return $after; + } + + /** + * @return int + */ + public function interval_in_seconds() { + _deprecated_function( __METHOD__, '3.0.0', '(int)ActionScheduler_Abstract_RecurringSchedule::get_recurrence()' ); + return (int) $this->get_recurrence(); + } + + /** + * Serialize interval schedules with data required prior to AS 3.0.0 + * + * Prior to Action Scheduler 3.0.0, reccuring schedules used different property names to + * refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp + * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 + * aligned properties and property names for better inheritance. To guard against the + * possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to + * also store the data with the old property names so if it's unserialized in AS < 3.0, + * the schedule doesn't end up with a null/false/0 recurrence. + * + * @return array + */ + public function __sleep() { + + $sleep_params = parent::__sleep(); + + $this->start_timestamp = $this->scheduled_timestamp; + $this->interval_in_seconds = $this->recurrence; + + return array_merge( $sleep_params, array( + 'start_timestamp', + 'interval_in_seconds' + ) ); + } + + /** + * Unserialize interval schedules serialized/stored prior to AS 3.0.0 + * + * For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup(). + */ + public function __wakeup() { + if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) { + $this->scheduled_timestamp = $this->start_timestamp; + unset( $this->start_timestamp ); + } + + if ( is_null( $this->recurrence ) && ! is_null( $this->interval_in_seconds ) ) { + $this->recurrence = $this->interval_in_seconds; + unset( $this->interval_in_seconds ); + } + parent::__wakeup(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php new file mode 100644 index 0000000..0ca9f7c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php @@ -0,0 +1,28 @@ +scheduled_date = null; + } + + /** + * This schedule has no scheduled DateTime, so we need to override the parent __sleep() + * @return array + */ + public function __sleep() { + return array(); + } + + public function __wakeup() { + $this->scheduled_date = null; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php new file mode 100644 index 0000000..d61a9f7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php @@ -0,0 +1,18 @@ +__wakeup() for details. + **/ + private $timestamp = NULL; + + /** + * @param DateTime $after + * + * @return DateTime|null + */ + public function calculate_next( DateTime $after ) { + return null; + } + + /** + * @return bool + */ + public function is_recurring() { + return false; + } + + /** + * Serialize schedule with data required prior to AS 3.0.0 + * + * Prior to Action Scheduler 3.0.0, schedules used different property names to refer + * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp + * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 + * aligned properties and property names for better inheritance. To guard against the + * scheduled date for single actions always being seen as "now" if downgrading to + * Action Scheduler < 3.0.0, we need to also store the data with the old property names + * so if it's unserialized in AS < 3.0, the schedule doesn't end up with a null recurrence. + * + * @return array + */ + public function __sleep() { + + $sleep_params = parent::__sleep(); + + $this->timestamp = $this->scheduled_timestamp; + + return array_merge( $sleep_params, array( + 'timestamp', + ) ); + } + + /** + * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 + * + * Prior to Action Scheduler 3.0.0, schedules used different property names to refer + * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp + * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 + * aligned properties and property names for better inheritance. To maintain backward + * compatibility with schedules serialized and stored prior to 3.0, we need to correctly + * map the old property names with matching visibility. + */ + public function __wakeup() { + + if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->timestamp ) ) { + $this->scheduled_timestamp = $this->timestamp; + unset( $this->timestamp ); + } + parent::__wakeup(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php new file mode 100644 index 0000000..0db5fbd --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php @@ -0,0 +1,47 @@ +tables = [ + self::LOG_TABLE, + ]; + } + + protected function get_table_definition( $table ) { + global $wpdb; + $table_name = $wpdb->$table; + $charset_collate = $wpdb->get_charset_collate(); + switch ( $table ) { + + case self::LOG_TABLE: + + return "CREATE TABLE {$table_name} ( + log_id bigint(20) unsigned NOT NULL auto_increment, + action_id bigint(20) unsigned NOT NULL, + message text NOT NULL, + log_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + log_date_local datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (log_id), + KEY action_id (action_id), + KEY log_date_gmt (log_date_gmt) + ) $charset_collate"; + + default: + return ''; + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php new file mode 100644 index 0000000..c36783c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php @@ -0,0 +1,83 @@ +tables = [ + self::ACTIONS_TABLE, + self::CLAIMS_TABLE, + self::GROUPS_TABLE, + ]; + } + + protected function get_table_definition( $table ) { + global $wpdb; + $table_name = $wpdb->$table; + $charset_collate = $wpdb->get_charset_collate(); + $max_index_length = 191; // @see wp_get_db_schema() + switch ( $table ) { + + case self::ACTIONS_TABLE: + + return "CREATE TABLE {$table_name} ( + action_id bigint(20) unsigned NOT NULL auto_increment, + hook varchar(191) NOT NULL, + status varchar(20) NOT NULL, + scheduled_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + scheduled_date_local datetime NOT NULL default '0000-00-00 00:00:00', + args varchar($max_index_length), + schedule longtext, + group_id bigint(20) unsigned NOT NULL default '0', + attempts int(11) NOT NULL default '0', + last_attempt_gmt datetime NOT NULL default '0000-00-00 00:00:00', + last_attempt_local datetime NOT NULL default '0000-00-00 00:00:00', + claim_id bigint(20) unsigned NOT NULL default '0', + extended_args varchar(8000) DEFAULT NULL, + PRIMARY KEY (action_id), + KEY hook (hook($max_index_length)), + KEY status (status), + KEY scheduled_date_gmt (scheduled_date_gmt), + KEY args (args($max_index_length)), + KEY group_id (group_id), + KEY last_attempt_gmt (last_attempt_gmt), + KEY claim_id (claim_id) + ) $charset_collate"; + + case self::CLAIMS_TABLE: + + return "CREATE TABLE {$table_name} ( + claim_id bigint(20) unsigned NOT NULL auto_increment, + date_created_gmt datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (claim_id), + KEY date_created_gmt (date_created_gmt) + ) $charset_collate"; + + case self::GROUPS_TABLE: + + return "CREATE TABLE {$table_name} ( + group_id bigint(20) unsigned NOT NULL auto_increment, + slug varchar(255) NOT NULL, + PRIMARY KEY (group_id), + KEY slug (slug($max_index_length)) + ) $charset_collate"; + + default: + return ''; + } + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php new file mode 100644 index 0000000..dac17aa --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php @@ -0,0 +1,27 @@ +get_date(); + $replacement_method = 'get_date()'; + } else { + $return_value = $this->get_next( $after ); + $replacement_method = 'get_next( $after )'; + } + + _deprecated_function( __METHOD__, '3.0.0', __CLASS__ . '::' . $replacement_method ); + + return $return_value; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php new file mode 100644 index 0000000..002dc75 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php @@ -0,0 +1,49 @@ +mark_failure( $action_id ); + } + + /** + * Add base hooks + * + * @since 2.2.6 + */ + protected static function hook() { + _deprecated_function( __METHOD__, '3.0.0' ); + } + + /** + * Remove base hooks + * + * @since 2.2.6 + */ + protected static function unhook() { + _deprecated_function( __METHOD__, '3.0.0' ); + } + + /** + * Get the site's local time. + * + * @deprecated 2.1.0 + * @return DateTimeZone + */ + protected function get_local_timezone() { + _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); + return ActionScheduler_TimezoneHelper::get_local_timezone(); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/functions.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/functions.php new file mode 100644 index 0000000..f782c4b --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/functions.php @@ -0,0 +1,126 @@ + '' - the name of the action that will be triggered + * 'args' => NULL - the args array that will be passed with the action + * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. + * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' + * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. + * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' + * 'group' => '' - the group the action belongs to + * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING + * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID + * 'per_page' => 5 - Number of results to return + * 'offset' => 0 + * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date' + * 'order' => 'ASC' + * @param string $return_format OBJECT, ARRAY_A, or ids + * + * @deprecated 2.1.0 + * + * @return array + */ +function wc_get_scheduled_actions( $args = array(), $return_format = OBJECT ) { + _deprecated_function( __FUNCTION__, '2.1.0', 'as_get_scheduled_actions()' ); + return as_get_scheduled_actions( $args, $return_format ); +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php new file mode 100644 index 0000000..241c387 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php @@ -0,0 +1,275 @@ +async( $hook, $args, $group ); +} + +/** + * Schedule an action to run one time + * + * @param int $timestamp When the job will run. + * @param string $hook The hook to trigger. + * @param array $args Arguments to pass when the hook triggers. + * @param string $group The group to assign this job to. + * + * @return int The action ID. + */ +function as_schedule_single_action( $timestamp, $hook, $args = array(), $group = '' ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return 0; + } + return ActionScheduler::factory()->single( $hook, $args, $timestamp, $group ); +} + +/** + * Schedule a recurring action + * + * @param int $timestamp When the first instance of the job will run. + * @param int $interval_in_seconds How long to wait between runs. + * @param string $hook The hook to trigger. + * @param array $args Arguments to pass when the hook triggers. + * @param string $group The group to assign this job to. + * + * @return int The action ID. + */ +function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '' ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return 0; + } + return ActionScheduler::factory()->recurring( $hook, $args, $timestamp, $interval_in_seconds, $group ); +} + +/** + * Schedule an action that recurs on a cron-like schedule. + * + * @param int $base_timestamp The first instance of the action will be scheduled + * to run at a time calculated after this timestamp matching the cron + * expression. This can be used to delay the first instance of the action. + * @param string $schedule A cron-link schedule string + * @see http://en.wikipedia.org/wiki/Cron + * * * * * * * + * ┬ ┬ ┬ ┬ ┬ ┬ + * | | | | | | + * | | | | | + year [optional] + * | | | | +----- day of week (0 - 7) (Sunday=0 or 7) + * | | | +---------- month (1 - 12) + * | | +--------------- day of month (1 - 31) + * | +-------------------- hour (0 - 23) + * +------------------------- min (0 - 59) + * @param string $hook The hook to trigger. + * @param array $args Arguments to pass when the hook triggers. + * @param string $group The group to assign this job to. + * + * @return int The action ID. + */ +function as_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return 0; + } + return ActionScheduler::factory()->cron( $hook, $args, $timestamp, $schedule, $group ); +} + +/** + * Cancel the next occurrence of a scheduled action. + * + * While only the next instance of a recurring or cron action is unscheduled by this method, that will also prevent + * all future instances of that recurring or cron action from being run. Recurring and cron actions are scheduled in + * a sequence instead of all being scheduled at once. Each successive occurrence of a recurring action is scheduled + * only after the former action is run. If the next instance is never run, because it's unscheduled by this function, + * then the following instance will never be scheduled (or exist), which is effectively the same as being unscheduled + * by this method also. + * + * @param string $hook The hook that the job will trigger. + * @param array $args Args that would have been passed to the job. + * @param string $group The group the job is assigned to. + * + * @return string|null The scheduled action ID if a scheduled action was found, or null if no matching action found. + */ +function as_unschedule_action( $hook, $args = array(), $group = '' ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return 0; + } + $params = array(); + if ( is_array($args) ) { + $params['args'] = $args; + } + if ( !empty($group) ) { + $params['group'] = $group; + } + $job_id = ActionScheduler::store()->find_action( $hook, $params ); + + if ( ! empty( $job_id ) ) { + ActionScheduler::store()->cancel_action( $job_id ); + } + + return $job_id; +} + +/** + * Cancel all occurrences of a scheduled action. + * + * @param string $hook The hook that the job will trigger. + * @param array $args Args that would have been passed to the job. + * @param string $group The group the job is assigned to. + */ +function as_unschedule_all_actions( $hook, $args = array(), $group = '' ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return; + } + if ( empty( $args ) ) { + if ( ! empty( $hook ) && empty( $group ) ) { + ActionScheduler_Store::instance()->cancel_actions_by_hook( $hook ); + return; + } + if ( ! empty( $group ) && empty( $hook ) ) { + ActionScheduler_Store::instance()->cancel_actions_by_group( $group ); + return; + } + } + do { + $unscheduled_action = as_unschedule_action( $hook, $args, $group ); + } while ( ! empty( $unscheduled_action ) ); +} + +/** + * Check if there is an existing action in the queue with a given hook, args and group combination. + * + * An action in the queue could be pending, in-progress or async. If the is pending for a time in + * future, its scheduled date will be returned as a timestamp. If it is currently being run, or an + * async action sitting in the queue waiting to be processed, in which case boolean true will be + * returned. Or there may be no async, in-progress or pending action for this hook, in which case, + * boolean false will be the return value. + * + * @param string $hook + * @param array $args + * @param string $group + * + * @return int|bool The timestamp for the next occurrence of a pending scheduled action, true for an async or in-progress action or false if there is no matching action. + */ +function as_next_scheduled_action( $hook, $args = NULL, $group = '' ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return false; + } + $params = array(); + if ( is_array($args) ) { + $params['args'] = $args; + } + if ( !empty($group) ) { + $params['group'] = $group; + } + + $params['status'] = ActionScheduler_Store::STATUS_RUNNING; + $job_id = ActionScheduler::store()->find_action( $hook, $params ); + if ( ! empty( $job_id ) ) { + return true; + } + + $params['status'] = ActionScheduler_Store::STATUS_PENDING; + $job_id = ActionScheduler::store()->find_action( $hook, $params ); + if ( empty($job_id) ) { + return false; + } + $job = ActionScheduler::store()->fetch_action( $job_id ); + $scheduled_date = $job->get_schedule()->get_date(); + if ( $scheduled_date ) { + return (int) $scheduled_date->format( 'U' ); + } elseif ( NULL === $scheduled_date ) { // pending async action with NullSchedule + return true; + } + return false; +} + +/** + * Find scheduled actions + * + * @param array $args Possible arguments, with their default values: + * 'hook' => '' - the name of the action that will be triggered + * 'args' => NULL - the args array that will be passed with the action + * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. + * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' + * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. + * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' + * 'group' => '' - the group the action belongs to + * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING + * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID + * 'per_page' => 5 - Number of results to return + * 'offset' => 0 + * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date' + * 'order' => 'ASC' + * + * @param string $return_format OBJECT, ARRAY_A, or ids. + * + * @return array + */ +function as_get_scheduled_actions( $args = array(), $return_format = OBJECT ) { + if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { + return array(); + } + $store = ActionScheduler::store(); + foreach ( array('date', 'modified') as $key ) { + if ( isset($args[$key]) ) { + $args[$key] = as_get_datetime_object($args[$key]); + } + } + $ids = $store->query_actions( $args ); + + if ( $return_format == 'ids' || $return_format == 'int' ) { + return $ids; + } + + $actions = array(); + foreach ( $ids as $action_id ) { + $actions[$action_id] = $store->fetch_action( $action_id ); + } + + if ( $return_format == ARRAY_A ) { + foreach ( $actions as $action_id => $action_object ) { + $actions[$action_id] = get_object_vars($action_object); + } + } + + return $actions; +} + +/** + * Helper function to create an instance of DateTime based on a given + * string and timezone. By default, will return the current date/time + * in the UTC timezone. + * + * Needed because new DateTime() called without an explicit timezone + * will create a date/time in PHP's timezone, but we need to have + * assurance that a date/time uses the right timezone (which we almost + * always want to be UTC), which means we need to always include the + * timezone when instantiating datetimes rather than leaving it up to + * the PHP default. + * + * @param mixed $date_string A date/time string. Valid formats are explained in http://php.net/manual/en/datetime.formats.php. + * @param string $timezone A timezone identifier, like UTC or Europe/Lisbon. The list of valid identifiers is available http://php.net/manual/en/timezones.php. + * + * @return ActionScheduler_DateTime + */ +function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) { + if ( is_object( $date_string ) && $date_string instanceof DateTime ) { + $date = new ActionScheduler_DateTime( $date_string->format( 'Y-m-d H:i:s' ), new DateTimeZone( $timezone ) ); + } elseif ( is_numeric( $date_string ) ) { + $date = new ActionScheduler_DateTime( '@' . $date_string, new DateTimeZone( $timezone ) ); + } else { + $date = new ActionScheduler_DateTime( $date_string, new DateTimeZone( $timezone ) ); + } + return $date; +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php new file mode 100644 index 0000000..d7dea1c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php @@ -0,0 +1,170 @@ +identifier = $this->prefix . '_' . $this->action; + + add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) ); + add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) ); + } + + /** + * Set data used during the request + * + * @param array $data Data. + * + * @return $this + */ + public function data( $data ) { + $this->data = $data; + + return $this; + } + + /** + * Dispatch the async request + * + * @return array|WP_Error + */ + public function dispatch() { + $url = add_query_arg( $this->get_query_args(), $this->get_query_url() ); + $args = $this->get_post_args(); + + return wp_remote_post( esc_url_raw( $url ), $args ); + } + + /** + * Get query args + * + * @return array + */ + protected function get_query_args() { + if ( property_exists( $this, 'query_args' ) ) { + return $this->query_args; + } + + return array( + 'action' => $this->identifier, + 'nonce' => wp_create_nonce( $this->identifier ), + ); + } + + /** + * Get query URL + * + * @return string + */ + protected function get_query_url() { + if ( property_exists( $this, 'query_url' ) ) { + return $this->query_url; + } + + return admin_url( 'admin-ajax.php' ); + } + + /** + * Get post args + * + * @return array + */ + protected function get_post_args() { + if ( property_exists( $this, 'post_args' ) ) { + return $this->post_args; + } + + return array( + 'timeout' => 0.01, + 'blocking' => false, + 'body' => $this->data, + 'cookies' => $_COOKIE, + 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), + ); + } + + /** + * Maybe handle + * + * Check for correct nonce and pass to handler. + */ + public function maybe_handle() { + // Don't lock up other requests while processing + session_write_close(); + + check_ajax_referer( $this->identifier, 'nonce' ); + + $this->handle(); + + wp_die(); + } + + /** + * Handle + * + * Override this method to perform any actions required + * during the async request. + */ + abstract protected function handle(); + + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php new file mode 100644 index 0000000..7f33c37 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php @@ -0,0 +1,318 @@ + + * @link http://en.wikipedia.org/wiki/Cron + */ +class CronExpression +{ + const MINUTE = 0; + const HOUR = 1; + const DAY = 2; + const MONTH = 3; + const WEEKDAY = 4; + const YEAR = 5; + + /** + * @var array CRON expression parts + */ + private $cronParts; + + /** + * @var CronExpression_FieldFactory CRON field factory + */ + private $fieldFactory; + + /** + * @var array Order in which to test of cron parts + */ + private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE); + + /** + * Factory method to create a new CronExpression. + * + * @param string $expression The CRON expression to create. There are + * several special predefined values which can be used to substitute the + * CRON expression: + * + * @yearly, @annually) - Run once a year, midnight, Jan. 1 - 0 0 1 1 * + * @monthly - Run once a month, midnight, first of month - 0 0 1 * * + * @weekly - Run once a week, midnight on Sun - 0 0 * * 0 + * @daily - Run once a day, midnight - 0 0 * * * + * @hourly - Run once an hour, first minute - 0 * * * * + * +*@param CronExpression_FieldFactory $fieldFactory (optional) Field factory to use + * + * @return CronExpression + */ + public static function factory($expression, CronExpression_FieldFactory $fieldFactory = null) + { + $mappings = array( + '@yearly' => '0 0 1 1 *', + '@annually' => '0 0 1 1 *', + '@monthly' => '0 0 1 * *', + '@weekly' => '0 0 * * 0', + '@daily' => '0 0 * * *', + '@hourly' => '0 * * * *' + ); + + if (isset($mappings[$expression])) { + $expression = $mappings[$expression]; + } + + return new self($expression, $fieldFactory ? $fieldFactory : new CronExpression_FieldFactory()); + } + + /** + * Parse a CRON expression + * + * @param string $expression CRON expression (e.g. '8 * * * *') + * @param CronExpression_FieldFactory $fieldFactory Factory to create cron fields + */ + public function __construct($expression, CronExpression_FieldFactory $fieldFactory) + { + $this->fieldFactory = $fieldFactory; + $this->setExpression($expression); + } + + /** + * Set or change the CRON expression + * + * @param string $value CRON expression (e.g. 8 * * * *) + * + * @return CronExpression + * @throws InvalidArgumentException if not a valid CRON expression + */ + public function setExpression($value) + { + $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); + if (count($this->cronParts) < 5) { + throw new InvalidArgumentException( + $value . ' is not a valid CRON expression' + ); + } + + foreach ($this->cronParts as $position => $part) { + $this->setPart($position, $part); + } + + return $this; + } + + /** + * Set part of the CRON expression + * + * @param int $position The position of the CRON expression to set + * @param string $value The value to set + * + * @return CronExpression + * @throws InvalidArgumentException if the value is not valid for the part + */ + public function setPart($position, $value) + { + if (!$this->fieldFactory->getField($position)->validate($value)) { + throw new InvalidArgumentException( + 'Invalid CRON field value ' . $value . ' as position ' . $position + ); + } + + $this->cronParts[$position] = $value; + + return $this; + } + + /** + * Get a next run date relative to the current date or a specific date + * + * @param string|DateTime $currentTime (optional) Relative calculation date + * @param int $nth (optional) Number of matches to skip before returning a + * matching next run date. 0, the default, will return the current + * date and time if the next run date falls on the current date and + * time. Setting this value to 1 will skip the first match and go to + * the second match. Setting this value to 2 will skip the first 2 + * matches and so on. + * @param bool $allowCurrentDate (optional) Set to TRUE to return the + * current date if it matches the cron expression + * + * @return DateTime + * @throws RuntimeException on too many iterations + */ + public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) + { + return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate); + } + + /** + * Get a previous run date relative to the current date or a specific date + * + * @param string|DateTime $currentTime (optional) Relative calculation date + * @param int $nth (optional) Number of matches to skip before returning + * @param bool $allowCurrentDate (optional) Set to TRUE to return the + * current date if it matches the cron expression + * + * @return DateTime + * @throws RuntimeException on too many iterations + * @see CronExpression::getNextRunDate + */ + public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) + { + return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate); + } + + /** + * Get multiple run dates starting at the current date or a specific date + * + * @param int $total Set the total number of dates to calculate + * @param string|DateTime $currentTime (optional) Relative calculation date + * @param bool $invert (optional) Set to TRUE to retrieve previous dates + * @param bool $allowCurrentDate (optional) Set to TRUE to return the + * current date if it matches the cron expression + * + * @return array Returns an array of run dates + */ + public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false) + { + $matches = array(); + for ($i = 0; $i < max(0, $total); $i++) { + $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); + } + + return $matches; + } + + /** + * Get all or part of the CRON expression + * + * @param string $part (optional) Specify the part to retrieve or NULL to + * get the full cron schedule string. + * + * @return string|null Returns the CRON expression, a part of the + * CRON expression, or NULL if the part was specified but not found + */ + public function getExpression($part = null) + { + if (null === $part) { + return implode(' ', $this->cronParts); + } elseif (array_key_exists($part, $this->cronParts)) { + return $this->cronParts[$part]; + } + + return null; + } + + /** + * Helper method to output the full expression. + * + * @return string Full CRON expression + */ + public function __toString() + { + return $this->getExpression(); + } + + /** + * Determine if the cron is due to run based on the current date or a + * specific date. This method assumes that the current number of + * seconds are irrelevant, and should be called once per minute. + * + * @param string|DateTime $currentTime (optional) Relative calculation date + * + * @return bool Returns TRUE if the cron is due to run or FALSE if not + */ + public function isDue($currentTime = 'now') + { + if ('now' === $currentTime) { + $currentDate = date('Y-m-d H:i'); + $currentTime = strtotime($currentDate); + } elseif ($currentTime instanceof DateTime) { + $currentDate = $currentTime->format('Y-m-d H:i'); + $currentTime = strtotime($currentDate); + } else { + $currentTime = new DateTime($currentTime); + $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0); + $currentDate = $currentTime->format('Y-m-d H:i'); + $currentTime = (int)($currentTime->getTimestamp()); + } + + return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime; + } + + /** + * Get the next or previous run date of the expression relative to a date + * + * @param string|DateTime $currentTime (optional) Relative calculation date + * @param int $nth (optional) Number of matches to skip before returning + * @param bool $invert (optional) Set to TRUE to go backwards in time + * @param bool $allowCurrentDate (optional) Set to TRUE to return the + * current date if it matches the cron expression + * + * @return DateTime + * @throws RuntimeException on too many iterations + */ + protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false) + { + if ($currentTime instanceof DateTime) { + $currentDate = $currentTime; + } else { + $currentDate = new DateTime($currentTime ? $currentTime : 'now'); + $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); + } + + $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0); + $nextRun = clone $currentDate; + $nth = (int) $nth; + + // Set a hard limit to bail on an impossible date + for ($i = 0; $i < 1000; $i++) { + + foreach (self::$order as $position) { + $part = $this->getExpression($position); + if (null === $part) { + continue; + } + + $satisfied = false; + // Get the field object used to validate this part + $field = $this->fieldFactory->getField($position); + // Check if this is singular or a list + if (strpos($part, ',') === false) { + $satisfied = $field->isSatisfiedBy($nextRun, $part); + } else { + foreach (array_map('trim', explode(',', $part)) as $listPart) { + if ($field->isSatisfiedBy($nextRun, $listPart)) { + $satisfied = true; + break; + } + } + } + + // If the field is not satisfied, then start over + if (!$satisfied) { + $field->increment($nextRun, $invert); + continue 2; + } + } + + // Skip this match if needed + if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { + $this->fieldFactory->getField(0)->increment($nextRun, $invert); + continue; + } + + return $nextRun; + } + + // @codeCoverageIgnoreStart + throw new RuntimeException('Impossible CRON expression'); + // @codeCoverageIgnoreEnd + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php new file mode 100644 index 0000000..f8d5c00 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php @@ -0,0 +1,100 @@ + + */ +abstract class CronExpression_AbstractField implements CronExpression_FieldInterface +{ + /** + * Check to see if a field is satisfied by a value + * + * @param string $dateValue Date value to check + * @param string $value Value to test + * + * @return bool + */ + public function isSatisfied($dateValue, $value) + { + if ($this->isIncrementsOfRanges($value)) { + return $this->isInIncrementsOfRanges($dateValue, $value); + } elseif ($this->isRange($value)) { + return $this->isInRange($dateValue, $value); + } + + return $value == '*' || $dateValue == $value; + } + + /** + * Check if a value is a range + * + * @param string $value Value to test + * + * @return bool + */ + public function isRange($value) + { + return strpos($value, '-') !== false; + } + + /** + * Check if a value is an increments of ranges + * + * @param string $value Value to test + * + * @return bool + */ + public function isIncrementsOfRanges($value) + { + return strpos($value, '/') !== false; + } + + /** + * Test if a value is within a range + * + * @param string $dateValue Set date value + * @param string $value Value to test + * + * @return bool + */ + public function isInRange($dateValue, $value) + { + $parts = array_map('trim', explode('-', $value, 2)); + + return $dateValue >= $parts[0] && $dateValue <= $parts[1]; + } + + /** + * Test if a value is within an increments of ranges (offset[-to]/step size) + * + * @param string $dateValue Set date value + * @param string $value Value to test + * + * @return bool + */ + public function isInIncrementsOfRanges($dateValue, $value) + { + $parts = array_map('trim', explode('/', $value, 2)); + $stepSize = isset($parts[1]) ? $parts[1] : 0; + if ($parts[0] == '*' || $parts[0] === '0') { + return (int) $dateValue % $stepSize == 0; + } + + $range = explode('-', $parts[0], 2); + $offset = $range[0]; + $to = isset($range[1]) ? $range[1] : $dateValue; + // Ensure that the date value is within the range + if ($dateValue < $offset || $dateValue > $to) { + return false; + } + + for ($i = $offset; $i <= $to; $i+= $stepSize) { + if ($i == $dateValue) { + return true; + } + } + + return false; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php new file mode 100644 index 0000000..40c1d6c --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php @@ -0,0 +1,110 @@ + + */ +class CronExpression_DayOfMonthField extends CronExpression_AbstractField +{ + /** + * Get the nearest day of the week for a given day in a month + * + * @param int $currentYear Current year + * @param int $currentMonth Current month + * @param int $targetDay Target day of the month + * + * @return DateTime Returns the nearest date + */ + private static function getNearestWeekday($currentYear, $currentMonth, $targetDay) + { + $tday = str_pad($targetDay, 2, '0', STR_PAD_LEFT); + $target = new DateTime("$currentYear-$currentMonth-$tday"); + $currentWeekday = (int) $target->format('N'); + + if ($currentWeekday < 6) { + return $target; + } + + $lastDayOfMonth = $target->format('t'); + + foreach (array(-1, 1, -2, 2) as $i) { + $adjusted = $targetDay + $i; + if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) { + $target->setDate($currentYear, $currentMonth, $adjusted); + if ($target->format('N') < 6 && $target->format('m') == $currentMonth) { + return $target; + } + } + } + } + + /** + * {@inheritdoc} + */ + public function isSatisfiedBy(DateTime $date, $value) + { + // ? states that the field value is to be skipped + if ($value == '?') { + return true; + } + + $fieldValue = $date->format('d'); + + // Check to see if this is the last day of the month + if ($value == 'L') { + return $fieldValue == $date->format('t'); + } + + // Check to see if this is the nearest weekday to a particular value + if (strpos($value, 'W')) { + // Parse the target day + $targetDay = substr($value, 0, strpos($value, 'W')); + // Find out if the current day is the nearest day of the week + return $date->format('j') == self::getNearestWeekday( + $date->format('Y'), + $date->format('m'), + $targetDay + )->format('j'); + } + + return $this->isSatisfied($date->format('d'), $value); + } + + /** + * {@inheritdoc} + */ + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('previous day'); + $date->setTime(23, 59); + } else { + $date->modify('next day'); + $date->setTime(0, 0); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value) + { + return (bool) preg_match('/[\*,\/\-\?LW0-9A-Za-z]+/', $value); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php new file mode 100644 index 0000000..e9f68a7 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php @@ -0,0 +1,124 @@ + + */ +class CronExpression_DayOfWeekField extends CronExpression_AbstractField +{ + /** + * {@inheritdoc} + */ + public function isSatisfiedBy(DateTime $date, $value) + { + if ($value == '?') { + return true; + } + + // Convert text day of the week values to integers + $value = str_ireplace( + array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'), + range(0, 6), + $value + ); + + $currentYear = $date->format('Y'); + $currentMonth = $date->format('m'); + $lastDayOfMonth = $date->format('t'); + + // Find out if this is the last specific weekday of the month + if (strpos($value, 'L')) { + $weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L'))); + $tdate = clone $date; + $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); + while ($tdate->format('w') != $weekday) { + $tdate->setDate($currentYear, $currentMonth, --$lastDayOfMonth); + } + + return $date->format('j') == $lastDayOfMonth; + } + + // Handle # hash tokens + if (strpos($value, '#')) { + list($weekday, $nth) = explode('#', $value); + // Validate the hash fields + if ($weekday < 1 || $weekday > 5) { + throw new InvalidArgumentException("Weekday must be a value between 1 and 5. {$weekday} given"); + } + if ($nth > 5) { + throw new InvalidArgumentException('There are never more than 5 of a given weekday in a month'); + } + // The current weekday must match the targeted weekday to proceed + if ($date->format('N') != $weekday) { + return false; + } + + $tdate = clone $date; + $tdate->setDate($currentYear, $currentMonth, 1); + $dayCount = 0; + $currentDay = 1; + while ($currentDay < $lastDayOfMonth + 1) { + if ($tdate->format('N') == $weekday) { + if (++$dayCount >= $nth) { + break; + } + } + $tdate->setDate($currentYear, $currentMonth, ++$currentDay); + } + + return $date->format('j') == $currentDay; + } + + // Handle day of the week values + if (strpos($value, '-')) { + $parts = explode('-', $value); + if ($parts[0] == '7') { + $parts[0] = '0'; + } elseif ($parts[1] == '0') { + $parts[1] = '7'; + } + $value = implode('-', $parts); + } + + // Test to see which Sunday to use -- 0 == 7 == Sunday + $format = in_array(7, str_split($value)) ? 'N' : 'w'; + $fieldValue = $date->format($format); + + return $this->isSatisfied($fieldValue, $value); + } + + /** + * {@inheritdoc} + */ + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('-1 day'); + $date->setTime(23, 59, 0); + } else { + $date->modify('+1 day'); + $date->setTime(0, 0, 0); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value) + { + return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php new file mode 100644 index 0000000..556ba1a --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php @@ -0,0 +1,55 @@ + + * @link http://en.wikipedia.org/wiki/Cron + */ +class CronExpression_FieldFactory +{ + /** + * @var array Cache of instantiated fields + */ + private $fields = array(); + + /** + * Get an instance of a field object for a cron expression position + * + * @param int $position CRON expression position value to retrieve + * + * @return CronExpression_FieldInterface + * @throws InvalidArgumentException if a position is not valid + */ + public function getField($position) + { + if (!isset($this->fields[$position])) { + switch ($position) { + case 0: + $this->fields[$position] = new CronExpression_MinutesField(); + break; + case 1: + $this->fields[$position] = new CronExpression_HoursField(); + break; + case 2: + $this->fields[$position] = new CronExpression_DayOfMonthField(); + break; + case 3: + $this->fields[$position] = new CronExpression_MonthField(); + break; + case 4: + $this->fields[$position] = new CronExpression_DayOfWeekField(); + break; + case 5: + $this->fields[$position] = new CronExpression_YearField(); + break; + default: + throw new InvalidArgumentException( + $position . ' is not a valid position' + ); + } + } + + return $this->fields[$position]; + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php new file mode 100644 index 0000000..5d5109b --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php @@ -0,0 +1,39 @@ + + */ +interface CronExpression_FieldInterface +{ + /** + * Check if the respective value of a DateTime field satisfies a CRON exp + * + * @param DateTime $date DateTime object to check + * @param string $value CRON expression to test against + * + * @return bool Returns TRUE if satisfied, FALSE otherwise + */ + public function isSatisfiedBy(DateTime $date, $value); + + /** + * When a CRON expression is not satisfied, this method is used to increment + * or decrement a DateTime object by the unit of the cron field + * + * @param DateTime $date DateTime object to change + * @param bool $invert (optional) Set to TRUE to decrement + * + * @return CronExpression_FieldInterface + */ + public function increment(DateTime $date, $invert = false); + + /** + * Validates a CRON expression for a given field + * + * @param string $value CRON expression value to validate + * + * @return bool Returns TRUE if valid, FALSE otherwise + */ + public function validate($value); +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php new file mode 100644 index 0000000..088ca73 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php @@ -0,0 +1,47 @@ + + */ +class CronExpression_HoursField extends CronExpression_AbstractField +{ + /** + * {@inheritdoc} + */ + public function isSatisfiedBy(DateTime $date, $value) + { + return $this->isSatisfied($date->format('H'), $value); + } + + /** + * {@inheritdoc} + */ + public function increment(DateTime $date, $invert = false) + { + // Change timezone to UTC temporarily. This will + // allow us to go back or forwards and hour even + // if DST will be changed between the hours. + $timezone = $date->getTimezone(); + $date->setTimezone(new DateTimeZone('UTC')); + if ($invert) { + $date->modify('-1 hour'); + $date->setTime($date->format('H'), 59); + } else { + $date->modify('+1 hour'); + $date->setTime($date->format('H'), 0); + } + $date->setTimezone($timezone); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value) + { + return (bool) preg_match('/[\*,\/\-0-9]+/', $value); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php new file mode 100644 index 0000000..436acf2 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php @@ -0,0 +1,39 @@ + + */ +class CronExpression_MinutesField extends CronExpression_AbstractField +{ + /** + * {@inheritdoc} + */ + public function isSatisfiedBy(DateTime $date, $value) + { + return $this->isSatisfied($date->format('i'), $value); + } + + /** + * {@inheritdoc} + */ + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('-1 minute'); + } else { + $date->modify('+1 minute'); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value) + { + return (bool) preg_match('/[\*,\/\-0-9]+/', $value); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php new file mode 100644 index 0000000..d3deb12 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php @@ -0,0 +1,55 @@ + + */ +class CronExpression_MonthField extends CronExpression_AbstractField +{ + /** + * {@inheritdoc} + */ + public function isSatisfiedBy(DateTime $date, $value) + { + // Convert text month values to integers + $value = str_ireplace( + array( + 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', + 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC' + ), + range(1, 12), + $value + ); + + return $this->isSatisfied($date->format('m'), $value); + } + + /** + * {@inheritdoc} + */ + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + // $date->modify('last day of previous month'); // remove for php 5.2 compat + $date->modify('previous month'); + $date->modify($date->format('Y-m-t')); + $date->setTime(23, 59); + } else { + //$date->modify('first day of next month'); // remove for php 5.2 compat + $date->modify('next month'); + $date->modify($date->format('Y-m-01')); + $date->setTime(0, 0); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value) + { + return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php new file mode 100644 index 0000000..f11562e --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php @@ -0,0 +1,43 @@ + + */ +class CronExpression_YearField extends CronExpression_AbstractField +{ + /** + * {@inheritdoc} + */ + public function isSatisfiedBy(DateTime $date, $value) + { + return $this->isSatisfied($date->format('Y'), $value); + } + + /** + * {@inheritdoc} + */ + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('-1 year'); + $date->setDate($date->format('Y'), 12, 31); + $date->setTime(23, 59, 0); + } else { + $date->modify('+1 year'); + $date->setDate($date->format('Y'), 1, 1); + $date->setTime(0, 0, 0); + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function validate($value) + { + return (bool) preg_match('/[\*,\/\-0-9]+/', $value); + } +} diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE new file mode 100644 index 0000000..c6d88ac --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Michael Dowling and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/license.txt b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/license.txt new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/license.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php b/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php index 248382c..b6f5926 100644 --- a/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php +++ b/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php @@ -1,7 +1,7 @@ wp_mail() function to use Gmail/Mailgun/SendGrid/SMTP instead of the default mail() and creates an options page to manage the settings. * Author: WPForms @@ -203,7 +203,7 @@ if ( ! function_exists( 'wp_mail_smtp_insecure_php_version_notice' ) ) { } if ( ! defined( 'WPMS_PLUGIN_VER' ) ) { - define( 'WPMS_PLUGIN_VER', '2.0.1' ); + define( 'WPMS_PLUGIN_VER', '2.1.1' ); } if ( ! defined( 'WPMS_PHP_VER' ) ) { define( 'WPMS_PHP_VER', '5.5.0' );