Version Description
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 6.7.4 |
Comparing to | |
See all releases |
Code changes from version 6.7.3 to 6.7.4
- admin.css +14 -0
- admin.min.css +1 -0
- emails/blocks/posts/block.php +73 -77
- emails/blocks/posts/options.php +34 -13
- includes/addon.php +24 -13
- includes/module.php +8 -0
- plugin.php +7 -2
- profile/profile.php +1 -1
- readme.txt +5 -1
- subscription/subscription.php +4 -2
- tnp-header.php +15 -0
- unsubscription/unsubscription.php +9 -24
admin.css
CHANGED
@@ -117,6 +117,20 @@
|
|
117 |
}
|
118 |
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/*******************************************************************************
|
121 |
* Header
|
122 |
*/
|
117 |
}
|
118 |
|
119 |
|
120 |
+
#tnp-promotion-bar {
|
121 |
+
background-color: #FF5F65;
|
122 |
+
color: ddd;
|
123 |
+
padding: 10px 0;
|
124 |
+
text-align: center;
|
125 |
+
font-size: 16px;
|
126 |
+
}
|
127 |
+
|
128 |
+
#tnp-promotion-bar a {
|
129 |
+
color: #fff;
|
130 |
+
font-weight: normal;
|
131 |
+
text-decoration: none;
|
132 |
+
}
|
133 |
+
|
134 |
/*******************************************************************************
|
135 |
* Header
|
136 |
*/
|
admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#tnp-wrap *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#tnp-wrap .iris-picker,#tnp-wrap .iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#tnp-wrap *:before,#tnp-wrap *:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}@media all and (max-width:1100px){.col-md-12{width:100%}.col-md-11{width:100%}.col-md-10{width:100%}.col-md-9{width:100%}.col-md-8{width:100%}.col-md-7{width:100%}.col-md-6{width:100%}.col-md-5{width:100%}.col-md-4{width:100%}.col-md-3{width:100%}.col-md-2{width:100%}.col-md-1{width:100%}}.tnp-row-padded{width:90%;margin:0 auto;display:flex;justify-content:space-between}.tnp-col-3-boxed{width:30%;border:1px solid #3c414c;padding:0 0 30px 0;border-radius:10px}.tnp-margin-top{margin-top:80px}#tnp-wrap,#tnp-header,#tnp-body p,#tnp-body td,#tnp-body td p,#tnp-body input,#tnp-body select,#tnp-body textarea{font-family:soleil,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#tnp-body h1,#tnp-body h2,#tnp-body h3,#tnp-body h4{font-family:soleil,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#tnp-promotion-bar{background-color:#ff5f65;color:ddd;padding:10px 0;text-align:center;font-size:16px}#tnp-promotion-bar a{color:#fff;font-weight:normal;text-decoration:none}#tnp-header{text-align:left;font-size:12px;color:#fff;font-family:soleil,sans-serif}#tnp-header input{font-size:12px}#tnp-header a{text-decoration:none;color:white;letter-spacing:.1em}#tnp-header a:hover{color:#fff}.error a,.error a:hover{color:#000!important}.updated a,.updated a:hover{color:#000!important}.tnp-error{border-left:5px solid #d00;background-color:#fff;padding:15px;margin:15px 0;font-size:1.2em;line-height:1.5em}.tnp-warning{border-left:5px solid #ffb900;background-color:#fff;padding:15px;margin:15px 0;font-size:1.2em;line-height:1.5em}.tnp-message{border-left:5px solid #46b450;background-color:#fff;padding:15px;margin:15px 0;font-size:1.2em;line-height:1.5em}#tnp-body h1,#tnp-body h2,#tnp-body h3,#tnp-body h4,#tnp-body p{color:#fff}#tnp-body a,#tnp-body a:active{color:#2980b9}#tnp-body a:hover{color:#3498db}#tnp-body .tnp-submit{margin-bottom:10px}#tnp-body .button,#tnp-body .button:visited,#tnp-body .button:hover,#tnp-body .button:active,#tnp-body .button:focus,#tnp-body .button-primary,#tnp-body .button-primary:visited,#tnp-body .button-primary:hover,#tnp-body .button-secondary,#tnp-body .button-secondary:visited,#tnp-body .button-secondary:hover{color:#fff;background-color:#3498db;text-shadow:none;width:auto}#tnp-body span.wp-media-buttons-icon:before{color:#fff}#tnp-body .tnp-button{color:#fff;background-color:#3498db;text-shadow:none}#tnp-body .button-primary.tnp-button-white,#tnp-body .tnp-button.tnp-button-white{color:#444!important;background-color:#fff!important;box-shadow:none!important;-webkit-box-shadow:none!important;width:auto}#tnp-body .form-table h1,#tnp-body .form-table h2,#tnp-body .form-table h4,#tnp-body .form-table h3{color:#444}#tnp-body tbody th,#tnp-body td,#tnp-body td p,#tnp-body td .button,#tnp-body td .button:visited,#tnp-body td .button:hover,#tnp-body td .button:active,#tnp-body td .button:focus{color:#444}#tnp-body td a,#tnp-body td a:visited{color:#27ae60}#tnp-body .form-table{background-color:#fff;border:1px solid #ecf0f1;margin-top:2em;border-spacing:4px;border-collapse:separate}#tnp-body .form-table th{text-align:right;font-weight:bold;max-width:200px;color:#000;background-color:#ecf0f1;vertical-align:middle}#tnp-body .form-table th small{font-weight:normal}#tnp-body .form-table textarea{width:100%}#tnp-body .form-table table{border-collapse:collapse}#tnp-body .form-table table td,.form-table table th{padding:5px;font-size:.9em;font-weight:normal;border:1px solid #eee}#tnp-body .form-table table thead th{text-align:left;font-weight:bold}#tnp-body .widefat{width:90%}#tnp-body .widefat th{text-align:left}#tnp-body .widefat thead{background-color:#3498db;font-family:soleil,sans-serif;color:#fff!important}#tnp-body .widefat thead tr th{color:#fff!important}#tnp-body .widefat td,.widefat th{vertical-align:middle}.tnp-newsletters-list tbody tr{height:70px}.widefat tr:nth-child(even){background-color:#f4faff}#tnp-body #tabs h1,#tnp-body #tabs h2,#tnp-body #tabs h3,#tnp-body #tabs h4,#tnp-body #tabs p,#tnp-body #tabs td,#tnp-body #tabs th,#tnp-body #tabs input,#tnp-body #tabs select,#tnp-body #tabs textarea,#tnp-body #tabs a{color:#444}#tnp-body #tabs .button,#tnp-body #tabs .button:visited,#tnp-body #tabs .button:hover,#tnp-body #tabs .button-primary,#tnp-body #tabs .button-primary:visited,#tnp-body #tabs .button-primary:hover,#tnp-body #tabs .button-secondary,#tnp-body #tabs .button-secondary:visited,#tnp-body #tabs .button-secondary:hover{color:#fff;width:auto}table.clicks td{border:1px solid #666;padding:2px;font-size:10px}table.clicks{border-collapse:collapse}.grid{border-collapse:collapse}.grid td,.grid th{padding:10px;border:1px solid #ddd;margin:0}.grid th{background-color:#aaa}.tnp-checkboxes label{display:block;float:left;width:220px;border:1px solid #ccc;background-color:#f4f4f4;margin-bottom:5px;padding:5px;white-space:nowrap;margin-right:5px}.tnp-buttons{padding:10px}.newsletter-checkbox-group,.nl-checkbox-group{float:left;margin-right:5px;border:1px solid #ccc;background-color:#f4f4f4;margin-bottom:5px;padding:5px;white-space:nowrap;overflow:hidden}.newsletter-checkboxes-item{float:left;margin-right:5px;border:1px solid #ddd;border-radius:3px;background-color:#f4f4f4;width:150px;margin-bottom:5px;padding:3px;white-space:nowrap;overflow:hidden}.newsletter-checkboxes-item input{vertical-align:text-bottom}.newsletter-checkboxes-item label{display:inline}.newsletter-preferences-item{float:left;margin-right:5px;border:1px solid #ccc;background-color:#f4f4f4;width:250px;margin-bottom:5px;padding:5px;white-space:nowrap;overflow:hidden}.newsletter-preferences-item label{display:inline}.form-table td .nl-checkbox-group label{display:inline}.tnp-notice{padding:15px;margin:10px 0;padding-right:70px;position:relative;border:1px solid #eee;background-color:#fff;color:#444;font-size:13px;border-left:5px solid #27ae60}.tnp-notice a{color:#0073aa;text-decoration:none;font-weight:bold}.tnp-notice a.tnp-dismiss{display:block;position:absolute;right:10px;top:13px;font-size:25px;text-decoration:none;color:#666}.tnp-notice input[type=email]{margin:10px 5px 5px;width:250px;border:0;box-shadow:none;background-color:#ecf0f1;padding:8px}.tnp-notice input[type=submit]{border:0;box-shadow:none;background-color:#27ae60;padding:8px;font-family:soleil,sans-serif;font-size:13px;color:#fff;cursor:pointer}.newsletter-message{background-color:#efe;border-color:#393;border-radius:5px;border-style:solid;border-width:3px;padding:.6em;margin-bottom:.6em}.newsletter-error-span{color:#f00;font-weight:bold}.newsletter-error{background-color:#fee;border-color:#933;border-radius:5px;border-style:solid;border-width:2px;padding:.6em;margin-bottom:.6em}.newsletter-error strong,.newsletter-message strong{font-weight:bold}#newsletter-warnings{background-color:#ffebe8;border-color:#C00;border-radius:3px;border-style:solid;border-width:1px;padding:.6em;margin-bottom:.6em}.newsletter-buttons{margin-top:1em;margin-bottom:1em}.tnp-paginator{margin-top:10px;margin-bottom:5px}.newsletter-option-grid th{text-align:right;width:auto;border:0;padding:3px;font-weight:normal;vertical-align:top;padding-right:15px}.newsletter-option-grid td{border:0;padding:3px;vertical-align:top}.newsletter-box{border:1px solid #ddd;padding:10px;background-color:#fafafa;margin-bottom:15px}.newsletter-box h3{margin-top:0}.newsletter-textarea-preview{border:1px solid #ddd}.tnp-tab-notice{background-color:#fff;border:1px solid #eee;border-left:3px solid gray;padding:10px;margin:10px 0;color:#444}.tnp-tab-warning{background-color:#fff;border:1px solid #eee;border-left:3px solid orange;padding:10px;margin:10px 0;color:#444}.tnp-tab-success{background-color:#fff;border:1px solid #eee;border-left:3px solid green;padding:10px;margin:10px 0;color:#444}.tnp-tab-error{background-color:#fff;border:1px solid #eee;border-left:3px solid red;padding:10px;margin:10px 0;color:#444}.tnp-tip{margin-top:5px}.tip-button{padding:0 5px;color:#fd5f65;text-transform:uppercase;letter-spacing:.2em;font-size:10px;border:1px red solid}.tip-content{font-weight:500;font-size:11px;color:#999}p.description{font-size:12px!important}.tnp-theme-preview{display:inline-block;text-align:center}.tnp-theme-preview p{font-family:soleil;font-size:13px;letter-spacing:.2em;color:#fff}.tnp-theme-preview img:hover{box-shadow:3px 3px 8px 2px #293848}.tnp-theme-preview img{border-radius:10px;height:190px;width:auto}.tnp-theme-preview .tnp-theme-composer{height:250px;width:auto}.tnp-theme-preview .tnp-theme-html{height:250px;width:auto}.tnp-header-logo{margin-left:10px}.wp-core-ui .button-primary{background-color:#2b2f3a;color:#fff;width:auto}#tnp-body{padding:10px;background-color:#28313c}.tnp-darkbg{background-color:#34495e!important}#tnp-body h3{margin-top:25px;clear:both;margin-bottom:10px}.tnp-body-lite{background-color:#f1f1f1!important}#tnp-heading{padding:10px;margin-bottom:10px;border-radius:5px}#tnp-heading a{color:#fff;border-bottom:1px solid #fff;text-decoration:none}#tnp-heading a:hover{color:#27ae60;border-bottom:1px solid #27ae60}#tnp-heading div p{color:#565656}#tnp-heading h2{color:#fff;font-family:soleil,sans-serif;letter-spacing:.1rem;font-size:1.1rem;line-height:1.8rem;text-transform:uppercase;vertical-align:middle;font-weight:700;padding:0;margin:0}#tnp-heading h3{color:#27ae60;font-family:soleil,sans-serif;letter-spacing:.1rem;font-size:.8rem;line-height:1.8rem;text-transform:uppercase;vertical-align:middle;font-weight:700;padding:0;margin:0}#tnp-heading p{margin:0;color:#ccc}#tnp-heading .notice p{margin:.5em 0;padding:2px}#tnp-heading .tnp-btn-h1{color:#fff;background-color:#3498db;border-radius:3px;padding:6px 11px;text-decoration:none;text-transform:capitalize;font-family:soleil,sans-serif;margin-left:10px;font-size:.75rem;font-weight:300;border:0}#tnp-heading .tnp-btn-h1:hover{color:#fff;background-color:#5dade2;-webkit-transition:background-color .25s linear;transition:background-color .25s linear;-webkit-font-smoothing:subpixel-antialiased;border:0;color:#fff}.metabox-holder{width:100%}.postbox{border:0}.postbox h3 a{float:right}#dashboard-widgets .postbox-container{width:33.333%}#tnp-body .postbox p{color:#000}#dashboard-widgets .postbox-container .postbox h3{font-family:soleil,sans-serif;letter-spacing:.05rem;background-color:#415b76;color:#fff;margin:0;padding:9px}#dashboard-widgets .postbox-container h3 a{color:white;text-decoration:none;margin-left:5px;padding:2px 8px;background-color:#26c281;border-radius:2px;font-weight:300;text-transform:capitalize;font-size:.8rem}#dashboard-widgets .postbox-container h3 a:hover{color:white;text-decoration:none;margin-left:5px;background-color:#2ecc71}.postbox-container i{margin-right:3px}#tnp-dash-newsletters tr td:last-of-type{width:80px;text-align:right}#tnp-dash-subscribers tr td:last-of-type{width:80px;text-align:right}#tnp-dash-subscribers tr td:first-of-type{width:250px;overflow:hidden}#tnp-dash-subscribers table{table-layout:fixed}#tnp-dash-documentation .inside div{margin-top:10px}#tnp-dash-documentation .inside a{text-decoration:none;color:#fff;display:block;font-family:soleil,sans-serif;padding:5px 10px}#tnp-footer{margin-top:10px;padding:20px 10px 10px 40px;background-color:#28313c;font-family:soleil,sans-serif}#tnp-footer div{width:33%;display:inline-block}#tnp-footer a{color:#fff;text-decoration:none}#tnp-footer a:hover{color:#bdc3c7}#tnp-footer input[type="submit"]{background-color:#2ecc71;border:0;padding:5px;color:#fff}#tnp-footer form{white-space:nowrap}#tnp-footer li{display:inline;margin-left:15px;padding:2px 5px;border-left:3px solid #2ecc71}#wpwrap{background-color:#222b36!important}#dashboard-widgets .button{border:0;background:0;box-shadow:none;color:#322c39}#dashboard-widgets .button:hover{background-color:#ecf0f1}.wp-core-ui .button-secondary,.wp-core-ui .button-primary{background-color:#3498db;border:0;box-shadow:none;color:#fff;font-family:soleil,sans-serif;margin:0 2px;width:auto}.wp-core-ui .button-secondary,.wp-core-ui .button,.wp-core-ui .button-primary{background-color:#3498db;box-shadow:none;color:#fff;font-family:soleil,sans-serif;margin:0 2px}.wp-core-ui .button-secondary:hover,.wp-core-ui .button:hover,.wp-core-ui .button-primary:hover{background-color:#5dade2;color:#fff;width:auto}span.wp-media-buttons-icon:before{color:#fff}.tnp-paginator [value="Go"]{background-color:#27ae60}.tnp-paginator [value="Go"]:hover{background-color:#2ecc71}.notice-dismiss{padding:3px}.tnp-paginator{color:#fff;font-family:soleil,sans-serif;margin:10px 0}.tnp-paginator .button-secondary{padding:5px;line-height:normal;height:auto;font-size:12px;height:25px;border:0;border-radius:3px;vertical-align:baseline}.tnp-paginator [value="Go"]{background-color:#27ae60!important}.tnp-paginator [value="Go"]:hover{background-color:#2ecc71!important}.tnp-paginator input{background-color:#2c3e50;border:0;border-radius:3px;color:#fff;padding:5px;line-height:normal;font-size:12px;height:25px}.tnp-subscribers-search{color:#fff;font-family:soleil,sans-serif;background-color:#2c3e50;padding:20px;border-radius:5px;margin-bottom:20px;display:inline-block}.tnp-subscribers-search select{margin-left:5px;padding:0;line-height:inherit}.tnp-video-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.tnp-video-container iframe,.tnp-video-container object,.tnp-video-container embed{position:absolute;top:0;left:0;width:100%;height:100%}.bg-white{background-color:#FFF}.orange{background-color:#f39c12}.blue{background-color:#2980b9}.purple{background-color:#8e44ad}.notice a{color:#27ae60!important;text-decoration:underline!important}.tnp-chart{border:1px solid #eee;width:100%}.tnp-db-table{width:auto;background-color:#fff}.tnp-db-table thead{border-bottom:1px solid #eee}.tnp-db-table th{font-weight:bold}.tnp-db-table td,.tnp-db-table th{padding:3px;font-family:monospace;border:0}.tnp-main-status h3,.tnp-main-status h4{color:#fff}#tnp-status-table .tnp-ok{font-weight:bold;color:white;font-size:14px;background-color:#27ae60;padding:2px 10px;border-radius:10px;display:inline-block;width:75px;text-align:center}#tnp-status-table .tnp-ko{font-weight:bold;color:white;font-size:14px;background-color:#e74c41;padding:2px 10px;border-radius:10px;display:inline-block;width:75px;text-align:center}#tnp-status-table .tnp-maybe{font-weight:bold;color:white;font-size:14px;background-color:#f1c40f;padding:2px 10px;border-radius:10px;display:inline-block;width:75px;text-align:center}.tnp-main-status .tnp-log-files li{padding-left:15px}.tnp-main-status .tnp-log-files li,.tnp-main-status .tnp-log-files li a{color:#fff}.tnp-main-status .tnp-log-files .tnp-log-size{font-style:italic}table.widefat{border:0;box-shadow:none}#tnp-status-table tbody tr:nth-child(2n+1){background-color:#ecf0f1;border-radius:2px;margin:5px}#tnp-parameters-table tbody tr:nth-child(2n+1){background-color:#ecf0f1;border-radius:2px;margin:5px}#tnp-body .ui-widget{font-family:soleil,sans-serif}#tnp-body #tabs{background-color:transparent;border:0!important;padding:0;margin:0}#tnp-body #tabs .ui-widget-header{background:#28313c;border:0}#tnp-body #tabs .ui-tabs-panel{padding:15px!important;background-color:#fff}#tnp-body #tabs a.ui-tabs-anchor,#tnp-body #tabs a.ui-tabs-anchor:visited{color:#444}#tnp-body .ui-tabs .ui-tabs-nav{padding:0}#tnp-body .ui-tabs .ui-tabs-nav li a{font-size:14px}#tnp-body #tabs .ui-tabs{border-color:#28313c;background-color:#28313c;border:0}#tnp-body #tabs .ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0 0;background-color:#f2f2f2}#tnp-body #tabs .ui-tabs .ui-tabs-panel{padding:1em 0;background-color:#f2f2f2;margin:0;border:0}#tnp-body .ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{background:#fff!important;font-weight:normal;font-family:soleil,sans-serif}#tnp-body .ui-widget-content{background:#fff}#tnp-body .ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:0;background:#ecf0f1;font-family:soleil,sans-serif}.tnp-extension-premium-box,.tnp-extension-free-box,.tnp-integration-box{width:300px;height:220px;background-color:#222b36;text-align:center;margin:20px;float:left;position:relative}.tnp-extension-premium-box:hover,.tnp-extension-free-box:hover,.tnp-integration-box:hover{background-color:#232c35;box-shadow:1px 1px 15px #222b36}.tnp-extension-premium-box p,.tnp-extension-free-box p,.tnp-integration-box p{padding:5px 10px;color:#72777c;font-size:14px;margin-top:0}.tnp-extension-premium-box h3{font-family:soleil,sans-serif;padding:5px 8px!important;border-radius:3px;display:inline-block;font-size:16px;color:#fff;margin-bottom:0!important;margin-top:25px!important;font-weight:300;width:auto!important;border-bottom:none!important}.tnp-extension-free-box h3{font-family:soleil,sans-serif;padding:5px 8px!important;border-radius:3px;display:inline-block;font-size:16px;color:#fff;margin-bottom:0!important;margin-top:25px!important;font-weight:300;width:auto!important;border-bottom:none!important}.tnp-integration-box h3{font-family:soleil,sans-serif;padding:5px 8px!important;border-radius:3px;display:inline-block;font-size:16px;color:#fff;margin-bottom:0!important;margin-top:25px!important;font-weight:300;width:auto!important;border-bottom:none!important}.tnp-extension-premium-action{bottom:0;position:absolute;width:100%;padding:12px;font-family:soleil,sans-serif}.tnp-extension-free-action{bottom:0;position:absolute;width:100%;padding:12px;font-family:soleil,sans-serif}.tnp-integration-action{bottom:0;position:absolute;width:100%;padding:12px;font-family:soleil,sans-serif}.tnp-extension-premium-action span{color:#27ae60}.tnp-extension-free-action span{color:#27ae60}.tnp-integration-action span{color:#27ae60}.tnp-extension-activate{color:#1abc9c;padding:5px 8px;text-decoration:none;cursor:pointer}.tnp-extension-install{color:#2980b9;padding:5px 8px;text-decoration:none;cursor:pointer}.tnp-extension-buy{color:#f1c40f;padding:5px 8px;text-decoration:none;cursor:pointer}#tnp-body a.tnp-extension-details{color:#999;padding:5px 8px;text-decoration:none;cursor:pointer}.tnp-extension-free{color:#d35400;padding:5px 8px;text-decoration:none;cursor:pointer;position:relative}img.tnp-extensions-free-badge{position:absolute;display:block;right:0;top:0;width:70px}.tnp-extensions-image img{margin:25px 0 -10px}#tnp-subscribe-overlay{height:100vh;width:100vw;z-index:10000;display:none;background-image:url(images/modal-background.png);background-repeat:repeat;position:fixed;top:0;left:-20px}#tnp-subscribe-modal{width:600px;background-color:rgba(255,255,255,1);margin-right:auto;margin-left:auto;margin-top:100px;-webkit-box-shadow:0 0 20px 0 rgba(0,0,0,0.5);-moz-box-shadow:0 0 20px 0 rgba(0,0,0,0.5);box-shadow:0 0 20px 0 rgba(0,0,0,0.5);padding:25px;background-color:#1d2b38;text-align:center}#tnp-subscribe-modal img{width:30%}#tnp-subscribe-title{font-size:20px;margin-top:30px;margin-bottom:30px;line-height:30px;color:white;font-weight:200}#tnp-subscribe-email-wrapper{margin:20px}#tnp-subscribe-email-wrapper input{border:0;background-color:#223242;color:white}#tnp-subscribe-email{font-size:24px;box-sizing:border-box;width:100%;padding:10px;text-align:center}#tnp-subscribe-submit-wrapper{margin-bottom:20px}#tnp-subscribe-submit{font-size:24px;background-color:#219050;color:#fff;padding:10px 35px;border:0;font-size:17px;letter-spacing:2px}#tnp-subscribe-no-thanks{color:#666;margin-top:20px;margin-bottom:20px}#tnp-body div.tnp-emails-theme-options{background-color:#fff;padding:10px;margin-top:14px}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:0;background:#ecf0f1;font-family:soleil,sans-serif}.cd-slider-wrapper{position:relative;width:100%;height:90vh;overflow:hidden;margin:0 auto}.cd-slider-wrapper .cd-slider,.cd-slider-wrapper .cd-slider>li{height:100%;width:100%}.tnp-logo-big{width:300px}.tnp-row{display:table-row}.tnp-third{width:33%;float:left}.tnp-welcome-confirm-button{color:#fff;padding:10px 30px;background-color:#2ecc71;font-weight:700;font-size:15px;box-shadow:0 20px 38px rgba(0,0,0,0.16);text-decoration:none;display:inline-block;text-align:center;margin:20px auto 0}.tnp-welcome-confirm-button:hover{box-shadow:0 0 38px rgba(0,0,0,0.16);color:#fff}.tnp-welcome-confirm-button:visited{color:#fff;text-decoration:none}.tnp-welcome-link-button{color:#fff;padding:10px 30px;background-color:#3498db;font-weight:700;font-size:15px;box-shadow:0 20px 38px rgba(0,0,0,0.16);text-decoration:none}.tnp-welcome-link-button:hover{box-shadow:0 0 38px rgba(0,0,0,0.16);color:#fff}.tnp-welcome-link-button:visited{color:#fff;text-decoration:none}#tnp-welcome input[type="text"],#tnp-welcome input[type="email"]{max-width:90%}.tnp-welcome-next{background-color:#2ecc71;padding:10px 20px;color:white;text-decoration:none;font-weight:600;font-size:16px;margin:0 10px;box-shadow:0 10px 30px rgba(0,0,0,0.16);width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;display:flex;align-items:center}.tnp-welcome-next:hover{box-shadow:0 0 38px rgba(0,0,0,0.16);color:#fff}.tnp-welcome-next:visited{color:#fff;text-decoration:none}.tnp-welcome-prev{background-color:#3498db;padding:10px 20px;color:white;text-decoration:none;font-weight:600;font-size:16px;margin:0 0 0 10px;box-shadow:0 10px 30px rgba(0,0,0,0.16);width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;display:flex;align-items:center}.tnp-welcome-prev:hover{box-shadow:0 0 38px rgba(0,0,0,0.16);color:#fff}.tnp-welcome-prev:visited{color:#fff;text-decoration:none}.tnp-welcome-next svg{margin-left:10px}.tnp-welcome-prev svg{margin-right:10px}.cd-slider input{width:250px;height:40px;border:1px solid #6c7280;background:#454a56;color:white;color:white;padding:0 10px}.cd-slider>li{position:absolute;top:0;left:0;opacity:0;display:table;background-position:center center;background-repeat:no-repeat;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cd-slider>li.visible{position:relative;z-index:2;opacity:1}.cd-slider>li:first-of-type{background-color:#2b313a}.cd-slider>li:nth-of-type(2){background-color:#2b313a}.cd-slider>li:nth-of-type(3){background-color:#2b313a}.cd-slider>li:nth-of-type(4){background-color:#2b313a}.cd-slider>li:first-of-type,.cd-slider>li:nth-of-type(2),.cd-slider>li:nth-of-type(3),.cd-slider>li:nth-of-type(4){background-size:cover}.cd-slider>li>div{display:table-cell;vertical-align:middle;text-align:center}.cd-slider>li h2,.cd-slider>li p{text-shadow:0 1px 3px rgba(0,0,0,0.1);line-height:1.2;margin:0 auto 14px;color:#fff;width:90%;max-width:320px}.cd-slider>li h2{font-size:40px}.cd-slider>li p{font-size:18px;line-height:26px;text-align:left;color:#b8c3c9;margin:40px auto}.cd-slider>li .cd-btn{display:inline-block;padding:1.2em 1.4em;margin-top:.8em;background-color:rgba(0,0,0,0.6);border-radius:.25em;font-size:1.3rem;font-weight:700;letter-spacing:1px;color:#fff;text-transform:uppercase;-webkit-transition:background-color .2s;-moz-transition:background-color .2s;transition:background-color .2s}.no-touch .cd-slider>li .cd-btn:hover{background-color:rgba(0,0,0,0.8)}@media only screen and (min-width:768px){.cd-slider>li h2,.cd-slider>li p{max-width:520px}.cd-slider>li h2{font-size:40px}.cd-slider>li p{font-size:18px;line-height:26px;text-align:left;color:#b8c3c9;margin:40px auto}}@media only screen and (min-width:1170px){.cd-slider>li h2,.cd-slider>li p{margin-bottom:20px}.cd-slider>li h2{font-size:40px}.cd-slider>li p{font-size:18px;line-height:26px;text-align:center;color:#b8c3c9;margin:30px auto}}.cd-slider-navigation{position:relative;bottom:110px;z-index:3;display:flex;justify-content:center}.cd-svg-cover{position:absolute;z-index:1;left:0;top:0;height:100%;width:100%;opacity:0}.cd-svg-cover path{fill:#ed6a6a}.cd-svg-cover.is-animating{z-index:4;opacity:1;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;transition:opacity .6s}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{display:none}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:white;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2196f3}input:focus+.slider{box-shadow:0 0 1px #2196f3}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}#tnp-body div.tnp-emails-theme-options table.form-table{margin:0}#tnp-body div.tnp-emails-theme-options h3{color:#000}.tnp-emails-edit #options-subject{font-size:16px;display:inline-block;margin:20px 0;width:auto;border-radius:4px;padding:5px 10px}.tnp-suggest-button{font-family:soleil,sans-serif;margin-left:8px;border-radius:3px;background-color:#2980b9;padding:10px 15px 8px;font-size:14px;color:#fff!important;text-decoration:none}.tnp-suggest-button:hover{background-color:#3f8dbf}.tnp-popup-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:10000}.tnp-popup{width:40vw;height:66vh;overflow:auto;margin:100px auto 0 auto;background-color:#181818;padding:20px;position:relative}.tnp-popup-close{display:block;position:absolute;top:5px;right:5px;background-color:#181818;color:#fff;font-size:40px;padding:10px;text-align:right;cursor:pointer}.tnp-subjects-header{font-size:16px;color:#fff;padding:0 70px 20px 20px;font-family:soleil,sans-serif;border-bottom:1px solid #282828}#tnp-edit-subjects-list{padding:0 70px 20px 20px}#tnp-edit-subjects-list a{padding:5px}#tnp-edit-subjects-list svg{margin:0 10px 0 0;vertical-align:middle}.tnp-subject-category{color:#565656;margin:25px 0 10px 0;font-size:12px;text-transform:uppercase;letter-spacing:.1em}#tnp-edit-emoji-list{font-size:28px}#tnp-edit-emoji-list a{display:inline-block;margin-right:5px;margin-bottom:5px}.tnp-list-conditions p{margin:0 10px}.tnp-lists .tnp-notes{margin:0;font-size:.9em}iframe.tnp-editor-preview-mobile{box-sizing:border-box;background-color:#fff;border:1px solid #bbb;box-shadow:1px 1px 10px #777;border-radius:10px;padding:5px;width:320px;height:500px;float:left}iframe.tnp-editor-preview-desktop{box-sizing:border-box;background-color:#fff;border:1px solid #bbb;border-radius:10px;box-shadow:1px 1px 10px #777;padding:15px;width:650px;margin-right:20px;height:500px;float:left}#tnp-license-control{border-left:5px solid #27ae60;display:inline-block;padding:15px 20px;margin-left:-10px;margin-top:15px;border-radius:2px;background-color:#fff}#tnp-license-control form{margin-bottom:10px;margin-top:10px}#tnp-license-control form input{padding-left:10px}#tnp-license-control a{border-bottom:0;color:#27ae60}#tnp-nl-status{width:100%;background:#fffafa;padding:15px 25px 15px 25px;border-left:10px solid #27ae60;border-radius:0 5px 5px 0}#tnp-nl-status p{font-size:17px}.tnp-nl-status-row{margin:10px 0}.tnp-nl-status-title{font-size:26px;line-height:32px;margin:5px 0 0 0;color:#3498db;font-weight:900;vertical-align:middle}.tnp-nl-status-title-value{font-size:13px;line-height:32px;margin:0 0 0 5px;color:#fff;background-color:#95a5a6;border-radius:4px;text-transform:uppercase;letter-spacing:1px;vertical-align:sub}.tnp-nl-status-schedule-targeting{font-size:15px;color:#34495e}.tnp-nl-status-schedule-value{font-size:15px;color:#34495e}.tnp-status-header #options-subject{width:calc(100% - 150px)}.tnp-one-third{width:40%;display:inline-block;vertical-align:top}.tnp-two-thirds{width:59%;display:inline-block;vertical-align:top}.tnp-progress{display:flex;height:1.5rem;overflow:hidden;font-size:.75rem;background-color:#c9cccf;border-radius:.25rem;margin:0;min-width:100px}.tnp-progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}.tnp-progress.sent .tnp-progress-bar{background-color:green}.tnp-progress-numbers{text-align:center;color:#666}.tnp-progress-date{color:#666;font-style:italic}span.tnp-email-status-new{background-color:#8e44ad;padding:2px 10px;border-radius:4px;color:#fff;white-space:nowrap}span.tnp-email-status-paused{background-color:#95a5a6;padding:2px 10px;border-radius:4px;color:#fff;white-space:nowrap}span.tnp-email-status-sending{background-color:#27ae60;padding:2px 10px;border-radius:4px;color:#fff;white-space:nowrap}span.tnp-email-status-scheduled{background-color:#e67e22;padding:2px 10px;border-radius:4px;color:#fff;white-space:nowrap}span.tnp-email-status-sent{background-color:#95a5a6;padding:2px 10px;border-radius:4px;color:#fff;white-space:nowrap}.tnp-themes-new{border-bottom:2px solid #243342;margin-bottom:30px;padding-bottom:30px}#tnp-schedule-button{background-color:#e67e22!important}#tnp-schedule-button:hover{background-color:#ec913f!important}.tnp-button-cancel{background-color:#e74c3c!important}.tnpc-preview{margin-top:10px}.tnpc-preview .fake-browser-ui iframe{width:700px}.tnpc-preview .fake-mobile-browser-ui iframe{width:320px}.fake-browser-ui{padding:30px 0 0;border-radius:3px;border-bottom:10px solid #ccc;background:#ddd;display:inline-block;position:relative;line-height:0;vertical-align:top;margin-left:20px}.fake-mobile-browser-ui{padding:30px 10px 37px;border-radius:10px;border-bottom:10px solid #ccc;background:#ddd;display:inline-block;position:relative;line-height:0;margin-left:30px}.fake-browser-ui .frame{display:block;height:25px;position:absolute;top:12px;left:8px}.fake-mobile-browser-ui .frame{display:block;height:25px;margin-top:10px}.fake-browser-ui span{height:12px;width:12px;border-radius:8px;background-color:#eee;border:1px solid #dadada;float:left;margin:0 0 0 4px}.fake-mobile-browser-ui span{height:50px;width:50px;border-radius:60px;background-color:#eee;border:2px solid #ccc;display:block;margin:auto}.fake-browser-ui .bt-1{background-color:#ed594a}.fake-browser-ui .bt-2{background-color:#fdd800}.fake-browser-ui .bt-3{background-color:#5ac05a}#tnp-promo{text-align:left;background-color:#222b36;margin:20px;border-radius:5px;padding:20px 40px}#tnp-promo .tnp-promo-how-to{width:50%;padding:5px 20px;margin-top:30px;margin-bottom:30px;border-left:2px solid #f1c40f}#tnp-promo .tnp-promo-how-to h3{color:#ecf0f1;margin:0;line-height:36px}#tnp-promo .tnp-promo-how-to p{color:#ecf0f1;margin:0;font-size:16px;line-height:26px}#tnp-promo .tnp-promo-buttons{margin:50px 0}#tnp-promo .tnp-promo-button{background:#27ae60;text-decoration:none;color:white;padding:15px 20px;font-size:15px;border-radius:2px}#tnp-promo .tnp-promo-button:hover{background:#2ecc71;color:white}#tnp-promo .tnp-promo-button i{margin-right:3px}#tnp-body td a.tnp-table-link,#tnp-body td a.tnp-table-link:visited{color:#444}#tnp-body td a.tnp-table-link:hover{color:#3498db}.text-left{text-align:left}
|
emails/blocks/posts/block.php
CHANGED
@@ -32,6 +32,7 @@ $defaults = array(
|
|
32 |
'block_padding_right' => 15,
|
33 |
'block_padding_top' => 15,
|
34 |
'block_padding_bottom' => 15,
|
|
|
35 |
'excerpt_length' => 30,
|
36 |
'post_offset' => 0,
|
37 |
'automated_include' => 'new',
|
@@ -68,34 +69,38 @@ if (!empty($options['tags'])) {
|
|
68 |
$filters['tag'] = $options['tags'];
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
$filters['date_query'] = array(
|
75 |
-
'after' => gmdate('c', $context['last_run'])
|
76 |
-
);
|
77 |
-
}
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
$out['stop'] = true;
|
88 |
-
return;
|
89 |
-
} else if ($options['automated'] == '2') {
|
90 |
-
$out['skip'] = true;
|
91 |
-
return;
|
92 |
}
|
93 |
-
}
|
94 |
|
95 |
-
// We have something new but we need to reload the posts without filtering by date
|
96 |
-
if ($options['automated_include'] == 'max') {
|
97 |
-
unset($filters['date_query']);
|
98 |
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
}
|
101 |
|
@@ -118,67 +123,57 @@ $alternative_2 = plugins_url('newsletter') . '/emails/blocks/posts/images/blank-
|
|
118 |
remove_all_filters('excerpt_more');
|
119 |
?>
|
120 |
|
121 |
-
<?php if (!$posts) { ?>
|
122 |
-
|
123 |
-
|
124 |
-
<div inline-class="nocontents"><?php echo $options['automated_no_contents'] ?></div>
|
125 |
-
|
126 |
-
|
127 |
-
<?php
|
128 |
-
return;
|
129 |
-
}
|
130 |
-
?>
|
131 |
|
132 |
<?php if ($options['layout'] == 'one') { ?>
|
133 |
<style>
|
134 |
.posts-post-date {
|
135 |
-
padding: 0 0 5px 0;
|
136 |
font-size: 13px;
|
137 |
-
font-family: <?php echo $font_family ?>;
|
138 |
-
font-weight: normal;
|
139 |
color: #aaaaaa;
|
140 |
}
|
141 |
|
142 |
.posts-post-title {
|
143 |
-
padding: 0 0 5px 0;
|
144 |
-
font-size: <?php echo $title_font_size ?>px;
|
145 |
font-family: <?php echo $title_font_family ?>;
|
146 |
-
font-weight: normal;
|
147 |
color: <?php echo $options['title_font_color'] ?>;
|
148 |
line-height: normal;
|
149 |
}
|
150 |
|
151 |
.posts-post-excerpt {
|
152 |
padding: 10px 0 15px 0;
|
153 |
-
font-family: <?php echo $font_family ?>;
|
154 |
color: <?php echo $options['font_color'] ?>;
|
155 |
-
font-size: <?php echo $font_size ?>px;
|
156 |
line-height: 1.5em;
|
157 |
}
|
158 |
|
159 |
.posts-button-table {
|
160 |
-
background-color: <?php echo $button_background ?>;
|
161 |
/*border:1px solid #353535;*/
|
162 |
border-radius:5px;
|
163 |
align: right;
|
164 |
}
|
165 |
.posts-button-td {
|
166 |
color: <?php echo $button_color ?>;
|
167 |
-
font-family:<?php echo $font_family ?>;
|
168 |
font-size:<?php echo $button_font_size ?>px;
|
169 |
-
font-weight:normal;
|
170 |
letter-spacing:normal;
|
171 |
-
line-height:normal;
|
172 |
-
padding-top:10px;
|
173 |
-
padding-right:15px;
|
174 |
-
padding-bottom:10px;
|
175 |
padding-left:15px;
|
176 |
text-align: right;
|
177 |
}
|
178 |
.posts-button-a {
|
179 |
color:<?php echo $button_color ?>;
|
180 |
font-size:<?php echo $button_font_size ?>px;
|
181 |
-
font-weight:normal;
|
182 |
text-decoration:none;
|
183 |
}
|
184 |
</style>
|
@@ -244,7 +239,7 @@ remove_all_filters('excerpt_more');
|
|
244 |
TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $post->ID) :
|
245 |
tnp_post_title($post)
|
246 |
?>
|
247 |
-
</td>
|
248 |
</tr>
|
249 |
<tr>
|
250 |
<td align="<?php echo $align_left?>"
|
@@ -266,7 +261,7 @@ remove_all_filters('excerpt_more');
|
|
266 |
<a href="<?php echo esc_attr($url) ?>" target="_blank" inline-class="posts-button-a" dir="<?php echo $dir?>"><?php echo $button_label ?></a>
|
267 |
</td>
|
268 |
</tr>
|
269 |
-
</table>
|
270 |
</td>
|
271 |
</tr>
|
272 |
</table>
|
@@ -288,58 +283,58 @@ remove_all_filters('excerpt_more');
|
|
288 |
|
289 |
<style>
|
290 |
.posts-post-date {
|
291 |
-
padding: 10px 0 0 15px;
|
292 |
font-size: 13px;
|
293 |
-
font-family: <?php echo $font_family ?>;
|
294 |
-
font-weight: normal;
|
295 |
color: #aaaaaa;
|
296 |
-
}
|
297 |
.posts-post-title {
|
298 |
-
padding: 15px 0 0 0;
|
299 |
-
font-family: <?php echo $title_font_family ?>;
|
300 |
color: <?php echo $options['title_font_color'] ?>;
|
301 |
-
font-size: <?php echo $title_font_size ?>px;
|
302 |
-
line-height: 1.3em;
|
303 |
}
|
304 |
.posts-post-excerpt {
|
305 |
-
padding: 5px 0 0 0;
|
306 |
-
font-family: <?php echo $font_family ?>;
|
307 |
color: <?php echo $options['font_color'] ?>;
|
308 |
-
font-size: <?php echo $font_size ?>px;
|
309 |
line-height: 1.4em;
|
310 |
}
|
311 |
.posts-button-table {
|
312 |
-
background-color: <?php echo $button_background ?>;
|
313 |
/*border:1px solid #353535;*/
|
314 |
border-radius:5px;
|
315 |
align: right;
|
316 |
}
|
317 |
.posts-button-td {
|
318 |
color: <?php echo $button_color ?>;
|
319 |
-
font-family:<?php echo $font_family ?>;
|
320 |
font-size:<?php echo $button_font_size ?>px;
|
321 |
-
font-weight:normal;
|
322 |
letter-spacing:normal;
|
323 |
-
line-height:normal;
|
324 |
-
padding-top:15px;
|
325 |
-
padding-right:30px;
|
326 |
-
padding-bottom:15px;
|
327 |
padding-left:30px;
|
328 |
text-align: right;
|
329 |
}
|
330 |
.posts-button-a {
|
331 |
color:<?php echo $button_color ?>;
|
332 |
font-size:<?php echo $button_font_size ?>px;
|
333 |
-
font-weight:normal;
|
334 |
text-decoration:none;
|
335 |
-
}
|
336 |
</style>
|
337 |
<!-- TWO COLUMN SECTION -->
|
338 |
|
339 |
|
340 |
<!-- TWO COLUMNS -->
|
341 |
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
342 |
-
<?php foreach (array_chunk($posts, 2) AS $row) { ?>
|
343 |
<tr>
|
344 |
<td valign="top" style="padding: 10px;" class="mobile-wrapper two-columns">
|
345 |
|
@@ -406,7 +401,7 @@ remove_all_filters('excerpt_more');
|
|
406 |
<a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank" inline-class="posts-button-a"><?php echo $button_label ?></a>
|
407 |
</td>
|
408 |
</tr>
|
409 |
-
</table>
|
410 |
</td>
|
411 |
</tr>
|
412 |
</table>
|
@@ -429,7 +424,7 @@ remove_all_filters('excerpt_more');
|
|
429 |
<td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
|
430 |
<a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank">
|
431 |
<img src="<?php echo $media->url ?>"
|
432 |
-
width="<?php echo $media->width ?>"
|
433 |
height="<?php echo $media->height ?>"
|
434 |
alt="Image" border="0" class="img-max">
|
435 |
</a>
|
@@ -476,7 +471,7 @@ remove_all_filters('excerpt_more');
|
|
476 |
<a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank" inline-class="posts-button-a"><?php echo $button_label ?></a>
|
477 |
</td>
|
478 |
</tr>
|
479 |
-
</table>
|
480 |
</td>
|
481 |
</tr>
|
482 |
</table>
|
@@ -494,7 +489,8 @@ remove_all_filters('excerpt_more');
|
|
494 |
|
495 |
|
496 |
|
497 |
-
<?php
|
|
|
498 |
|
499 |
Newsletter::instance()->switch_language($options['language']);
|
500 |
|
32 |
'block_padding_right' => 15,
|
33 |
'block_padding_top' => 15,
|
34 |
'block_padding_bottom' => 15,
|
35 |
+
'button_font_weight' => 'normal',
|
36 |
'excerpt_length' => 30,
|
37 |
'post_offset' => 0,
|
38 |
'automated_include' => 'new',
|
69 |
$filters['tag'] = $options['tags'];
|
70 |
}
|
71 |
|
72 |
+
if ($context['type'] != 'automated') {
|
73 |
+
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
74 |
+
} else {
|
|
|
|
|
|
|
|
|
75 |
|
76 |
+
if (!empty($options['automated_disabled'])) {
|
77 |
+
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
78 |
+
} else {
|
79 |
+
// Can be empty when composing...
|
80 |
+
if (!empty($context['last_run'])) {
|
81 |
+
$filters['date_query'] = array(
|
82 |
+
'after' => gmdate('c', $context['last_run'])
|
83 |
+
);
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
|
|
85 |
|
|
|
|
|
|
|
86 |
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
87 |
+
if (empty($posts)) {
|
88 |
+
if ($options['automated'] == '1') {
|
89 |
+
$out['stop'] = true;
|
90 |
+
return;
|
91 |
+
} else if ($options['automated'] == '2') {
|
92 |
+
$out['skip'] = true;
|
93 |
+
return;
|
94 |
+
} else {
|
95 |
+
echo '<div inline-class="nocontents">', $options['automated_no_contents'], '</div>';
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
} else {
|
99 |
+
if ($options['automated_include'] == 'max') {
|
100 |
+
unset($filters['date_query']);
|
101 |
+
$posts = Newsletter::instance()->get_posts($filters, $options['language']);
|
102 |
+
}
|
103 |
+
}
|
104 |
}
|
105 |
}
|
106 |
|
123 |
remove_all_filters('excerpt_more');
|
124 |
?>
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
<?php if ($options['layout'] == 'one') { ?>
|
128 |
<style>
|
129 |
.posts-post-date {
|
130 |
+
padding: 0 0 5px 0;
|
131 |
font-size: 13px;
|
132 |
+
font-family: <?php echo $font_family ?>;
|
133 |
+
font-weight: normal;
|
134 |
color: #aaaaaa;
|
135 |
}
|
136 |
|
137 |
.posts-post-title {
|
138 |
+
padding: 0 0 5px 0;
|
139 |
+
font-size: <?php echo $title_font_size ?>px;
|
140 |
font-family: <?php echo $title_font_family ?>;
|
141 |
+
font-weight: normal;
|
142 |
color: <?php echo $options['title_font_color'] ?>;
|
143 |
line-height: normal;
|
144 |
}
|
145 |
|
146 |
.posts-post-excerpt {
|
147 |
padding: 10px 0 15px 0;
|
148 |
+
font-family: <?php echo $font_family ?>;
|
149 |
color: <?php echo $options['font_color'] ?>;
|
150 |
+
font-size: <?php echo $font_size ?>px;
|
151 |
line-height: 1.5em;
|
152 |
}
|
153 |
|
154 |
.posts-button-table {
|
155 |
+
background-color: <?php echo $button_background ?>;
|
156 |
/*border:1px solid #353535;*/
|
157 |
border-radius:5px;
|
158 |
align: right;
|
159 |
}
|
160 |
.posts-button-td {
|
161 |
color: <?php echo $button_color ?>;
|
162 |
+
font-family:<?php echo $font_family ?>;
|
163 |
font-size:<?php echo $button_font_size ?>px;
|
164 |
+
font-weight:normal;
|
165 |
letter-spacing:normal;
|
166 |
+
line-height:normal;
|
167 |
+
padding-top:10px;
|
168 |
+
padding-right:15px;
|
169 |
+
padding-bottom:10px;
|
170 |
padding-left:15px;
|
171 |
text-align: right;
|
172 |
}
|
173 |
.posts-button-a {
|
174 |
color:<?php echo $button_color ?>;
|
175 |
font-size:<?php echo $button_font_size ?>px;
|
176 |
+
font-weight:normal;
|
177 |
text-decoration:none;
|
178 |
}
|
179 |
</style>
|
239 |
TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $post->ID) :
|
240 |
tnp_post_title($post)
|
241 |
?>
|
242 |
+
</td>
|
243 |
</tr>
|
244 |
<tr>
|
245 |
<td align="<?php echo $align_left?>"
|
261 |
<a href="<?php echo esc_attr($url) ?>" target="_blank" inline-class="posts-button-a" dir="<?php echo $dir?>"><?php echo $button_label ?></a>
|
262 |
</td>
|
263 |
</tr>
|
264 |
+
</table>
|
265 |
</td>
|
266 |
</tr>
|
267 |
</table>
|
283 |
|
284 |
<style>
|
285 |
.posts-post-date {
|
286 |
+
padding: 10px 0 0 15px;
|
287 |
font-size: 13px;
|
288 |
+
font-family: <?php echo $font_family ?>;
|
289 |
+
font-weight: normal;
|
290 |
color: #aaaaaa;
|
291 |
+
}
|
292 |
.posts-post-title {
|
293 |
+
padding: 15px 0 0 0;
|
294 |
+
font-family: <?php echo $title_font_family ?>;
|
295 |
color: <?php echo $options['title_font_color'] ?>;
|
296 |
+
font-size: <?php echo $title_font_size ?>px;
|
297 |
+
line-height: 1.3em;
|
298 |
}
|
299 |
.posts-post-excerpt {
|
300 |
+
padding: 5px 0 0 0;
|
301 |
+
font-family: <?php echo $font_family ?>;
|
302 |
color: <?php echo $options['font_color'] ?>;
|
303 |
+
font-size: <?php echo $font_size ?>px;
|
304 |
line-height: 1.4em;
|
305 |
}
|
306 |
.posts-button-table {
|
307 |
+
background-color: <?php echo $button_background ?>;
|
308 |
/*border:1px solid #353535;*/
|
309 |
border-radius:5px;
|
310 |
align: right;
|
311 |
}
|
312 |
.posts-button-td {
|
313 |
color: <?php echo $button_color ?>;
|
314 |
+
font-family:<?php echo $font_family ?>;
|
315 |
font-size:<?php echo $button_font_size ?>px;
|
316 |
+
font-weight:normal;
|
317 |
letter-spacing:normal;
|
318 |
+
line-height:normal;
|
319 |
+
padding-top:15px;
|
320 |
+
padding-right:30px;
|
321 |
+
padding-bottom:15px;
|
322 |
padding-left:30px;
|
323 |
text-align: right;
|
324 |
}
|
325 |
.posts-button-a {
|
326 |
color:<?php echo $button_color ?>;
|
327 |
font-size:<?php echo $button_font_size ?>px;
|
328 |
+
font-weight:normal;
|
329 |
text-decoration:none;
|
330 |
+
}
|
331 |
</style>
|
332 |
<!-- TWO COLUMN SECTION -->
|
333 |
|
334 |
|
335 |
<!-- TWO COLUMNS -->
|
336 |
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
337 |
+
<?php foreach (array_chunk($posts, 2) AS $row) { ?>
|
338 |
<tr>
|
339 |
<td valign="top" style="padding: 10px;" class="mobile-wrapper two-columns">
|
340 |
|
401 |
<a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank" inline-class="posts-button-a"><?php echo $button_label ?></a>
|
402 |
</td>
|
403 |
</tr>
|
404 |
+
</table>
|
405 |
</td>
|
406 |
</tr>
|
407 |
</table>
|
424 |
<td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
|
425 |
<a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank">
|
426 |
<img src="<?php echo $media->url ?>"
|
427 |
+
width="<?php echo $media->width ?>"
|
428 |
height="<?php echo $media->height ?>"
|
429 |
alt="Image" border="0" class="img-max">
|
430 |
</a>
|
471 |
<a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank" inline-class="posts-button-a"><?php echo $button_label ?></a>
|
472 |
</td>
|
473 |
</tr>
|
474 |
+
</table>
|
475 |
</td>
|
476 |
</tr>
|
477 |
</table>
|
489 |
|
490 |
|
491 |
|
492 |
+
<?php
|
493 |
+
}
|
494 |
|
495 |
Newsletter::instance()->switch_language($options['language']);
|
496 |
|
emails/blocks/posts/options.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/* @var $options array contains all the options the current block we're ediging contains */
|
4 |
/* @var $controls NewsletterControls */
|
5 |
/* @var $fields NewsletterFields */
|
@@ -10,18 +9,40 @@ if (class_exists('NewsletterExtensions')) {
|
|
10 |
}
|
11 |
?>
|
12 |
<p>
|
13 |
-
Custom post types can be added using our <a href="<?php echo $extensions_url?>" target="_blank">Advanced Composer Blocks Addon</a>.
|
14 |
</p>
|
15 |
|
16 |
<?php if ($context['type'] == 'automated') { ?>
|
17 |
|
18 |
-
<?php $fields->select('
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
<?php $fields->select('automated_include', __('What to include', 'newsletter'), array('new' => __('New posts after last newsletter', 'newsletter'),
|
23 |
-
'max' => __('Always max posts if at least one is new', 'newsletter')),
|
24 |
-
array('description'=>'This option is effective only when the newsletter is generated, not while composing')) ?>
|
25 |
<?php } ?>
|
26 |
|
27 |
|
@@ -29,12 +50,12 @@ if (class_exists('NewsletterExtensions')) {
|
|
29 |
|
30 |
<?php $fields->font('title_font', __('Title font', 'newsletter')) ?>
|
31 |
|
32 |
-
<?php $fields->number(
|
33 |
|
34 |
<?php $fields->font('font', __('Excerpt font', 'newsletter')) ?>
|
35 |
|
36 |
<div class="tnp-field-row">
|
37 |
-
<label class="tnp-row-label"><?php _e('Dates and images', 'newsletter')?></label>
|
38 |
<div class="tnp-field-col-2">
|
39 |
<?php $fields->checkbox('show_image', __('Show image', 'newsletter')) ?>
|
40 |
</div>
|
@@ -48,8 +69,8 @@ if (class_exists('NewsletterExtensions')) {
|
|
48 |
<div class="tnp-field-col-2">
|
49 |
<?php $fields->select_number('max', __('Max posts', 'newsletter'), 1, 40); ?>
|
50 |
</div>
|
51 |
-
|
52 |
-
<?php $fields->select_number(
|
53 |
</div>
|
54 |
</div>
|
55 |
|
@@ -59,7 +80,7 @@ if (class_exists('NewsletterExtensions')) {
|
|
59 |
|
60 |
<?php $fields->section(__('Filters', 'newsletter')) ?>
|
61 |
<?php $fields->categories(); ?>
|
62 |
-
<?php $fields->text('tags', __('Tags', 'newsletter'), ['description'=>__('Comma separated')]); ?>
|
63 |
|
64 |
<?php $fields->block_commons() ?>
|
65 |
|
1 |
<?php
|
|
|
2 |
/* @var $options array contains all the options the current block we're ediging contains */
|
3 |
/* @var $controls NewsletterControls */
|
4 |
/* @var $fields NewsletterFields */
|
9 |
}
|
10 |
?>
|
11 |
<p>
|
12 |
+
Custom post types can be added using our <a href="<?php echo $extensions_url ?>" target="_blank">Advanced Composer Blocks Addon</a>.
|
13 |
</p>
|
14 |
|
15 |
<?php if ($context['type'] == 'automated') { ?>
|
16 |
|
17 |
+
<?php $fields->select('automated_disabled', '', ['' => 'Check for new posts since last newsletter', '1' => 'Do not check for new posts']) ?>
|
18 |
+
|
19 |
+
<div class="tnp-field-row">
|
20 |
+
<div class="tnp-field-col-2">
|
21 |
+
<?php
|
22 |
+
$fields->select('automated_include', __('If there are new posts', 'newsletter'),
|
23 |
+
[
|
24 |
+
'new' => __('Include only new posts', 'newsletter'),
|
25 |
+
'max' => __('Include specified max posts', 'newsletter')
|
26 |
+
],
|
27 |
+
['description' => ''])
|
28 |
+
?>
|
29 |
+
</div>
|
30 |
+
<div class="tnp-field-col-2">
|
31 |
+
<?php
|
32 |
+
$fields->select('automated', __('If there are not new posts', 'newsletter'),
|
33 |
+
[
|
34 |
+
'' => 'Show the message below',
|
35 |
+
'1' => 'Do not send the newsletter',
|
36 |
+
'2' => 'Remove this block'
|
37 |
+
],
|
38 |
+
['description' => ''])
|
39 |
+
?>
|
40 |
+
<?php $fields->text('automated_no_contents', null, ['placeholder'=>'No new posts message']) ?>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
|
45 |
|
|
|
|
|
|
|
46 |
<?php } ?>
|
47 |
|
48 |
|
50 |
|
51 |
<?php $fields->font('title_font', __('Title font', 'newsletter')) ?>
|
52 |
|
53 |
+
<?php $fields->number('excerpt_length', __('Excerpt words', 'newsletter'), array('min' => 0)); ?>
|
54 |
|
55 |
<?php $fields->font('font', __('Excerpt font', 'newsletter')) ?>
|
56 |
|
57 |
<div class="tnp-field-row">
|
58 |
+
<label class="tnp-row-label"><?php _e('Dates and images', 'newsletter') ?></label>
|
59 |
<div class="tnp-field-col-2">
|
60 |
<?php $fields->checkbox('show_image', __('Show image', 'newsletter')) ?>
|
61 |
</div>
|
69 |
<div class="tnp-field-col-2">
|
70 |
<?php $fields->select_number('max', __('Max posts', 'newsletter'), 1, 40); ?>
|
71 |
</div>
|
72 |
+
<div class="tnp-field-col-2">
|
73 |
+
<?php $fields->select_number('post_offset', __('Posts offset', 'newsletter'), 0, 20); ?>
|
74 |
</div>
|
75 |
</div>
|
76 |
|
80 |
|
81 |
<?php $fields->section(__('Filters', 'newsletter')) ?>
|
82 |
<?php $fields->categories(); ?>
|
83 |
+
<?php $fields->text('tags', __('Tags', 'newsletter'), ['description' => __('Comma separated')]); ?>
|
84 |
|
85 |
<?php $fields->block_commons() ?>
|
86 |
|
includes/addon.php
CHANGED
@@ -23,7 +23,7 @@ class NewsletterAddon {
|
|
23 |
}
|
24 |
add_action('newsletter_init', array($this, 'init'));
|
25 |
//Load translations from specific addon /languages/ directory
|
26 |
-
|
27 |
}
|
28 |
|
29 |
/**
|
@@ -32,7 +32,7 @@ class NewsletterAddon {
|
|
32 |
* @param bool $first_install
|
33 |
*/
|
34 |
function upgrade($first_install = false) {
|
35 |
-
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -40,7 +40,7 @@ class NewsletterAddon {
|
|
40 |
* fires the <code>newsletter_init</code> event.
|
41 |
*/
|
42 |
function init() {
|
43 |
-
|
44 |
}
|
45 |
|
46 |
/**
|
@@ -112,6 +112,7 @@ class NewsletterAddon {
|
|
112 |
}
|
113 |
return $r;
|
114 |
}
|
|
|
115 |
}
|
116 |
|
117 |
/**
|
@@ -175,21 +176,33 @@ class NewsletterMailerAddon extends NewsletterAddon {
|
|
175 |
* @param string $subject
|
176 |
* @return TNP_Mailer_Message
|
177 |
*/
|
178 |
-
static function get_test_message($to, $subject = '') {
|
179 |
$message = new TNP_Mailer_Message();
|
180 |
$message->to = $to;
|
181 |
$message->to_name = '';
|
182 |
-
$
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
$message->headers['X-Newsletter-Email-Id'] = '0';
|
|
|
188 |
if (empty($subject)) {
|
189 |
$message->subject = '[' . get_option('blogname') . '] Test message from Newsletter (' . date(DATE_ISO8601) . ')';
|
190 |
} else {
|
191 |
$message->subject = $subject;
|
192 |
}
|
|
|
|
|
|
|
|
|
|
|
193 |
$message->from = Newsletter::instance()->options['sender_email'];
|
194 |
$message->from_name = Newsletter::instance()->options['sender_name'];
|
195 |
return $message;
|
@@ -203,14 +216,12 @@ class NewsletterMailerAddon extends NewsletterAddon {
|
|
203 |
* @param int $count Number of message objects to create
|
204 |
* @return TNP_Mailer_Message[]
|
205 |
*/
|
206 |
-
function get_test_messages($to, $count) {
|
207 |
$messages = array();
|
208 |
for ($i = 0; $i < $count; $i++) {
|
209 |
-
$messages[] = self::get_test_message($to, '[' . get_option('blogname') . '] Test message ' . ($i + 1) . ' from Newsletter (' . date(DATE_ISO8601) . ')');
|
210 |
}
|
211 |
return $messages;
|
212 |
}
|
213 |
|
214 |
}
|
215 |
-
|
216 |
-
|
23 |
}
|
24 |
add_action('newsletter_init', array($this, 'init'));
|
25 |
//Load translations from specific addon /languages/ directory
|
26 |
+
load_plugin_textdomain('newsletter-' . $this->name, false, 'newsletter-' . $this->name . '/languages/');
|
27 |
}
|
28 |
|
29 |
/**
|
32 |
* @param bool $first_install
|
33 |
*/
|
34 |
function upgrade($first_install = false) {
|
35 |
+
|
36 |
}
|
37 |
|
38 |
/**
|
40 |
* fires the <code>newsletter_init</code> event.
|
41 |
*/
|
42 |
function init() {
|
43 |
+
|
44 |
}
|
45 |
|
46 |
/**
|
112 |
}
|
113 |
return $r;
|
114 |
}
|
115 |
+
|
116 |
}
|
117 |
|
118 |
/**
|
176 |
* @param string $subject
|
177 |
* @return TNP_Mailer_Message
|
178 |
*/
|
179 |
+
static function get_test_message($to, $subject = '', $type = '') {
|
180 |
$message = new TNP_Mailer_Message();
|
181 |
$message->to = $to;
|
182 |
$message->to_name = '';
|
183 |
+
if (empty($type) || $type == 'html') {
|
184 |
+
$message->body = "<!DOCTYPE html>\n";
|
185 |
+
$message->body .= "This is the rich text (HTML) version of a test message.</p>\n";
|
186 |
+
$message->body .= "This is a <strong>bold text</strong></p>\n";
|
187 |
+
$message->body .= "This is a <a href='http://www.thenewsletterplugin.com'>link to www.thenewsletterplugin.com</a></p>\n";
|
188 |
+
}
|
189 |
+
|
190 |
+
if (empty($type) || $type == 'text') {
|
191 |
+
$message->body_text = 'This is the TEXT version of a test message. You should see this message only if you email client does not support the rich text (HTML) version.';
|
192 |
+
}
|
193 |
+
|
194 |
$message->headers['X-Newsletter-Email-Id'] = '0';
|
195 |
+
|
196 |
if (empty($subject)) {
|
197 |
$message->subject = '[' . get_option('blogname') . '] Test message from Newsletter (' . date(DATE_ISO8601) . ')';
|
198 |
} else {
|
199 |
$message->subject = $subject;
|
200 |
}
|
201 |
+
|
202 |
+
if ($type) {
|
203 |
+
$message->subject .= ' - ' . $type . ' only';
|
204 |
+
}
|
205 |
+
|
206 |
$message->from = Newsletter::instance()->options['sender_email'];
|
207 |
$message->from_name = Newsletter::instance()->options['sender_name'];
|
208 |
return $message;
|
216 |
* @param int $count Number of message objects to create
|
217 |
* @return TNP_Mailer_Message[]
|
218 |
*/
|
219 |
+
function get_test_messages($to, $count, $type = '') {
|
220 |
$messages = array();
|
221 |
for ($i = 0; $i < $count; $i++) {
|
222 |
+
$messages[] = self::get_test_message($to, '[' . get_option('blogname') . '] Test message ' . ($i + 1) . ' from Newsletter (' . date(DATE_ISO8601) . ')', $type);
|
223 |
}
|
224 |
return $messages;
|
225 |
}
|
226 |
|
227 |
}
|
|
|
|
includes/module.php
CHANGED
@@ -1664,6 +1664,12 @@ class NewsletterModule {
|
|
1664 |
$email = null;
|
1665 |
}
|
1666 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1667 |
|
1668 |
|
1669 |
$text = apply_filters('newsletter_replace', $text, $user, $email);
|
@@ -1772,6 +1778,7 @@ class NewsletterModule {
|
|
1772 |
$text = str_replace('{company_legal}', $options['footer_legal'], $text);
|
1773 |
|
1774 |
|
|
|
1775 |
//$this->logger->debug('Replace end');
|
1776 |
return $text;
|
1777 |
}
|
@@ -1822,6 +1829,7 @@ class NewsletterModule {
|
|
1822 |
if (!isset($_POST['ts']) || time() - $_POST['ts'] > 60) {
|
1823 |
return false;
|
1824 |
}
|
|
|
1825 |
if ($captcha) {
|
1826 |
$n1 = (int) $_POST['n1'];
|
1827 |
if (empty($n1)) {
|
1664 |
$email = null;
|
1665 |
}
|
1666 |
}
|
1667 |
+
|
1668 |
+
$initial_language = $this->get_current_language();
|
1669 |
+
|
1670 |
+
if ($user && $user->language) {
|
1671 |
+
$this->switch_language($user->language);
|
1672 |
+
}
|
1673 |
|
1674 |
|
1675 |
$text = apply_filters('newsletter_replace', $text, $user, $email);
|
1778 |
$text = str_replace('{company_legal}', $options['footer_legal'], $text);
|
1779 |
|
1780 |
|
1781 |
+
$this->switch_language($initial_language);
|
1782 |
//$this->logger->debug('Replace end');
|
1783 |
return $text;
|
1784 |
}
|
1829 |
if (!isset($_POST['ts']) || time() - $_POST['ts'] > 60) {
|
1830 |
return false;
|
1831 |
}
|
1832 |
+
|
1833 |
if ($captcha) {
|
1834 |
$n1 = (int) $_POST['n1'];
|
1835 |
if (empty($n1)) {
|
plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
-
Version: 6.7.
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: https://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -35,7 +35,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
|
|
35 |
return;
|
36 |
}
|
37 |
|
38 |
-
define('NEWSLETTER_VERSION', '6.7.
|
39 |
|
40 |
global $newsletter, $wpdb;
|
41 |
|
@@ -185,6 +185,11 @@ class Newsletter extends NewsletterModule {
|
|
185 |
if ( $this->is_admin_page() ) {
|
186 |
add_action( 'admin_enqueue_scripts', array( $this, 'hook_wp_admin_enqueue_scripts' ) );
|
187 |
}
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
}
|
190 |
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
+
Version: 6.7.4
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: https://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
35 |
return;
|
36 |
}
|
37 |
|
38 |
+
define('NEWSLETTER_VERSION', '6.7.4');
|
39 |
|
40 |
global $newsletter, $wpdb;
|
41 |
|
185 |
if ( $this->is_admin_page() ) {
|
186 |
add_action( 'admin_enqueue_scripts', array( $this, 'hook_wp_admin_enqueue_scripts' ) );
|
187 |
}
|
188 |
+
|
189 |
+
add_action('wp_ajax_tnp_hide_promotion', function () {
|
190 |
+
update_option('newsletter_promotion', $_POST['id']);
|
191 |
+
die();
|
192 |
+
});
|
193 |
|
194 |
}
|
195 |
|
profile/profile.php
CHANGED
@@ -28,7 +28,7 @@ class NewsletterProfile extends NewsletterModule {
|
|
28 |
|
29 |
if (in_array($action, ['p', 'profile', 'pe', 'profile-save', 'profile_export', 'ps'])) {
|
30 |
if (!$user || $user->status != TNP_User::STATUS_CONFIRMED) {
|
31 |
-
$this->dienow('The subscriber was not found or is not confirmed.');
|
32 |
}
|
33 |
}
|
34 |
|
28 |
|
29 |
if (in_array($action, ['p', 'profile', 'pe', 'profile-save', 'profile_export', 'ps'])) {
|
30 |
if (!$user || $user->status != TNP_User::STATUS_CONFIRMED) {
|
31 |
+
$this->dienow(__('The subscriber was not found or is not confirmed.', 'newsletter'));
|
32 |
}
|
33 |
}
|
34 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 5.4.2
|
5 |
-
Stable tag: 6.7.
|
6 |
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
@@ -113,6 +113,10 @@ Thank you, The Newsletter Team
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
|
|
116 |
= 6.7.3 =
|
117 |
|
118 |
* Added the company_legal tag
|
2 |
Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 5.4.2
|
5 |
+
Stable tag: 6.7.4
|
6 |
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
* Improved posts block in the Automated context with more options
|
117 |
+
* Improved the unsubscribe header
|
118 |
+
* Removed the Auto-Submitted header
|
119 |
+
|
120 |
= 6.7.3 =
|
121 |
|
122 |
* Added the company_legal tag
|
subscription/subscription.php
CHANGED
@@ -852,8 +852,10 @@ class NewsletterSubscription extends NewsletterModule {
|
|
852 |
}
|
853 |
$message = str_replace('{message}', $message, $template);
|
854 |
|
855 |
-
|
856 |
-
|
|
|
|
|
857 |
// Replaces tags from the template
|
858 |
$message = $this->replace($message, $user);
|
859 |
$subject = $this->replace($subject, $user);
|
852 |
}
|
853 |
$message = str_replace('{message}', $message, $template);
|
854 |
|
855 |
+
//$headers = array('Auto-Submitted' => 'auto-generated');
|
856 |
+
|
857 |
+
$headers = array();
|
858 |
+
|
859 |
// Replaces tags from the template
|
860 |
$message = $this->replace($message, $user);
|
861 |
$subject = $this->replace($subject, $user);
|
tnp-header.php
CHANGED
@@ -33,6 +33,21 @@ $warning = false;
|
|
33 |
|
34 |
$warning |= empty($status_options['mail']);
|
35 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
<div class="tnp-drowpdown" id="tnp-header">
|
38 |
<a href="?page=newsletter_main_index"><img src="<?php echo plugins_url('newsletter'); ?>/images/header/tnp-logo-red-header.png" class="tnp-header-logo" style="vertical-align: bottom;"></a>
|
33 |
|
34 |
$warning |= empty($status_options['mail']);
|
35 |
?>
|
36 |
+
<script>
|
37 |
+
function tnp_close_promotion() {
|
38 |
+
jQuery.post(ajaxurl + "?action=tnp_hide_promotion", {id: 'june-2020'});
|
39 |
+
document.getElementById('tnp-promotion-bar').style.display = 'none';
|
40 |
+
}
|
41 |
+
</script>
|
42 |
+
|
43 |
+
<?php if (false && get_option('newsletter_promotion') !== 'june-2020' && time() < gmmktime(0, 0, 0, 7, 15, 2020)) { ?>
|
44 |
+
<div id="tnp-promotion-bar">
|
45 |
+
<a href="https://www.thenewsletterplugin.com/premium?utm_source=plugin-bar&utm_campaign=june-2020" onclick="tnp_close_promotion(); return true;" target="_blank">We're running a 50% discount offer until July, 15. Check it out.</a>
|
46 |
+
|
47 |
+
<a href="javascript:void(tnp_close_promotion('june-2020'))">No, thank you!</a>
|
48 |
+
</div>
|
49 |
+
<?php } ?>
|
50 |
+
|
51 |
|
52 |
<div class="tnp-drowpdown" id="tnp-header">
|
53 |
<a href="?page=newsletter_main_index"><img src="<?php echo plugins_url('newsletter'); ?>/images/header/tnp-logo-red-header.png" class="tnp-header-logo" style="vertical-align: bottom;"></a>
|
unsubscription/unsubscription.php
CHANGED
@@ -41,8 +41,11 @@ class NewsletterUnsubscription extends NewsletterModule {
|
|
41 |
die();
|
42 |
break;
|
43 |
|
|
|
44 |
case 'uc':
|
45 |
-
if ($
|
|
|
|
|
46 |
$this->unsubscribe($user, $email);
|
47 |
$url = $this->build_message_url(null, 'unsubscribed', $user, $email);
|
48 |
wp_redirect($url);
|
@@ -52,14 +55,6 @@ class NewsletterUnsubscription extends NewsletterModule {
|
|
52 |
die();
|
53 |
break;
|
54 |
|
55 |
-
case 'lu':
|
56 |
-
// List Unsubscribe - action from oneclick unsubscribe header
|
57 |
-
if ($this->one_click_list_unsubscribe_check()) {
|
58 |
-
$this->unsubscribe($user, $email);
|
59 |
-
}
|
60 |
-
die();
|
61 |
-
break;
|
62 |
-
|
63 |
case 'reactivate':
|
64 |
if ($this->antibot_form_check()) {
|
65 |
$this->reactivate($user);
|
@@ -80,7 +75,7 @@ class NewsletterUnsubscription extends NewsletterModule {
|
|
80 |
*/
|
81 |
function unsubscribe($user, $email = null) {
|
82 |
global $wpdb;
|
83 |
-
|
84 |
if ($user->status == TNP_User::STATUS_UNSUBSCRIBED) {
|
85 |
return $user;
|
86 |
}
|
@@ -92,7 +87,7 @@ class NewsletterUnsubscription extends NewsletterModule {
|
|
92 |
|
93 |
do_action('newsletter_user_unsubscribed', $user);
|
94 |
|
95 |
-
|
96 |
|
97 |
if ($email) {
|
98 |
$wpdb->update(NEWSLETTER_USERS_TABLE, array('unsub_email_id' => (int) $email->id, 'unsub_time' => time()), array('id' => $user->id));
|
@@ -214,23 +209,13 @@ class NewsletterUnsubscription extends NewsletterModule {
|
|
214 |
$list_unsubscribe_values[] = "<mailto:$unsubscribe_address?subject=unsubscribe>";
|
215 |
}
|
216 |
|
217 |
-
$unsubscribe_action_url = $this->build_action_url('
|
218 |
$list_unsubscribe_values[] = "<$unsubscribe_action_url>";
|
219 |
|
220 |
-
$headers['List-Unsubscribe-Post'] = 'List-Unsubscribe=One-Click';
|
221 |
$headers['List-Unsubscribe'] = implode(', ', $list_unsubscribe_values);
|
222 |
-
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* @return bool
|
227 |
-
*/
|
228 |
-
function one_click_list_unsubscribe_check() {
|
229 |
-
if (isset($_POST['List-Unsubscribe']) && 'One-Click' === $_POST['List-Unsubscribe'] || 'List-Unsubscribe=One-Click' === file_get_contents('php://input')) {
|
230 |
-
return true;
|
231 |
-
}
|
232 |
|
233 |
-
return
|
234 |
}
|
235 |
|
236 |
}
|
41 |
die();
|
42 |
break;
|
43 |
|
44 |
+
case 'lu': //Left for backwards compatibility, could be removed after some time
|
45 |
case 'uc':
|
46 |
+
if (isset($_POST['List-Unsubscribe']) && 'One-Click' === $_POST['List-Unsubscribe']) {
|
47 |
+
$this->unsubscribe($user, $email);
|
48 |
+
} else if ($this->antibot_form_check()) {
|
49 |
$this->unsubscribe($user, $email);
|
50 |
$url = $this->build_message_url(null, 'unsubscribed', $user, $email);
|
51 |
wp_redirect($url);
|
55 |
die();
|
56 |
break;
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
case 'reactivate':
|
59 |
if ($this->antibot_form_check()) {
|
60 |
$this->reactivate($user);
|
75 |
*/
|
76 |
function unsubscribe($user, $email = null) {
|
77 |
global $wpdb;
|
78 |
+
|
79 |
if ($user->status == TNP_User::STATUS_UNSUBSCRIBED) {
|
80 |
return $user;
|
81 |
}
|
87 |
|
88 |
do_action('newsletter_user_unsubscribed', $user);
|
89 |
|
90 |
+
|
91 |
|
92 |
if ($email) {
|
93 |
$wpdb->update(NEWSLETTER_USERS_TABLE, array('unsub_email_id' => (int) $email->id, 'unsub_time' => time()), array('id' => $user->id));
|
209 |
$list_unsubscribe_values[] = "<mailto:$unsubscribe_address?subject=unsubscribe>";
|
210 |
}
|
211 |
|
212 |
+
$unsubscribe_action_url = $this->build_action_url('uc', $user, $email);
|
213 |
$list_unsubscribe_values[] = "<$unsubscribe_action_url>";
|
214 |
|
|
|
215 |
$headers['List-Unsubscribe'] = implode(', ', $list_unsubscribe_values);
|
216 |
+
$headers['List-Unsubscribe-Post'] = 'List-Unsubscribe=One-Click';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
+
return $headers;
|
219 |
}
|
220 |
|
221 |
}
|