EZP Coming Soon Page - Version 1.0.5

Version Description

  • Made UI easier to use
Download this release

Release Info

Developer bobriley
Plugin Icon 128x128 EZP Coming Soon Page
Version 1.0.5
Comparing to
See all releases

Code changes from version 1.0.4 to 1.0.5

classes/Entities/admin/class-ezp-cs-display-entity.php CHANGED
@@ -23,6 +23,17 @@
23
 
24
  require_once(dirname(__FILE__) . '/../class-ezp-cs-json-entity-base.php');
25
 
 
 
 
 
 
 
 
 
 
 
 
26
  if (!class_exists('EZP_CS_Display_Entity')) {
27
 
28
  /**
@@ -71,6 +82,8 @@ if (!class_exists('EZP_CS_Display_Entity')) {
71
 
72
  public $css = "/* This code adds a shadow around the content box */\r\n#headline { font-weight: bold }\r\n#content-area { box-shadow: 1px 7px 36px -5px rgba(34,34,34,1);}";
73
 
 
 
74
  function __construct() {
75
 
76
  parent::__construct();
@@ -84,13 +97,27 @@ if (!class_exists('EZP_CS_Display_Entity')) {
84
  $this->verifiers['text_footer_font_size'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Footer font must end in a unit (px, em, etc...)"));
85
  $this->verifiers['email_button_font_size'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Email button font must end in a unit (px, em, etc...)"));
86
 
87
- // $this->verifiers['logo_width'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Logo width must end in px or %"));
88
- // $this->verifiers['logo_height'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Logo height font must end in px or %"));
89
  $this->verifiers['email_button_width'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Email button height font must end in px or %"));
90
  $this->verifiers['email_button_height'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Email button width must end in px or %"));
91
 
92
  $this->verifiers['content_box_opacity'] = new EZP_CS_Range_Verifier(0, 1, EZP_CS_Utility::__("Content box opacity must be between 0 and 1"));
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  public function create_with_defaults() {
96
 
23
 
24
  require_once(dirname(__FILE__) . '/../class-ezp-cs-json-entity-base.php');
25
 
26
+ if (!class_exists('EZP_CS_Display_Background_Type'))
27
+ {
28
+ abstract class EZP_CS_Display_Background_Type
29
+ {
30
+ const NotSet = 0;
31
+ const Color = 1;
32
+ const Image = 2;
33
+ const Video = 3;
34
+ }
35
+ }
36
+
37
  if (!class_exists('EZP_CS_Display_Entity')) {
38
 
39
  /**
82
 
83
  public $css = "/* This code adds a shadow around the content box */\r\n#headline { font-weight: bold }\r\n#content-area { box-shadow: 1px 7px 36px -5px rgba(34,34,34,1);}";
84
 
85
+ public $background_type = EZP_CS_Display_Background_Type::NotSet;
86
+
87
  function __construct() {
88
 
89
  parent::__construct();
97
  $this->verifiers['text_footer_font_size'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Footer font must end in a unit (px, em, etc...)"));
98
  $this->verifiers['email_button_font_size'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Email button font must end in a unit (px, em, etc...)"));
99
 
 
 
100
  $this->verifiers['email_button_width'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Email button height font must end in px or %"));
101
  $this->verifiers['email_button_height'] = new EZP_CS_Regex_Verifier($font_size_regex, EZP_CS_Utility::__("Email button width must end in px or %"));
102
 
103
  $this->verifiers['content_box_opacity'] = new EZP_CS_Range_Verifier(0, 1, EZP_CS_Utility::__("Content box opacity must be between 0 and 1"));
104
+ }
105
+
106
+ public function set_background_type()
107
+ {
108
+ if(trim($this->youtube_video_id) != false)
109
+ {
110
+ $this->background_type = EZP_CS_Display_Background_Type::Video;
111
+ }
112
+ else if(trim($this->background_image_url) != false)
113
+ {
114
+ $this->background_type = EZP_CS_Display_Background_Type::Image;
115
+ }
116
+ else
117
+ {
118
+ $this->background_type = EZP_CS_Display_Background_Type::Color;
119
+ }
120
+ }
121
 
122
  public function create_with_defaults() {
123
 
classes/Entities/class-ezp-cs-json-entity-base.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /*
4
  Easy Pie Coming Soon Plugin
5
  Copyright (C) 2016, Snap Creek LLC
@@ -21,270 +20,309 @@
21
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
  */
23
 
24
- require_once(dirname(__FILE__) . '/../class-ezp-cs-verifiers.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- if (!class_exists('EZP_CS_JSON_Entity_Base')) {
27
-
28
- /**
29
- * Base class for entities that store their data in JSON format
30
- *
31
- * @author Snap Creek LLC <support@snapcreek.com>
32
- * @copyright 2016 Snap Creek LLC
33
- */
34
- class EZP_CS_JSON_Entity_Base {
35
-
36
- public $id;
37
- public $type;
38
- private $dirty;
39
- private $table_name;
40
- protected $verifiers;
41
-
42
- const DEFAULT_TABLE_NAME = "easy_pie_cs_entities";
43
-
44
- function __construct($table_name = self::DEFAULT_TABLE_NAME) {
45
 
46
- global $wpdb;
 
47
 
48
- $this->id = -1;
49
- //$this->type = $type;
50
- $this->type = get_class($this);
51
- $this->dirty = false;
52
- $this->verifiers = array();
53
 
54
- $this->table_name = $wpdb->prefix . $table_name;
55
- }
56
-
57
- public static function init_table($table_name = self::DEFAULT_TABLE_NAME) {
58
-
59
- global $wpdb;
60
-
61
- $table_name = $wpdb->prefix . $table_name;
62
-
63
- $query_string = "CREATE TABLE IF NOT EXISTS " . $table_name . "(";
64
- $query_string .= "id INT NOT NULL AUTO_INCREMENT,";
65
- $query_string .= "type varchar(255), ";
66
- $query_string .= "data TEXT, ";
67
- $query_string .= "PRIMARY KEY (id));";
68
-
69
- //$wpdb->query($query_string);
70
- dbDelta($query_string);
71
- }
72
-
73
- public function insert() {
74
- global $wpdb;
75
-
76
- $query_string = "INSERT INTO " . $this->table_name;
77
- $query_string .= " (type, data) VALUES (%s, %s);";
78
-
79
- $data = EZP_CS_Utility::get_public_properties($this);
80
-
81
- $serialized_data = json_encode($data);
82
-
83
- if(strlen($serialized_data) < 65536) {
84
-
85
- $prepared_query = $wpdb->prepare($query_string, $this->type, $serialized_data);
86
-
87
- $wpdb->query($prepared_query);
88
-
89
- $this->id = $wpdb->insert_id;
90
-
91
- if($this->id == false) {
92
-
93
- $this->id = -1;
94
-
95
- EZP_CS_Utility::debug("Error inserting. Query: " . $prepared_query);
96
-
97
- return false;
98
- }
99
- } else {
100
-
101
- EZP_CS_Utility::debug("Entity trying to be inserted exceeds max size of 65K!");
102
- return false;
103
- }
104
-
105
- return true;
106
- }
107
-
108
- public function update() {
109
- global $wpdb;
110
-
111
- $query_string = "UPDATE " . $this->table_name;
112
- $query_string .= " SET type = %s, data = %s WHERE id = %d;";
113
-
114
- $data = EZP_CS_Utility::get_public_properties($this);
115
-
116
- $serialized_data = json_encode($data);
117
-
118
- if(strlen($serialized_data) < 65536) {
119
- $prepared_query = $wpdb->prepare($query_string, $this->type, $serialized_data, $this->id);
120
- $wpdb->query($prepared_query);
121
- $this->dirty = false;
122
-
123
- return true;
124
- } else {
125
-
126
- EZP_CS_Utility::debug("Entity trying to be updated exceeds max size of 65K!");
127
- return false;
128
- }
129
- }
130
-
131
- public function delete() {
132
- global $wpdb;
133
-
134
- $query_string = "DELETE FROM " . $this->table_name;
135
- $query_string .= " WHERE id = %d;";
136
-
137
- $prepared_query = $wpdb->prepare($query_string, $this->id);
138
-
139
- $wpdb->query($prepared_query);
140
-
141
- $this->id = -1;
142
- $this->dirty = false;
143
- }
144
-
145
- public static function get_by_id_and_type($id, $type, $table_name = self::DEFAULT_TABLE_NAME) {
146
- global $wpdb;
147
-
148
- $table_name = $wpdb->prefix . $table_name;
149
-
150
- $query_string = "SELECT * FROM " . $table_name;
151
- $query_string .= " WHERE id = %d;";
152
 
153
- $prepped = $wpdb->prepare($query_string, $id);
154
-
155
- $row = $wpdb->get_row($prepped);
 
156
 
157
- if($row != NULL)
158
- {
159
- $instance = new $type();
160
-
161
- $instance->id = $row->id;
162
- $instance->type = $row->type;
163
- $instance->table_name = $table_name;
164
-
165
- $data = json_decode($row->data);
166
-
167
- foreach ($data as $property_name => $property_value) {
168
- $instance->$property_name = $property_value;
169
- }
170
-
171
- return $instance;
172
- }
173
- else {
174
- EZP_CS_Utility::debug('get_by_id_and_type: row is null');
175
- return null;
176
- }
177
- }
178
-
179
- public static function get_by_type($type, $table_name = self::DEFAULT_TABLE_NAME, $page = 0) {
180
-
181
- global $wpdb;
182
-
183
- $table_name = $wpdb->prefix . $table_name;
184
-
185
- $query_string = "SELECT * FROM " . $table_name;
186
- $query_string .= " WHERE type = %s";
187
-
188
- if($page > 0) {
189
-
190
- $records_per_page = 50;
191
-
192
- $offset = ($page - 1) * $records_per_page;
193
-
194
- $query_string .= " LIMIT $offset, $records_per_page";
195
- }
196
-
197
- $query_string .= ';';
198
-
199
- $prepared = $wpdb->prepare($query_string, $type);
200
-
201
- $rows = $wpdb->get_results($prepared);
202
-
203
- $instances = array();
204
- foreach ($rows as $row) {
205
-
206
- $instance = new $type();
207
- $instance->id = $row->id;
208
- $instance->type = $row->type;
209
- $instance->table_name = $table_name;
210
-
211
- $data = json_decode($row->data);
212
-
213
- foreach ($data as $property_name => $property_value) {
214
- $instance->$property_name = $property_value;
215
- }
216
- array_push($instances, $instance);
217
- }
218
-
219
- return $instances;
220
- }
221
-
222
- public function save() {
223
-
224
- $saved = false;
225
-
226
- if ($this->id == -1) {
227
-
228
- $saved = $this->insert();
229
- } else //screw the dirty part - too problematic if we update member directlyif ($this->dirty) {
230
- {
231
- $saved = $this->update();
232
- $this->dirty = false;
233
- }
234
-
235
- return $saved;
236
- }
237
-
238
- public function set_post_variables($post) {
239
-
240
- $error_string = "";
241
-
242
- // First do a verifier scrub and only then let it fall through to set
243
- foreach ($post as $key => $value) {
244
-
245
- $value = stripslashes($value);
246
-
247
- if (array_key_exists($key, $this->verifiers)) {
248
-
249
- $local_error = $this->verifiers[$key]->verify($value);
250
-
251
- if ($local_error != "") {
252
-
253
- $error_string .= $local_error . ".<br/>";
254
- }
255
-
256
- $this->set($key, $value);
257
- } else {
258
- $this->set($key, $value);
259
- }
260
- }
261
-
262
- return $error_string;
263
- }
264
 
265
- public function set($property_name, $property_value) {
266
-
267
- if(property_exists($this->type, $property_name)) {
268
-
269
- $this->$property_name = $property_value;
270
- $this->dirty = true;
271
- }
272
- }
273
 
274
- public function get($property_name) {
 
 
 
 
275
 
276
- //if (array_key_exists($key, $this->data_array)) {
277
- if (property_exists($this->type, $property_name)) {
 
278
 
279
- return $this->$property_name;
280
- //return $this->data_array[$key];
281
- } else {
282
 
283
- return null;
284
- }
285
- }
286
- }
287
-
288
- // EZP_CS_JSON_Entity_Base::init();
289
  }
290
  ?>
1
  <?php
 
2
  /*
3
  Easy Pie Coming Soon Plugin
4
  Copyright (C) 2016, Snap Creek LLC
20
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
  */
22
 
23
+ require_once(dirname(__FILE__) . '/../class-ezp-cs-verifiers.php');
24
+
25
+ if (!class_exists('EZP_CS_JSON_Entity_Base'))
26
+ {
27
+
28
+ /**
29
+ * Base class for entities that store their data in JSON format
30
+ *
31
+ * @author Snap Creek LLC <support@snapcreek.com>
32
+ * @copyright 2016 Snap Creek LLC
33
+ */
34
+ class EZP_CS_JSON_Entity_Base
35
+ {
36
+ public $id;
37
+ public $type;
38
+ private $dirty;
39
+ private $table_name;
40
+ protected $verifiers;
41
+
42
+ const DEFAULT_TABLE_NAME = "easy_pie_cs_entities";
43
+
44
+ function __construct($table_name = self::DEFAULT_TABLE_NAME)
45
+ {
46
+
47
+ global $wpdb;
48
+
49
+ $this->id = -1;
50
+ //$this->type = $type;
51
+ $this->type = get_class($this);
52
+ $this->dirty = false;
53
+ $this->verifiers = array();
54
+
55
+ $this->table_name = $wpdb->prefix . $table_name;
56
+ }
57
+
58
+ public static function init_table($table_name = self::DEFAULT_TABLE_NAME)
59
+ {
60
+
61
+ global $wpdb;
62
+
63
+ $table_name = $wpdb->prefix . $table_name;
64
+
65
+ $query_string = "CREATE TABLE IF NOT EXISTS " . $table_name . "(";
66
+ $query_string .= "id INT NOT NULL AUTO_INCREMENT,";
67
+ $query_string .= "type varchar(255), ";
68
+ $query_string .= "data TEXT, ";
69
+ $query_string .= "PRIMARY KEY (id));";
70
+
71
+ //$wpdb->query($query_string);
72
+ dbDelta($query_string);
73
+ }
74
+
75
+ public function insert()
76
+ {
77
+ global $wpdb;
78
+
79
+ $query_string = "INSERT INTO " . $this->table_name;
80
+ $query_string .= " (type, data) VALUES (%s, %s);";
81
+
82
+ $data = EZP_CS_Utility::get_public_properties($this);
83
+
84
+ $serialized_data = json_encode($data);
85
+
86
+ if (strlen($serialized_data) < 65536)
87
+ {
88
+
89
+ $prepared_query = $wpdb->prepare($query_string, $this->type, $serialized_data);
90
+
91
+ $wpdb->query($prepared_query);
92
+
93
+ $this->id = $wpdb->insert_id;
94
+
95
+ if ($this->id == false)
96
+ {
97
+
98
+ $this->id = -1;
99
+
100
+ EZP_CS_Utility::debug("Error inserting. Query: " . $prepared_query);
101
+
102
+ return false;
103
+ }
104
+ }
105
+ else
106
+ {
107
+
108
+ EZP_CS_Utility::debug("Entity trying to be inserted exceeds max size of 65K!");
109
+ return false;
110
+ }
111
+
112
+ return true;
113
+ }
114
+
115
+ public function update()
116
+ {
117
+ global $wpdb;
118
+
119
+ $query_string = "UPDATE " . $this->table_name;
120
+ $query_string .= " SET type = %s, data = %s WHERE id = %d;";
121
+
122
+ $data = EZP_CS_Utility::get_public_properties($this);
123
+
124
+ $serialized_data = json_encode($data);
125
+
126
+ if (strlen($serialized_data) < 65536)
127
+ {
128
+ $prepared_query = $wpdb->prepare($query_string, $this->type, $serialized_data, $this->id);
129
+ $wpdb->query($prepared_query);
130
+ $this->dirty = false;
131
+
132
+ return true;
133
+ }
134
+ else
135
+ {
136
+
137
+ EZP_CS_Utility::debug("Entity trying to be updated exceeds max size of 65K!");
138
+ return false;
139
+ }
140
+ }
141
+
142
+ public function delete()
143
+ {
144
+ global $wpdb;
145
+
146
+ $query_string = "DELETE FROM " . $this->table_name;
147
+ $query_string .= " WHERE id = %d;";
148
+
149
+ $prepared_query = $wpdb->prepare($query_string, $this->id);
150
+
151
+ $wpdb->query($prepared_query);
152
+
153
+ $this->id = -1;
154
+ $this->dirty = false;
155
+ }
156
+
157
+ public static function get_by_id_and_type($id, $type, $table_name = self::DEFAULT_TABLE_NAME)
158
+ {
159
+ global $wpdb;
160
+
161
+ $table_name = $wpdb->prefix . $table_name;
162
+
163
+ $query_string = "SELECT * FROM " . $table_name;
164
+ $query_string .= " WHERE id = %d;";
165
+
166
+ $prepped = $wpdb->prepare($query_string, $id);
167
+
168
+ $row = $wpdb->get_row($prepped);
169
+
170
+ if ($row != NULL)
171
+ {
172
+ $instance = new $type();
173
+
174
+ $instance->id = $row->id;
175
+ $instance->type = $row->type;
176
+ $instance->table_name = $table_name;
177
+
178
+ $data = json_decode($row->data);
179
+
180
+ foreach ($data as $property_name => $property_value)
181
+ {
182
+ $instance->$property_name = $property_value;
183
+ }
184
+
185
+ return $instance;
186
+ }
187
+ else
188
+ {
189
+ EZP_CS_Utility::debug('get_by_id_and_type: row is null');
190
+ return null;
191
+ }
192
+ }
193
+
194
+ public static function get_by_type($type, $table_name = self::DEFAULT_TABLE_NAME, $page = 0)
195
+ {
196
+
197
+ global $wpdb;
198
+
199
+ $table_name = $wpdb->prefix . $table_name;
200
+
201
+ $query_string = "SELECT * FROM " . $table_name;
202
+ $query_string .= " WHERE type = %s";
203
+
204
+ if ($page > 0)
205
+ {
206
+
207
+ $records_per_page = 50;
208
+
209
+ $offset = ($page - 1) * $records_per_page;
210
+
211
+ $query_string .= " LIMIT $offset, $records_per_page";
212
+ }
213
+
214
+ $query_string .= ';';
215
+
216
+ $prepared = $wpdb->prepare($query_string, $type);
217
+
218
+ $rows = $wpdb->get_results($prepared);
219
+
220
+ $instances = array();
221
+ foreach ($rows as $row)
222
+ {
223
+
224
+ $instance = new $type();
225
+ $instance->id = $row->id;
226
+ $instance->type = $row->type;
227
+ $instance->table_name = $table_name;
228
+
229
+ $data = json_decode($row->data);
230
+
231
+ foreach ($data as $property_name => $property_value)
232
+ {
233
+ $instance->$property_name = $property_value;
234
+ }
235
+ array_push($instances, $instance);
236
+ }
237
+
238
+ return $instances;
239
+ }
240
+
241
+ public function save()
242
+ {
243
+
244
+ $saved = false;
245
+
246
+ if ($this->id == -1)
247
+ {
248
+
249
+ $saved = $this->insert();
250
+ }
251
+ else //screw the dirty part - too problematic if we update member directlyif ($this->dirty) {
252
+ {
253
+ $saved = $this->update();
254
+ $this->dirty = false;
255
+ }
256
+
257
+ return $saved;
258
+ }
259
+
260
+ public function set_post_variables($post)
261
+ {
262
+
263
+ $error_string = "";
264
+
265
+ // First do a verifier scrub and only then let it fall through to set
266
+ foreach ($post as $key => $value)
267
+ {
268
+
269
+ $value = stripslashes($value);
270
+
271
+ if (array_key_exists($key, $this->verifiers))
272
+ {
273
+
274
+ $local_error = $this->verifiers[$key]->verify($value);
275
+
276
+ if ($local_error != "")
277
+ {
278
+
279
+ $error_string .= $local_error . ".<br/>";
280
+ }
281
 
282
+ $this->set($key, $value);
283
+ }
284
+ else
285
+ {
286
+ if (property_exists(get_class($this), $key))
287
+ {
288
+ $this->set($key, $value);
289
+ }
290
+ }
291
+ }
 
 
 
 
 
 
 
 
 
292
 
293
+ return $error_string;
294
+ }
295
 
296
+ public function set($property_name, $property_value)
297
+ {
 
 
 
298
 
299
+ if (property_exists($this->type, $property_name))
300
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
+ $this->$property_name = $property_value;
303
+ $this->dirty = true;
304
+ }
305
+ }
306
 
307
+ public function get($property_name)
308
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
 
310
+ //if (array_key_exists($key, $this->data_array)) {
311
+ if (property_exists($this->type, $property_name))
312
+ {
 
 
 
 
 
313
 
314
+ return $this->$property_name;
315
+ //return $this->data_array[$key];
316
+ }
317
+ else
318
+ {
319
 
320
+ return null;
321
+ }
322
+ }
323
 
324
+ }
 
 
325
 
326
+ // EZP_CS_JSON_Entity_Base::init();
 
 
 
 
 
327
  }
328
  ?>
classes/Utilities/class-ezp-cs-utility.php CHANGED
@@ -320,6 +320,39 @@ if (!class_exists('EZP_CS_Utility')) {
320
  echo "<a href='https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/' target='_blank'>$faq_text</a> | ";
321
  echo "<a href='https://snapcreek.com/support/' target='_blank'>$contact_text</a>";
322
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  }
324
 
325
  EZP_CS_Utility::init();
320
  echo "<a href='https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/' target='_blank'>$faq_text</a> | ";
321
  echo "<a href='https://snapcreek.com/support/' target='_blank'>$contact_text</a>";
322
  }
323
+
324
+
325
+ public static function echo_checked($val)
326
+ {
327
+ echo $val ? 'checked' : '';
328
+ }
329
+
330
+ public static function echo_disabled($val)
331
+ {
332
+ echo $val ? 'disabled' : '';
333
+ }
334
+
335
+ public static function echo_selected($val)
336
+ {
337
+ echo $val ? 'selected' : '';
338
+ }
339
+
340
+ public static function echo_display($val, $true_display, $false_display)
341
+ {
342
+ $display_val;
343
+
344
+ if($val)
345
+ {
346
+ $display_val = $true_display;
347
+ }
348
+ else
349
+ {
350
+ $display_val = $false_display;
351
+ }
352
+
353
+ echo "display: $display_val";
354
+ }
355
+
356
  }
357
 
358
  EZP_CS_Utility::init();
classes/class-ezp-cs-constants.php CHANGED
@@ -32,7 +32,7 @@ if (!class_exists('EZP_CS_Constants')) {
32
  const COMPOUND_OPTION_NAME = 'easy-pie-cs-options';
33
  const MAIN_PAGE_KEY = 'easy-pie-cs-main-page';
34
  const PLUGIN_SLUG = 'easy-pie-coming-soon';
35
- const PLUGIN_VERSION = "1.0.4"; // RSR Version
36
 
37
 
38
 
32
  const COMPOUND_OPTION_NAME = 'easy-pie-cs-options';
33
  const MAIN_PAGE_KEY = 'easy-pie-cs-main-page';
34
  const PLUGIN_SLUG = 'easy-pie-coming-soon';
35
+ const PLUGIN_VERSION = "1.0.5"; // RSR Version
36
 
37
 
38
 
classes/class-ezp-cs.php CHANGED
@@ -560,7 +560,17 @@ if (!class_exists('EZP_CS'))
560
 
561
  function upgrade_processing()
562
  {
563
- // RSR TODO: In future versions compare where we are at with what's in the system and take action
 
 
 
 
 
 
 
 
 
 
564
  }
565
 
566
  // </editor-fold>
560
 
561
  function upgrade_processing()
562
  {
563
+ $global = EZP_CS_Global_Entity::get_instance();
564
+ $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
565
+ $set_index = $global->active_set_index;
566
+ $set = EZP_CS_Set_Entity::get_by_id($set_index);
567
+ $display = EZP_CS_Display_Entity::get_by_id($set->display_index);
568
+
569
+ if($display->background_type == EZP_CS_Display_Background_Type::NotSet)
570
+ {
571
+ $display->set_background_type();
572
+ $display->save();
573
+ }
574
  }
575
 
576
  // </editor-fold>
easy-pie-coming-soon.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: EZP Coming Soon Page
4
  Plugin URI: https://snapcreek.com/easy-pie-coming-soon-faq/
5
  Description: Let people know that your site is 'coming soon'. Visitors can submit their email addresses for future notification.
6
- Version: 1.0.4
7
  Author: Snap Creek Software
8
  Author URI: https://snapcreek.com/ezp-coming-soon/
9
  Text Domain: easy-pie-coming-soon
3
  Plugin Name: EZP Coming Soon Page
4
  Plugin URI: https://snapcreek.com/easy-pie-coming-soon-faq/
5
  Description: Let people know that your site is 'coming soon'. Visitors can submit their email addresses for future notification.
6
+ Version: 1.0.5
7
  Author: Snap Creek Software
8
  Author URI: https://snapcreek.com/ezp-coming-soon/
9
  Text Domain: easy-pie-coming-soon
js/page-options-content-tab.js CHANGED
@@ -4,39 +4,40 @@
4
 
5
  jQuery(document).ready(function($) {
6
 
7
- var logo_uploader;
8
-
9
-
10
- //$('#ezp-countdown-due-date').datepicker({ dateFormat: ezp_cs_datepicker_date_format } );
11
- $('#ezp-countdown-due-date').datetimepicker({ dateFormat: ezp_cs_datepicker_date_format} );
12
- $('#easy-pie-cs-logo-button').click(function(e) {
13
-
14
- e.preventDefault();
15
-
16
- //If the uploader object has already been created, reopen the dialog
17
- if (logo_uploader) {
18
- logo_uploader.open();
19
- return;
20
- }
21
-
22
- //Extend the wp.media object
23
- logo_uploader = wp.media.frames.file_frame = wp.media({
24
- title: 'Choose Image',
25
- button: {
26
- text: 'Choose Image'
27
- },
28
- multiple: false
29
- });
30
-
31
- //When a file is selected, grab the URL and set it as the text field's value
32
- logo_uploader.on('select', function() {
33
- attachment = logo_uploader.state().get('selection').first().toJSON();
34
- $('#easy-pie-cs-logo-url').val(attachment.url);
35
- $('#easy-pie-cs-logo-preview').css("display", "block");
36
- $('#easy-pie-cs-logo-preview').attr("src", attachment.url);
37
- });
38
-
39
- //Open the uploader dialog
40
- logo_uploader.open();
41
- });
42
- })
 
4
 
5
  jQuery(document).ready(function($) {
6
 
7
+ $('#ezp-countdown-due-date').datetimepicker({ dateFormat: ezp_cs_datepicker_date_format} );
8
+
9
+ // var logo_uploader;
10
+ //
11
+ //
12
+ // //$('#ezp-countdown-due-date').datepicker({ dateFormat: ezp_cs_datepicker_date_format } );
13
+
14
+ // $('#easy-pie-cs-logo-button').click(function(e) {
15
+ //
16
+ // e.preventDefault();
17
+ //
18
+ // //If the uploader object has already been created, reopen the dialog
19
+ // if (logo_uploader) {
20
+ // logo_uploader.open();
21
+ // return;
22
+ // }
23
+ //
24
+ // //Extend the wp.media object
25
+ // logo_uploader = wp.media.frames.file_frame = wp.media({
26
+ // title: 'Choose Image',
27
+ // button: {
28
+ // text: 'Choose Image'
29
+ // },
30
+ // multiple: false
31
+ // });
32
+ //
33
+ // //When a file is selected, grab the URL and set it as the text field's value
34
+ // logo_uploader.on('select', function() {
35
+ // attachment = logo_uploader.state().get('selection').first().toJSON();
36
+ // $('#easy-pie-cs-logo-url').val(attachment.url);
37
+ // $('#easy-pie-cs-logo-preview').css("display", "block");
38
+ // $('#easy-pie-cs-logo-preview').attr("src", attachment.url);
39
+ // });
40
+ //
41
+ // //Open the uploader dialog
42
+ // logo_uploader.open();
43
+ });
js/page-options-display-tab.js CHANGED
@@ -19,11 +19,6 @@
19
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20
  */
21
 
22
- easyPie = {};
23
- easyPie.CS = {};
24
-
25
-
26
-
27
  easyPie.CS.toggleAdvancedBox = function() {
28
 
29
  jQuery('#easy-pie-cs-advanced').toggle();
@@ -208,6 +203,42 @@ jQuery(document).ready(function($) {
208
  div.children(":first").val(values.join());
209
  });
210
  })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
  // New Media uploader logic
213
  var custom_uploader;
19
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20
  */
21
 
 
 
 
 
 
22
  easyPie.CS.toggleAdvancedBox = function() {
23
 
24
  jQuery('#easy-pie-cs-advanced').toggle();
203
  div.children(":first").val(values.join());
204
  });
205
  })(jQuery);
206
+
207
+ var logo_uploader;
208
+
209
+
210
+ //$('#ezp-countdown-due-date').datepicker({ dateFormat: ezp_cs_datepicker_date_format } );
211
+
212
+ $('#easy-pie-cs-logo-button').click(function(e) {
213
+
214
+ e.preventDefault();
215
+
216
+ //If the uploader object has already been created, reopen the dialog
217
+ if (logo_uploader) {
218
+ logo_uploader.open();
219
+ return;
220
+ }
221
+
222
+ //Extend the wp.media object
223
+ logo_uploader = wp.media.frames.file_frame = wp.media({
224
+ title: 'Choose Image',
225
+ button: {
226
+ text: 'Choose Image'
227
+ },
228
+ multiple: false
229
+ });
230
+
231
+ //When a file is selected, grab the URL and set it as the text field's value
232
+ logo_uploader.on('select', function() {
233
+ attachment = logo_uploader.state().get('selection').first().toJSON();
234
+ $('#easy-pie-cs-logo-url').val(attachment.url);
235
+ $('#easy-pie-cs-logo-preview').css("display", "block");
236
+ $('#easy-pie-cs-logo-preview').attr("src", attachment.url);
237
+ });
238
+
239
+ //Open the uploader dialog
240
+ logo_uploader.open();
241
+ });
242
 
243
  // New Media uploader logic
244
  var custom_uploader;
js/page-options-preview-tab.js CHANGED
@@ -18,6 +18,3 @@
18
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20
  */
21
-
22
- easyPie = {};
23
- easyPie.CS = {};
18
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20
  */
 
 
 
mini-themes/base-responsive/index.php CHANGED
@@ -73,29 +73,51 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
73
 
74
  <style type="text/css">
75
  <?php
76
- list($bgr, $bgg, $bgb) = sscanf($display->content_box_color, "#%02x%02x%02x");
77
-
78
- $background_color = "background-color: $display->background_color;";
79
-
80
- if (trim($display->background_image_url) != '') {
81
-
82
- $background_color = "";
 
 
 
 
 
 
 
 
83
  }
84
 
85
- if ($display->background_tiling_enabled == 'true') {
86
-
87
- $background_size_styles = "body { background-image: url('$display->background_image_url'); $background_color }";
88
- } else {
89
-
90
- $background_size_styles = "{ margin: 0; padding: 0; }
91
- body {
92
- background: url('$display->background_image_url') no-repeat center center fixed;
93
- $background_color
94
- -webkit-background-size: cover;
95
- -moz-background-size: cover;
96
- -o-background-size: cover;
97
- background-size: cover;
98
- }";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  }
100
 
101
  $email_display = EZP_CS_Render_Utility::get_display($config->collect_email, "block");
@@ -132,7 +154,7 @@ if(trim($content->countdown_due_date) == "") {
132
  echo "
133
 
134
  $background_size_styles
135
- #content-area { background:rgba($bgr, $bgg, $bgb, $display->content_box_opacity); }
136
  #headline, #thank-you-headline { {$display->get_font_styling('text_headline')} }
137
  #description, #thank-you-text { {$display->get_font_styling('text_description')} }
138
  #disclaimer { {$display->get_font_styling('text_disclaimer')} }
73
 
74
  <style type="text/css">
75
  <?php
76
+ list($content_box_red, $content_box_green, $content_box_blue) = sscanf($display->content_box_color, "#%02x%02x%02x");
77
+
78
+ switch($display->background_type)
79
+ {
80
+ case EZP_CS_Display_Background_Type::Color:
81
+ $background_color = "background-color: $display->background_color;";
82
+ break;
83
+
84
+ case EZP_CS_Display_Background_Type::Image:
85
+ $background_color = "";
86
+ break;
87
+
88
+ case EZP_CS_Display_Background_Type::Video:
89
+ $background_color = "";
90
+ break;
91
  }
92
 
93
+ if($display->background_type == EZP_CS_Display_Background_Type::Image)
94
+ {
95
+ if ($display->background_tiling_enabled == 'true') {
96
+
97
+ $background_size_styles = "body { background-image: url('$display->background_image_url'); $background_color }";
98
+ } else {
99
+
100
+ $background_size_styles = "{ margin: 0; padding: 0; }
101
+ body {
102
+ background: url('$display->background_image_url') no-repeat center center fixed;
103
+ $background_color
104
+ -webkit-background-size: cover;
105
+ -moz-background-size: cover;
106
+ -o-background-size: cover;
107
+ background-size: cover;
108
+ }";
109
+ }
110
+ }
111
+ else
112
+ {
113
+ $background_size_styles = "{ margin: 0; padding: 0; }
114
+ body {
115
+ $background_color
116
+ -webkit-background-size: cover;
117
+ -moz-background-size: cover;
118
+ -o-background-size: cover;
119
+ background-size: cover;
120
+ }";
121
  }
122
 
123
  $email_display = EZP_CS_Render_Utility::get_display($config->collect_email, "block");
154
  echo "
155
 
156
  $background_size_styles
157
+ #content-area { background:rgba($content_box_red, $content_box_green, $content_box_blue, $display->content_box_opacity); }
158
  #headline, #thank-you-headline { {$display->get_font_styling('text_headline')} }
159
  #description, #thank-you-text { {$display->get_font_styling('text_description')} }
160
  #disclaimer { {$display->get_font_styling('text_disclaimer')} }
pages/page-options-content-tab.php CHANGED
@@ -1,52 +1,23 @@
1
  <?php
2
- /*
3
- Easy Pie Coming Soon Plugin
4
- Copyright (C) 2016, Snap Creek LLC
5
- website: snapcreek.com contact: support@snapcreek.com
6
 
7
- Easy Pie Coming Soon Plugin is distributed under the GNU General Public License, Version 3,
8
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
9
- St, Fifth Floor, Boston, MA 02110, USA
10
-
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
15
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
- */
22
 
23
  //- Settings Logic -
24
  $action_updated = null;
25
-
26
  $global = EZP_CS_Global_Entity::get_instance();
27
-
28
  $set_index = $global->active_set_index;
29
-
30
  $set = EZP_CS_Set_Entity::get_by_id($set_index);
31
-
32
  $content = EZP_CS_Content_Entity::get_by_id($set->content_index);
33
-
34
  $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
35
-
36
  $error_string = "";
37
 
38
  if (isset($_POST['action']) && $_POST['action'] == 'save')
39
  {
40
-
41
  check_admin_referer('easy-pie-coming-soon-save-content');
42
-
43
  // Artificially set the bools since they aren't part of the postback
44
  // TODO
45
  $error_string = $content->set_post_variables($_POST);
46
-
47
  if ($error_string == "")
48
  {
49
-
50
  $action_updated = $content->save();
51
  }
52
  }
@@ -58,191 +29,139 @@ if (isset($_POST['action']) && $_POST['action'] == 'save')
58
  <?php wp_nonce_field('easy-pie-coming-soon-save-content'); ?>
59
  <input type="hidden" name="action" value="save"/>
60
 
61
- <?php
62
- //EZP_CS_Utility::display_admin_notice($config->coming_soon_mode_on);
63
-
64
- if ($error_string != "") :
65
- ?>
66
  <div id="message" class="error below-h2"><p><?php echo EZP_CS_Utility::__('Errors present:') . "<br/> $error_string" ?></p></div>
67
  <?php endif; ?>
68
 
69
  <?php if ($action_updated) : ?>
70
- <div id="message" class="updated below-h2"><p><span><?php echo EZP_CS_Utility::__('Settings Saved.'); ?></span><strong style="margin-left:7px;"><?php echo ' ' . EZP_CS_Utility::__('If you have a caching plugin be sure to clear it.'); ?></strong></p></div>
 
 
71
  <?php endif; ?>
72
 
73
- <div class="postbox" style="margin-top:12px;" >
74
- <div class="inside" >
75
- <h3 ><?php EZP_CS_Utility::_e("Logo") ?></h3>
76
- <table class="form-table">
77
- <tr>
78
- <th scope="row">
79
- <?php echo EZP_CS_Utility::_e("Image") ?>
80
- </th>
81
- <td>
82
- <div class="compound-setting">
83
- <input id="easy-pie-cs-logo-url" name="logo_url" value="<?php echo $content->logo_url; ?>" />
84
- <button id="easy-pie-cs-logo-button"><?php EZP_CS_Utility::_e("Upload"); ?></button>
85
- <img id="easy-pie-cs-logo-preview" style="display: <?php echo $content->logo_url == '' ? 'none' : 'block' ?> ;width:80px;height:80px;margin-top:8px;" src="<?php echo $content->logo_url; ?>" />
86
- </div>
87
- </td>
88
- </tr>
89
- </table>
90
- </div></div>
91
 
92
- <div class="postbox" >
93
- <div class="inside" >
94
- <h3 ><?php EZP_CS_Utility::_e("Title") ?></h3>
 
 
95
  <table class="form-table">
96
  <tr>
97
- <th scope="row">
98
- <?php echo EZP_CS_Utility::_e("Title") ?>
99
- </th>
100
  <td>
101
- <div class="compound-setting">
102
- <input class="long-input" name="title" type="text" value="<?php EZP_CS_Utility::_he($content->title); ?>" />
103
- </div>
104
  </td>
105
  </tr>
106
  </table>
107
  </div>
108
  </div>
109
 
110
- <div class="postbox" >
111
- <div class="inside" >
112
- <h3 ><?php EZP_CS_Utility::_e("Main Text") ?></h3>
113
- <table class="form-table">
114
- <tr>
115
- <th scope="row">
116
- <?php echo EZP_CS_Utility::_e("Headline") ?>
117
- </th>
118
- <td>
119
- <div class="compound-setting">
120
- <input class="long-input" name="headline" type="text" value="<?php EZP_CS_Utility::_he($content->headline); ?>" />
121
- </div>
122
- </td>
123
- </tr>
124
- <tr>
125
- <th scope="row">
126
- <?php echo EZP_CS_Utility::_e("Description") ?>
127
- </th>
128
- <td>
129
- <div class="compound-setting">
130
- <textarea rows="5" cols="67" name="description" type="text" ><?php EZP_CS_Utility::_he($content->description); ?></textarea>
131
- </div>
132
- </td>
133
- </tr>
134
- <tr>
135
- <th scope="row">
136
- <?php echo EZP_CS_Utility::_e("Disclaimer") ?>
137
- </th>
138
- <td>
139
- <div class="compound-setting">
140
- <input class="long-input" name="disclaimer" type="text" value="<?php EZP_CS_Utility::_he($content->disclaimer); ?>" />
141
- </div>
142
- </td>
143
- </tr>
144
- <tr>
145
- <th scope="row">
146
- <?php echo EZP_CS_Utility::_e("Footer") ?>
147
- </th>
148
- <td>
149
- <div class="compound-setting">
150
- <input class="long-input" name="footer" type="text" value="<?php EZP_CS_Utility::_he($content->footer); ?>" />
151
- </div>
152
- </td>
153
- </tr>
154
- </table>
155
- </div></div>
156
-
157
- <div class="postbox" >
158
- <div class="inside" >
159
- <h3><?php EZP_CS_Utility::_e("Email Text") ?></h3>
160
 
161
- <table class="form-table">
162
- <tr>
163
- <th scope="row">
164
- <?php echo EZP_CS_Utility::_e("Email Placeholder") ?>
165
- </th>
166
- <td>
167
- <div class="compound-setting">
168
- <input class="long-input" name="email_placeholder_text" type="text" value="<?php EZP_CS_Utility::_he($content->email_placeholder_text); ?>" />
169
- </div>
170
- </td>
171
- </tr>
172
- <tr>
173
- <th scope="row">
174
- <?php echo EZP_CS_Utility::_e("Name Placeholder") ?>
175
- </th>
176
- <td>
177
- <div class="compound-setting">
178
- <input class="long-input" name="name_placeholder_text" type="text" value="<?php EZP_CS_Utility::_he($content->name_placeholder_text); ?>" />
179
- </div>
180
- </td>
181
- </tr>
182
- <tr>
183
- <th scope="row">
184
- <?php echo EZP_CS_Utility::_e("Button") ?>
185
- </th>
186
- <td>
187
- <div class="compound-setting">
188
- <input name="email_button_text" type="text" value="<?php echo $content->email_button_text; ?>" />
189
- </div>
190
- </td>
191
- </tr>
192
- </table>
193
- <div style="margin-top:17px"><span class="description"><?php echo '*' . EZP_CS_Utility::__('Section relevant only if email collection is enabled in') . ' <a href="' . admin_url() . 'admin.php?page=' . EZP_CS_Constants::$SETTINGS_SUBMENU_SLUG . '">' . self::__('settings') . '</a>'; ?></span></div>
194
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  </div>
196
 
197
- <div class="postbox" >
198
- <div class="inside" >
199
- <h3 ><?php EZP_CS_Utility::_e("Thank You Text") ?></h3>
200
- <table class="form-table">
201
- <tr>
202
- <th scope="row">
203
- <?php echo EZP_CS_Utility::_e("Headline") ?>
204
- </th>
205
- <td>
206
- <div class="compound-setting">
207
- <input class="long-input" name="thank_you_headline" type="text" value="<?php EZP_CS_Utility::_he($content->thank_you_headline); ?>" />
208
- </div>
209
- </td>
210
- </tr>
211
-
212
- <tr>
213
- <th scope="row">
214
- <?php echo EZP_CS_Utility::_e("Text") ?>
215
- </th>
216
- <td>
217
- <div class="compound-setting">
218
- <textarea rows="5" cols="67" name="thank_you_description" type="text"><?php EZP_CS_Utility::_he($content->thank_you_description); ?></textarea>
219
- </div>
220
- </td>
221
- </tr>
222
- </table>
223
- <div style="margin-top:17px"><span class="description"><?php echo '*' . EZP_CS_Utility::__('Section relevant only if email collection is enabled in') . ' <a href="' . admin_url() . 'admin.php?page=' . EZP_CS_Constants::$SETTINGS_SUBMENU_SLUG . '">' . self::__('settings') . '</a>'; ?></span></div>
224
- </div></div>
225
-
226
- <div class="postbox" >
227
- <div class="inside" >
228
- <h3 ><?php EZP_CS_Utility::_e("Countdown") ?></h3>
229
- <table class="form-table">
230
- <tr>
231
- <th scope="row">
232
- <?php echo EZP_CS_Utility::_e("Due Date") ?>
233
- </th>
234
- <td>
235
- <div class="compound-setting">
236
- <input style="width:130px;" id="ezp-countdown-due-date" class="long-input" name="countdown_due_date" type="text" value="<?php EZP_CS_Utility::_he($content->countdown_due_date); ?>" />
237
- <div><span class="description"><?php EZP_CS_Utility::_e('Countdown timer will display when populated'); ?></span></div>
238
- </div>
239
- </td>
240
- </tr>
241
- <tr>
242
- <td style="padding-left:0; padding-bottom:0;" colspan="2">
243
- <small>Autodisable page after countdown with <a style="color:#DC3232" href="https://snapcreek.com" target="_blank">Coming Soon Page Elite</a></small>
244
- </td>
245
- </tr>
246
 
247
- </table>
248
- </div></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
 
 
 
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  //- Settings Logic -
5
  $action_updated = null;
 
6
  $global = EZP_CS_Global_Entity::get_instance();
 
7
  $set_index = $global->active_set_index;
 
8
  $set = EZP_CS_Set_Entity::get_by_id($set_index);
 
9
  $content = EZP_CS_Content_Entity::get_by_id($set->content_index);
 
10
  $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
 
11
  $error_string = "";
12
 
13
  if (isset($_POST['action']) && $_POST['action'] == 'save')
14
  {
 
15
  check_admin_referer('easy-pie-coming-soon-save-content');
 
16
  // Artificially set the bools since they aren't part of the postback
17
  // TODO
18
  $error_string = $content->set_post_variables($_POST);
 
19
  if ($error_string == "")
20
  {
 
21
  $action_updated = $content->save();
22
  }
23
  }
29
  <?php wp_nonce_field('easy-pie-coming-soon-save-content'); ?>
30
  <input type="hidden" name="action" value="save"/>
31
 
32
+ <?php if ($error_string != "") : ?>
 
 
 
 
33
  <div id="message" class="error below-h2"><p><?php echo EZP_CS_Utility::__('Errors present:') . "<br/> $error_string" ?></p></div>
34
  <?php endif; ?>
35
 
36
  <?php if ($action_updated) : ?>
37
+ <div id="message" class="updated below-h2">
38
+ <p><span><?php echo EZP_CS_Utility::__('Settings Saved.'); ?></span><strong style="margin-left:7px;"><?php echo ' ' . EZP_CS_Utility::__('If you have a caching plugin be sure to clear it.'); ?></strong></p>
39
+ </div>
40
  <?php endif; ?>
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
+ <!-- ===================================
44
+ TITLE -->
45
+ <div class="postbox" style="margin-top:15px;">
46
+ <div class="inside">
47
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("TITLE") ?></h3>
48
  <table class="form-table">
49
  <tr>
50
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Window Title") ?></th>
 
 
51
  <td>
52
+ <input class="long-input" name="title" type="text" value="<?php EZP_CS_Utility::_he($content->title); ?>" /><br/>
53
+ <i><?php echo EZP_CS_Utility::_e("Note: This is the page title of the window") ?></i>
 
54
  </td>
55
  </tr>
56
  </table>
57
  </div>
58
  </div>
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
+ <!-- ===================================
62
+ CONTENT -->
63
+ <div class="postbox">
64
+ <div class="inside">
65
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("CONTENT") ?></h3>
66
+
67
+ <!-- MAIN TEXT -->
68
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("MAIN TEXT") ?></div>
69
+ <table class="form-table">
70
+ <tr>
71
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Headline") ?></th>
72
+ <td>
73
+ <input class="long-input" name="headline" type="text" value="<?php EZP_CS_Utility::_he($content->headline); ?>" />
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Description") ?></th>
78
+ <td>
79
+ <textarea rows="5" cols="67" name="description"><?php EZP_CS_Utility::_he($content->description); ?></textarea>
80
+ </td>
81
+ </tr>
82
+ <tr>
83
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Disclaimer") ?></th>
84
+ <td>
85
+ <input class="long-input" name="disclaimer" type="text" value="<?php EZP_CS_Utility::_he($content->disclaimer); ?>" />
86
+ </td>
87
+ </tr>
88
+ <tr>
89
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Footer") ?></th>
90
+ <td>
91
+ <input class="long-input" name="footer" type="text" value="<?php EZP_CS_Utility::_he($content->footer); ?>" />
92
+ </td>
93
+ </tr>
94
+ </table>
95
+
96
+ <!-- EMAIL TEXT -->
97
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("EMAIL TEXT") ?></div>
98
+ <table class="form-table">
99
+ <tr>
100
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Email Placeholder") ?></th>
101
+ <td>
102
+ <input class="long-input" name="email_placeholder_text" type="text" value="<?php EZP_CS_Utility::_he($content->email_placeholder_text); ?>" />
103
+ </td>
104
+ </tr>
105
+ <tr>
106
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Name Placeholder") ?></th>
107
+ <td>
108
+ <input class="long-input" name="name_placeholder_text" type="text" value="<?php EZP_CS_Utility::_he($content->name_placeholder_text); ?>" />
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Button") ?></th>
113
+ <td>
114
+ <input name="email_button_text" type="text" value="<?php echo $content->email_button_text; ?>" />
115
+ </td>
116
+ </tr>
117
+ </table>
118
+ <div style="margin-top:17px"><span class="description">
119
+ <?php echo '*' . EZP_CS_Utility::__('Section relevant only if email collection is enabled in') . ' <a href="' . admin_url() . 'admin.php?page=' . EZP_CS_Constants::$SETTINGS_SUBMENU_SLUG . '">' . self::__('settings') . '</a>'; ?></span>
120
+ </div>
121
+
122
+ </div>
123
  </div>
124
 
125
+ <!-- ===================================
126
+ THANK YOU TEXT -->
127
+ <div class="postbox">
128
+ <div class="inside">
129
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Thank You Text") ?></h3>
130
+ <table class="form-table">
131
+ <tr>
132
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Headline") ?></th>
133
+ <td><input class="long-input" name="thank_you_headline" type="text" value="<?php EZP_CS_Utility::_he($content->thank_you_headline); ?>" /></td>
134
+ </tr>
135
+ <tr>
136
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Text") ?></th>
137
+ <td><textarea rows="5" cols="67" name="thank_you_description"><?php EZP_CS_Utility::_he($content->thank_you_description); ?></textarea></td>
138
+ </tr>
139
+ </table>
140
+ <div style="margin-top:17px">
141
+ <span class="description"><?php echo '*' . EZP_CS_Utility::__('Section relevant only if email collection is enabled in') . ' <a href="' . admin_url() . 'admin.php?page=' . EZP_CS_Constants::$SETTINGS_SUBMENU_SLUG . '">' . self::__('settings') . '</a>'; ?></span>
142
+ </div>
143
+ </div>
144
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
+ <!-- ===================================
147
+ COUNTDOWN TEXT -->
148
+ <div class="postbox">
149
+ <div class="inside">
150
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Countdown Text") ?></h3>
151
+ <table class="form-table">
152
+ <tr>
153
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Due Date") ?></th>
154
+ <td>
155
+ <input style="width:130px;" id="ezp-countdown-due-date" class="long-input" name="countdown_due_date" type="text" value="<?php EZP_CS_Utility::_he($content->countdown_due_date); ?>" />
156
+ <div><span class="description"><?php EZP_CS_Utility::_e('Countdown timer will display when populated'); ?></span></div>
157
+ </td>
158
+ </tr>
159
+ <tr>
160
+ <td style="padding-left:0; padding-bottom:0;" colspan="2">
161
+ <small>Auto disable page after countdown with <a style="color:#DC3232" href="https://snapcreek.com" target="_blank">Coming Soon Page Elite</a></small>
162
+ </td>
163
+ </tr>
164
+
165
+ </table>
166
+ </div>
167
+ </div>
pages/page-options-display-tab.php CHANGED
@@ -1,24 +1,29 @@
1
  <?php
2
- /*
3
- Easy Pie Coming Soon Plugin
4
- Copyright (C) 2016, Snap Creek LLC
5
- website: snapcreek.com contact: support@snapcreek.com
6
-
7
- Easy Pie Coming Soon Plugin is distributed under the GNU General Public License, Version 3,
8
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
9
- St, Fifth Floor, Boston, MA 02110, USA
10
 
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
15
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
- */
 
 
 
 
 
22
  ?>
23
 
24
  <style>
@@ -40,318 +45,278 @@
40
 
41
  #easy-pie-cs-builtin-background-slider { width: 610px}
42
  #easy-pie-cs-builtin-background-slider img { height:100px; width:100px; margin-right:10px; margin-top:7px;}
43
- </style>
44
-
45
- <!--<script type="text/javascript" src="<?php echo EZP_CS_Utility::$PLUGIN_URL . '/jquery-plugins/simple-modal/jquery.simplemodal.1.4.4.min.js?' . EZP_CS_Constants::PLUGIN_VERSION; ?>"></script>-->
46
-
47
- <?php
48
- $action_updated = null;
49
-
50
- $global = EZP_CS_Global_Entity::get_instance();
51
-
52
- $set_index = $global->active_set_index;
53
-
54
- $set = EZP_CS_Set_Entity::get_by_id($set_index);
55
-
56
- $display = EZP_CS_Display_Entity::get_by_id($set->display_index);
57
-
58
- $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
59
-
60
- $error_string = "";
61
-
62
-
63
- if (isset($_POST['action']) && $_POST['action'] == 'save') {
64
 
65
- check_admin_referer('easy-pie-coming-soon-save-display');
66
-
67
- EZP_CS_Utility::debug('past admin check');
68
-
69
- // Artificially set the bools since they aren't part of the postback
70
- $display->background_tiling_enabled = "false";
71
-
72
- $error_string = $display->set_post_variables($_POST);
73
-
74
- if ($error_string == "") {
75
 
76
- $action_updated = $display->save();
77
- }
78
- }
79
- ?>
80
 
81
  <?php wp_nonce_field('easy-pie-coming-soon-save-display'); ?>
82
  <input type="hidden" name="action" value="save"/>
83
- <?php
84
-
85
- //EZP_CS_Utility::display_admin_notice($config->coming_soon_mode_on);
86
-
87
- if ($error_string != "") :
88
- ?>
89
- <div id="message" class="error below-h2"><p><?php echo EZP_CS_Utility::__('Errors present:') . "<br/> $error_string" ?></p></div>
90
  <?php endif; ?>
91
 
92
  <?php if ($action_updated) : ?>
93
- <div id="message" class="updated below-h2"><p><span><?php echo EZP_CS_Utility::__('Settings Saved.'); ?></span><strong style="margin-left:7px;"><?php echo ' ' . EZP_CS_Utility::__('If you have a caching plugin be sure to clear it.'); ?></strong></p></div>
 
 
94
  <?php endif; ?>
95
 
96
 
97
- <!--<div class="postbox" style="margin-top:12px;">
98
- <div class="inside" >
99
- <h3><?php EZP_CS_Utility::_e("Display Template") ?></h3>
100
- <button onclick="easyPie.CS.ShowTemplateDialog();
101
- return false;"><?php EZP_CS_Utility::_e("Templates"); ?></button>
102
- <div style="margin-top:4px;"><span class="description"><?php EZP_CS_Utility::_e('Templates give you a starting point for your display settings.'); ?></span></div>
103
- </div>
104
- </div>-->
105
- <div class="postbox" style="margin-top:12px;">
106
- <div class="inside" >
107
- <h3><?php EZP_CS_Utility::_e("Background") ?></h3>
108
- <table class="form-table">
109
- <tr>
110
- <th scope="row">
111
- <?php echo EZP_CS_Utility::_e("Color") ?>
112
- </th>
113
- <td>
114
- <div class="compound-setting">
115
- <input name="background_color" class="spectrum-picker" type="text" value="<?php echo $display->background_color; ?>"/>
116
- </div>
117
- </td>
118
- </tr>
119
- <tr>
120
- <th scope="row">
121
- <?php echo EZP_CS_Utility::_e("Image") ?>
122
- </th>
123
- <td>
124
- <div>
125
- <span class="description"><?php echo EZP_CS_Utility::__('Instead of background color use one of these images') . ':'; ?></span>
126
- </div>
127
- <div class="ezp-cs-radiodiv">
128
- <div class="compound-setting">
129
- <div id="easy-pie-cs-builtin-background-slider">
130
- <?php
131
- $background_dir = EZP_CS_Utility::$PLUGIN_DIRECTORY . '/images/backgrounds/';
132
-
133
- $file_paths = glob($background_dir . '*.{jpg,png}', GLOB_BRACE);
134
-
135
- if ($file_paths != FALSE) {
136
-
137
- sort($file_paths);
138
- $image_index = 0;
139
- $build_in_background = false;
140
- foreach ($file_paths as $file_path) {
141
-
142
- $image_id = "built-in-bg-image-$image_index";
143
-
144
- $file_name = basename($file_path);
145
- $file_url = EZP_CS_Utility::$PLUGIN_URL . "/images/backgrounds/$file_name";
146
-
147
-
148
- if ($display->background_image_url != $file_url) {
149
- $opacity = 0.3;
150
- } else {
151
- $opacity = 1.0;
152
- $build_in_background = true;
153
- }
154
-
155
- echo "<img id='$image_id' src='$file_url' style='opacity:$opacity;cursor: pointer;'/>";
156
-
157
- $image_index++;
158
- }
159
- }
160
- ?>
161
- </div>
162
- </div>
163
- </div>
164
- <div class="ezp-cs-radiodiv">
165
- <div>
166
- <span class="description"><?php echo EZP_CS_Utility::__('or use your own') . ':'; ?></span>
167
- </div>
168
- <div class="compound-setting">
169
- <input id="easy-pie-cs-background-image-url" name="background_image_url" value="<?php echo $display->background_image_url; ?>" />
170
- <button id="easy-pie-cs-background-image-button"><?php EZP_CS_Utility::_e("Upload"); ?></button>
171
- <img id="easy-pie-cs-background-image-preview" style="display: <?php echo ($build_in_background || $display->background_image_url == '') ? 'none' : 'block' ?> ;width:80px;height:80px;margin-top:8px;" src="<?php echo $display->background_image_url; ?>" />
172
- </div>
173
- </div>
174
-
175
- </td>
176
- </tr>
177
- <tr>
178
- <th scope="row">
179
- <?php echo EZP_CS_Utility::_e("Tile") ?>
180
- </th>
181
- <td>
182
- <div class="compound-setting">
183
- <input type="checkbox" name="background_tiling_enabled" value="true" <?php echo $display->background_tiling_enabled == 'true' ? 'checked' : ''; ?> />
184
- <span><?php EZP_CS_Utility::_e("Enabled") ?></span>
185
- </div>
186
- <div>
187
- <span class="description"><?php echo EZP_CS_Utility::__('Image covers screen when tiling is disabled') . '.'; ?></span>
188
- </div>
189
- </td>
190
- </tr>
191
- <tr>
192
- <td style="padding-left:0; padding-bottom:0;" colspan="2">
193
- <small>Display fullscreen video with <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
194
- </td>
195
- </tr>
196
- </table>
197
- </div>
198
  </div>
199
-
200
- <div class="postbox" >
201
- <div class="inside" >
202
- <h3><?php EZP_CS_Utility::_e("Logo") ?></h3>
203
-
204
- <table class="form-table">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  <tr>
206
- <th scope="row">
207
- <?php echo EZP_CS_Utility::_e("Width") ?>
208
- </th>
209
  <td>
210
- <div class="compound-setting">
211
- <input class='narrow-input' name="logo_width" type="text" value="<?php echo $display->logo_width; ?>" />
212
- <span class="description"><?php echo '*' . EZP_CS_Utility::__('Specify px or %'); ?></span>
213
- </div>
214
  </td>
215
- </tr>
216
  <tr>
217
- <th scope="row">
218
- <?php echo EZP_CS_Utility::_e("Height") ?>
219
- </th>
220
  <td>
221
- <div class="compound-setting">
222
- <input class='narrow-input' name="logo_height" type="text" value="<?php echo $display->logo_height; ?>" />
223
- <span class="description"><?php echo '*' . EZP_CS_Utility::__('Specify px or %'); ?></span>
224
- </div>
225
  </td>
226
  </tr>
227
- </table>
228
- </div>
229
- </div>
230
-
231
-
232
- <div class="postbox" >
233
- <div class="inside" >
234
- <h3><?php EZP_CS_Utility::_e("Content Box") ?></h3>
235
- <table class="form-table">
236
- <tr>
237
- <th scope="row">
238
- <?php echo EZP_CS_Utility::_e("Opacity") ?>
239
- </th>
240
- <td>
241
- <div class="compound-setting">
242
- <div style="display:none;"><input class='narrow-input' id="content_box_opacity" name="content_box_opacity" type="text" value="<?php echo $display->content_box_opacity ?>" readonly="true"/> </div>
243
- <div id="opacity-display-value" style="float:left;">hi</div>
244
- <div style="padding-top:2px;"><div id="opacity-slider"></div></div>
245
- </div>
246
-
247
- </td>
248
- </tr>
249
  <tr>
250
- <th scope="row">
251
- <?php echo EZP_CS_Utility::_e("Color") ?>
252
- </th>
253
  <td>
254
- <div class="compound-setting">
255
- <input name="content_box_color" class="spectrum-picker" type="text" value="<?php echo $display->content_box_color ?>"/>
256
- </div>
257
  </td>
258
  </tr>
259
- </table>
260
- </div>
261
- </div>
262
-
263
-
264
- <div class="postbox" >
265
- <div class="inside" >
266
- <h3><?php EZP_CS_Utility::_e("Text") ?></h3>
267
- <table class="form-table">
268
- <tr>
269
- <?php EZP_CS_Display_Entity::display_font_field_row('Headline', 'text_headline', $display) ?>
270
- </tr>
271
  <tr>
272
- <?php EZP_CS_Display_Entity::display_font_field_row('Description', 'text_description', $display) ?>
273
  </tr>
274
-
275
- <tr>
276
- <?php EZP_CS_Display_Entity::display_font_field_row('Disclaimer', 'text_disclaimer', $display) ?>
277
- </tr>
278
- <tr>
279
- <?php EZP_CS_Display_Entity::display_font_field_row('Footer', 'text_footer', $display) ?>
280
- </tr>
281
  <tr>
282
- <td style="padding-left:0; padding-bottom:0;" colspan="2">
283
- <div><span class="description"><?php echo '*' . EZP_CS_Utility::__('Specify px, rem or em for sizes'); ?></span></div>
284
- </td>
285
- </tr>
286
- <tr>
287
- <td style="padding-left:0; padding-bottom:0;" colspan="2">
288
  <small>Google Fonts & Effects available in <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
289
  </td>
290
- </tr>
291
- </table>
292
-
293
  </div>
294
  </div>
295
 
296
- <div class="postbox" >
297
- <div class="inside" >
298
 
299
- <h3 ><?php EZP_CS_Utility::_e("Email Button") ?></h3>
300
- <table class="form-table">
301
-
302
- <tr>
303
- <th scope="row">
304
- <?php echo EZP_CS_Utility::_e("Width") ?>
305
- </th>
306
- <td>
307
- <div class="compound-setting">
308
- <input class='narrow-input' name="email_button_width" type="text" value="<?php echo $display->email_button_width; ?>" />
309
- <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px or %'); ?></span>
310
- </div>
311
- </td>
312
- </tr>
313
- <tr>
314
- <th scope="row">
315
- <?php echo EZP_CS_Utility::_e("Height") ?>
316
- </th>
317
- <td>
318
- <div class="compound-setting">
319
- <input class='narrow-input' name="email_button_height" type="text" value="<?php echo $display->email_button_height; ?>" />
320
- <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px or %'); ?></span>
321
- </div>
322
- </td>
323
- </tr>
324
- <tr>
325
- <?php echo EZP_CS_Display_Entity::display_font_field_row("Font", 'email_button', $display); ?>
326
- </tr>
327
- <tr>
328
- <th scope="row">
329
- <?php echo EZP_CS_Utility::_e("Color") ?>
330
- </th>
331
- <td>
332
- <div class="compound-setting">
333
- <input name="email_button_color" class="spectrum-picker" type="text" value="<?php echo $display->email_button_color; ?>"/>
334
- </div>
335
- </td>
336
- </tr>
337
- </table>
338
- </div>
339
  </div>
340
 
341
 
342
- <div class="postbox" >
343
- <div class="inside" >
344
- <h3 style="float:left;" ><span style="font-weight:bold"><?php EZP_CS_Utility::_e('Advanced'); ?><span></h3>
345
- <table class="form-table">
346
- <tr valign="top">
347
- <th scope="row"><?php EZP_CS_Utility::_e("Custom CSS") ?></th><td>
348
- <div>
349
- <textarea cols="67" rows="9" id="easy-pie-cs-field-junk" name="css"><?php echo $display->css; ?></textarea>
350
- </div>
351
- </td>
352
- </tr>
353
- </table>
354
-
355
- <div style="margin-top:4px;"><a target="_blank" href="https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/"><span class="description"><?php EZP_CS_Utility::_e('CSS Styling Tips'); ?></span></a></div>
356
- </div>
357
- </div>
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ $action_updated = null;
3
+ $global = EZP_CS_Global_Entity::get_instance();
4
+ $set_index = $global->active_set_index;
5
+ $set = EZP_CS_Set_Entity::get_by_id($set_index);
6
+ $display = EZP_CS_Display_Entity::get_by_id($set->display_index);
7
+ $content = EZP_CS_Content_Entity::get_by_id($set->content_index);
8
+ $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
9
+ $error_string = "";
10
 
11
+ if (isset($_POST['action']) && $_POST['action'] == 'save')
12
+ {
13
+ check_admin_referer('easy-pie-coming-soon-save-display');
14
+ EZP_CS_Utility::debug('past admin check');
15
+
16
+ // Artificially set the bools since they aren't part of the postback
17
+ $display->background_tiling_enabled = "false";
18
+ $error_string = $display->set_post_variables($_POST);
19
+
20
+ if ($error_string == "")
21
+ {
22
+ $action_updated = $display->save();
23
+ }
24
+ $content->logo_url = $_POST['logo_url'];
25
+ $content->save();
26
+ }
27
  ?>
28
 
29
  <style>
45
 
46
  #easy-pie-cs-builtin-background-slider { width: 610px}
47
  #easy-pie-cs-builtin-background-slider img { height:100px; width:100px; margin-right:10px; margin-top:7px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
+ .ezp-cs-color-row { <?php EZP_CS_Utility::echo_display($display->background_type == EZP_CS_Display_Background_Type::Color, 'table-row', 'none'); ?> }
50
+ .ezp-cs-image-row { <?php EZP_CS_Utility::echo_display($display->background_type == EZP_CS_Display_Background_Type::Image, 'table-row', 'none'); ?> }
51
+ .ezp-cs-video-row { <?php EZP_CS_Utility::echo_display($display->background_type == EZP_CS_Display_Background_Type::Video, 'table-row', 'none'); ?> }
52
+ </style>
 
 
 
 
 
 
53
 
 
 
 
 
54
 
55
  <?php wp_nonce_field('easy-pie-coming-soon-save-display'); ?>
56
  <input type="hidden" name="action" value="save"/>
57
+ <?php if ($error_string != "") :?>
58
+ <div id="message" class="error below-h2">
59
+ <p><?php echo EZP_CS_Utility::__('Errors present:') . "<br/> $error_string" ?></p>
60
+ </div>
 
 
 
61
  <?php endif; ?>
62
 
63
  <?php if ($action_updated) : ?>
64
+ <div id="message" class="updated below-h2">
65
+ <p><span><?php echo EZP_CS_Utility::__('Settings Saved.'); ?></span><strong style="margin-left:7px;"><?php echo ' ' . EZP_CS_Utility::__('If you have a caching plugin be sure to clear it.'); ?></strong></p>
66
+ </div>
67
  <?php endif; ?>
68
 
69
 
70
+ <!-- ===================================
71
+ BACKGROUND -->
72
+ <div class="postbox" style="margin-top:10px;">
73
+ <div class="inside">
74
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Background") ?></h3>
75
+ <table class="form-table">
76
+ <tr>
77
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Type") ?></th>
78
+ <td>
79
+ <select id="ezp-cs-background-type" name="background_type" onchange="easyPie.CS.Options.Display.ShowBackgroundSection();">
80
+ <option <?php EZP_CS_Utility::echo_selected($display->background_type == EZP_CS_Display_Background_Type::Color) ?> value="<?php echo EZP_CS_Display_Background_Type::Color ?>"><?php EZP_CS_Utility::_e('Color'); ?></option>
81
+ <option <?php EZP_CS_Utility::echo_selected($display->background_type == EZP_CS_Display_Background_Type::Image) ?> value="<?php echo EZP_CS_Display_Background_Type::Image ?>"><?php EZP_CS_Utility::_e('Image'); ?></option>
82
+ <option <?php EZP_CS_Utility::echo_selected($display->background_type == EZP_CS_Display_Background_Type::Video) ?> value="<?php echo EZP_CS_Display_Background_Type::Video ?>"><?php EZP_CS_Utility::_e('Video'); ?></option>
83
+ </select>
84
+ </td>
85
+ </tr>
86
+ <tr class="ezp-cs-color-row">
87
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Color") ?></th>
88
+ <td><input name="background_color" class="spectrum-picker" type="text" value="<?php echo $display->background_color; ?>"/></td>
89
+ </tr>
90
+ <tr class="ezp-cs-image-row">
91
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Image") ?></th>
92
+ <td>
93
+ <div class="ezp-cs-radiodiv">
94
+ <div id="easy-pie-cs-builtin-background-slider">
95
+ <?php
96
+ $background_dir = EZP_CS_Utility::$PLUGIN_DIRECTORY . '/images/backgrounds/';
97
+ $file_paths = glob($background_dir . '*.{jpg,png}', GLOB_BRACE);
98
+
99
+ if ($file_paths != FALSE)
100
+ {
101
+ sort($file_paths);
102
+ $image_index = 0;
103
+ $build_in_background = false;
104
+ foreach ($file_paths as $file_path)
105
+ {
106
+ $image_id = "built-in-bg-image-$image_index";
107
+ $file_name = basename($file_path);
108
+ $file_url = EZP_CS_Utility::$PLUGIN_URL . "/images/backgrounds/$file_name";
109
+
110
+ if ($display->background_image_url != $file_url)
111
+ {
112
+ $opacity = 0.3;
113
+ }
114
+ else
115
+ {
116
+ $opacity = 1.0;
117
+ $build_in_background = true;
118
+ }
119
+ echo "<img id='$image_id' src='$file_url' style='opacity:$opacity;cursor: pointer;'/>";
120
+ $image_index++;
121
+ }
122
+ }
123
+ ?>
124
+ </div>
125
+ </div>
126
+ <div class="ezp-cs-radiodiv">
127
+ <span class="description"><?php echo EZP_CS_Utility::__('or use your own') . ':'; ?></span><br/>
128
+ <input id="easy-pie-cs-background-image-url" name="background_image_url" value="<?php echo $display->background_image_url; ?>" style="width:500px" />
129
+ <button id="easy-pie-cs-background-image-button"><?php EZP_CS_Utility::_e("Upload"); ?></button>
130
+ <img id="easy-pie-cs-background-image-preview" style="display: <?php echo ($build_in_background || $display->background_image_url == '') ? 'none' : 'block' ?> ;width:80px;height:80px;margin-top:8px;" src="<?php echo $display->background_image_url; ?>" />
131
+ </div>
132
+ </td>
133
+ </tr>
134
+ <tr class="ezp-cs-image-row">
135
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Tile") ?></th>
136
+ <td>
137
+ <input type="checkbox" name="background_tiling_enabled" value="true" <?php echo $display->background_tiling_enabled == 'true' ? 'checked' : ''; ?> />
138
+ <span><?php EZP_CS_Utility::_e("Enabled") ?></span>
139
+ <span class="description"><?php echo EZP_CS_Utility::__('Image covers screen when tiling is disabled') . '.'; ?></span>
140
+ </td>
141
+ </tr>
142
+ <tr class="ezp-cs-video-row" style="color:silver">
143
+ <th scope="row"><?php echo EZP_CS_Utility::_e("YouTube ID") ?></th>
144
+ <td>
145
+ <input disabled name="youtube_video_id" type="text" placeholder="<?php echo EZP_CS_Utility::_e("Available in Elite") ?>" /> <i class="fa fa-youtube fa-2x" aria-hidden="true"></i>
146
+ <span class="description"><?php echo sprintf('YouTube <a href="%s" target="blank">Video ID.</a>', 'http://docs.joeworkman.net/rapidweaver/stacks/youtube/video-id'); ?> </span>
147
+ </td>
148
+ </tr>
149
+ <tr class="ezp-cs-video-row">
150
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Sound") ?></th>
151
+ <td>
152
+ <input disabled type="checkbox" name="mute_background_video" value="true" checked />
153
+ <span style="color:silver"><?php EZP_CS_Utility::_e("Mute") ?></span>
154
+ <br/><br/>
155
+ <small>YouTube Backgrounds available with <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
156
+ </td>
157
+ </tr>
158
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
159
  </div>
160
+ </div>
161
+
162
+
163
+
164
+ <!-- ===================================
165
+ CONTENT -->
166
+ <div class="postbox">
167
+ <div class="inside">
168
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Content") ?></h3>
169
+
170
+ <!-- CONTENT BOX -->
171
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("CONTENT BOX") ?></div>
172
+ <table class="form-table">
173
+ <tr>
174
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Opacity") ?></th>
175
+ <td>
176
+ <div style="display:none;"><input class='narrow-input' id="content_box_opacity" name="content_box_opacity" type="text" value="<?php echo $display->content_box_opacity ?>" readonly="true"/> </div>
177
+ <div id="opacity-display-value" style="float:left;">hi</div>
178
+ <div style="padding-top:2px;"><div id="opacity-slider"></div></div>
179
+ </td>
180
+ </tr>
181
+ <tr>
182
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Color") ?></th>
183
+ <td>
184
+ <input name="content_box_color" class="spectrum-picker" type="text" value="<?php echo $display->content_box_color ?>"/>
185
+ </td>
186
+ </tr>
187
+ </table>
188
+
189
+ <!-- LOGO-->
190
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("LOGO") ?></div>
191
+ <table class="form-table">
192
+ <tr>
193
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Image") ?></th>
194
+ <td>
195
+ <input id="easy-pie-cs-logo-url" name="logo_url" value="<?php echo $content->logo_url; ?>" />
196
+ <button id="easy-pie-cs-logo-button"><?php EZP_CS_Utility::_e("Upload"); ?></button>
197
+ <img id="easy-pie-cs-logo-preview" style="display: <?php echo $content->logo_url == '' ? 'none' : 'block' ?> ;width:80px;height:80px;margin-top:8px;" src="<?php echo $content->logo_url; ?>" />
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Width") ?></th>
202
+ <td>
203
+ <input class='narrow-input' name="logo_width" type="text" value="<?php echo $display->logo_width; ?>" />
204
+ <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px or %'); ?></span>
205
+ </td>
206
+ </tr>
207
+ <tr>
208
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Height") ?></th>
209
+ <td>
210
+ <input class='narrow-input' name="logo_height" type="text" value="<?php echo $display->logo_height; ?>" />
211
+ <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px or %'); ?></span>
212
+ </td>
213
+ </tr>
214
+ </table>
215
+
216
+ <!-- TEXT-->
217
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("TEXT") ?></div>
218
+ <table class="form-table">
219
+ <tr>
220
+ <?php EZP_CS_Display_Entity::display_font_field_row('Headline', 'text_headline', $display) ?>
221
+ </tr>
222
+ <tr>
223
+ <?php EZP_CS_Display_Entity::display_font_field_row('Description', 'text_description', $display) ?>
224
+ </tr>
225
+
226
+ <tr>
227
+ <?php EZP_CS_Display_Entity::display_font_field_row('Disclaimer', 'text_disclaimer', $display) ?>
228
+ </tr>
229
+ <tr>
230
+ <?php EZP_CS_Display_Entity::display_font_field_row('Footer', 'text_footer', $display) ?>
231
+ </tr>
232
+ <tr>
233
+ <th></th>
234
+ <td>
235
+ <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px, rem or em for sizes'); ?></span>
236
+ </td>
237
+ </tr>
238
+ </table>
239
+
240
+
241
+ <!-- EMAIL BUTTON -->
242
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("EMAIL BUTTON") ?></div>
243
+ <table class="form-table">
244
  <tr>
245
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Color") ?></th>
 
 
246
  <td>
247
+ <input name="email_button_color" class="spectrum-picker" type="text" value="<?php echo $display->email_button_color; ?>"/>
 
 
 
248
  </td>
249
+ </tr>
250
  <tr>
251
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Width") ?></th>
 
 
252
  <td>
253
+ <input class='narrow-input' name="email_button_width" type="text" value="<?php echo $display->email_button_width; ?>" />
254
+ <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px or %'); ?></span>
 
 
255
  </td>
256
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  <tr>
258
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Height") ?></th>
 
 
259
  <td>
260
+ <input class='narrow-input' name="email_button_height" type="text" value="<?php echo $display->email_button_height; ?>" />
261
+ <span class="description"><?php echo '*' . EZP_CS_Utility::__('Append px or %'); ?></span>
 
262
  </td>
263
  </tr>
264
+ <tr><?php echo EZP_CS_Display_Entity::display_font_field_row("Font", 'email_button', $display); ?></tr>
 
 
 
 
 
 
 
 
 
 
 
265
  <tr>
266
+ <?php echo EZP_CS_Display_Entity::display_font_field_row("Font", 'email_button', $display); ?>
267
  </tr>
 
 
 
 
 
 
 
268
  <tr>
269
+ <td colspan="2" style="padding:30px 0 0 10px">
 
 
 
 
 
270
  <small>Google Fonts & Effects available in <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
271
  </td>
272
+ </tr>
273
+ </table>
 
274
  </div>
275
  </div>
276
 
 
 
277
 
278
+ <!-- ===================================
279
+ ADVANCED -->
280
+ <div class="postbox">
281
+ <div class="inside">
282
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Advanced") ?></h3>
283
+ <table class="form-table">
284
+ <tr valign="top">
285
+ <th scope="row"><?php EZP_CS_Utility::_e("Custom CSS") ?></th><td>
286
+ <textarea cols="75" rows="12" id="easy-pie-cs-field-junk" name="css" style="font-size:12px"><?php echo $display->css; ?></textarea>
287
+ </td>
288
+ </tr>
289
+ </table>
290
+ <div style="margin-top:4px;">
291
+ <a target="_blank" href="https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/"><span class="description"><?php EZP_CS_Utility::_e('CSS Styling Tips'); ?></span></a>
292
+ </div>
293
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  </div>
295
 
296
 
297
+ <script type='text/javascript'>
298
+ jQuery(document).ready(function ($)
299
+ {
300
+ easyPie.CS.Options.Display = {};
301
+ easyPie.CS.Options.Display.ShowBackgroundSection = function () {
302
+
303
+ var backgroundType = $("#ezp-cs-background-type").val();
304
+ if (backgroundType == <?php echo EZP_CS_Display_Background_Type::Color ?>) {
305
+
306
+ $('.ezp-cs-color-row').show();
307
+ $('.ezp-cs-image-row').hide();
308
+ $('.ezp-cs-video-row').hide();
309
+ } else if (backgroundType == <?php echo EZP_CS_Display_Background_Type::Image ?>) {
310
+
311
+ $('.ezp-cs-color-row').hide();
312
+ $('.ezp-cs-image-row').show();
313
+ $('.ezp-cs-video-row').hide();
314
+ } else {
315
+
316
+ $('.ezp-cs-color-row').hide();
317
+ $('.ezp-cs-image-row').hide();
318
+ $('.ezp-cs-video-row').show();
319
+ }
320
+ }
321
+ });
322
+ </script>
pages/page-options-settings.php CHANGED
@@ -1,36 +1,20 @@
1
- <?php
2
- /*
3
- Easy Pie Coming Soon Plugin
4
- Copyright (C) 2016, Snap Creek LLC
5
- website: snapcreek.com contact: support@snapcreek.com
6
-
7
- Easy Pie Coming Soon Plugin is distributed under the GNU General Public License, Version 3,
8
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
9
- St, Fifth Floor, Boston, MA 02110, USA
10
-
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
15
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
- */
22
- ?>
23
 
24
  <style lang="text/css">
25
  .compound-setting { line-height:20px;}
26
  .narrow-input { width:66px;}
27
  .long-input { width: 345px;}
 
 
 
28
  </style>
29
 
30
  <div class="wrap">
 
 
 
 
 
31
 
32
- <?php screen_icon(EZP_CS_Constants::PLUGIN_SLUG); ?>
33
- <h2>EZP Coming Soon: <?php EZP_CS_Utility::_e('Settings') ?></h2>
34
  <?php
35
  if (isset($_GET['settings-updated']))
36
  {
@@ -38,245 +22,178 @@
38
  }
39
  ?>
40
  <div id="easypie-cs-options" class="inside">
41
- <form id="easy-pie-cs-main-form" method="post" action="<?php echo admin_url('admin.php?page=' . EZP_CS_Constants::$SETTINGS_SUBMENU_SLUG); ?>" >
42
- <?php
43
- $action_updated = null;
44
-
45
- $global = EZP_CS_Global_Entity::get_instance();
46
-
47
- $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
48
-
49
- $error_string = "";
50
-
51
- if (isset($_POST['action']) && $_POST['action'] == 'save')
52
- {
53
-
54
- check_admin_referer('easy-pie-coming-soon-save-settings');
55
-
56
- // Artificially set the bools since they aren't part of the postback
57
- $config->collect_email = false;
58
- $config->collect_name = false;
59
-
60
- $error_string = $config->set_post_variables($_POST);
61
-
62
- if ($error_string == "")
63
- {
64
-
65
- $config->fix_url_fields();
66
-
67
- $action_updated = $config->save();
68
- }
69
- }
70
- ?>
71
-
72
- <?php wp_nonce_field('easy-pie-coming-soon-save-settings'); ?>
73
- <input type="hidden" name="action" value="save"/>
74
- <?php
75
- // EZP_CS_Utility::display_admin_notice($config->coming_soon_mode_on);
76
-
77
- if ($error_string != "") :
78
- ?>
79
- <div id="message" class="error below-h2"><p><?php echo EZP_CS_Utility::__('Errors present:') . "<br/> $error_string" ?></p></div>
80
- <?php endif; ?>
81
-
82
- <?php if ($action_updated) : ?>
83
- <div id="message" class="updated below-h2"><p><span><?php echo EZP_CS_Utility::__('Settings Saved.'); ?></span><strong style="margin-left:7px;"><?php echo ' ' . EZP_CS_Utility::__('If you have a caching plugin be sure to clear it.'); ?></strong></p></div>
84
- <?php endif; ?>
85
-
86
- <div class="postbox" style="margin-top:12px;" >
87
- <div class="inside" >
88
- <h3 ><?php EZP_CS_Utility::_e("General") ?></h3>
89
- <table class="form-table">
90
- <tr>
91
- <th scope="row">
92
- <?php echo EZP_CS_Utility::_e("Status") ?>
93
- </th>
94
- <td>
95
- <div class="compound-setting">
96
- <input type="radio" name="coming_soon_mode_on" value="true" <?php echo $config->coming_soon_mode_on ? 'checked' : ''; ?>/><span><?php echo EZP_CS_Utility::__('On'); ?></span>
97
- <input type="radio" name="coming_soon_mode_on" value="" <?php echo $config->coming_soon_mode_on ? '' : 'checked'; ?>/><span><?php echo EZP_CS_Utility::__('Off'); ?></span>
98
- </div>
99
- </td>
100
- </tr>
101
- </table>
102
- </div>
103
- </div>
104
-
105
- <div class="postbox" style="margin-top:12px;" >
106
- <div class="inside" >
107
- <h3 ><?php EZP_CS_Utility::_e("Collection") ?></h3>
108
- <table class="form-table">
109
- <tr>
110
- <th scope="row">
111
- <?php echo EZP_CS_Utility::_e("Collect Email") ?>
112
- </th>
113
- <td>
114
- <div class="compound-setting">
115
- <input type="checkbox" name="collect_email" <?php echo $config->collect_email ? 'checked' : ''; ?> />
116
- <span><?php EZP_CS_Utility::_e("Yes") ?></span>
117
- </div>
118
- </td>
119
- </tr>
120
- <tr>
121
- <th scope="row">
122
- <?php echo EZP_CS_Utility::_e("Collect Name") ?>
123
- </th>
124
- <td>
125
- <div class="compound-setting">
126
- <input type="checkbox" name="collect_name" <?php echo $config->collect_name ? 'checked' : ''; ?> />
127
- <span><?php EZP_CS_Utility::_e("Yes") ?></span>
128
- </div>
129
- </td>
130
- </tr>
131
- </table>
132
- </div>
133
- </div>
134
-
135
- <div class="postbox" >
136
- <div class="inside" >
137
- <h3 ><?php EZP_CS_Utility::_e("HTTP") ?></h3>
138
- <table class="form-table">
139
- <tr>
140
- <th scope="row">
141
- <?php echo EZP_CS_Utility::_e("Return Code") ?>
142
- </th>
143
- <td>
144
- <div class="compound-setting">
145
- <input type="radio" name="return_code" value="200" <?php echo $config->return_code == 200 ? 'checked' : ''; ?> /><?php echo EZP_CS_Utility::_e("200") ?>
146
- <input type="radio" name="return_code" value="503" <?php echo $config->return_code == 503 ? 'checked' : ''; ?> /><?php echo EZP_CS_Utility::_e("503") ?>
147
- </div>
148
- </td>
149
- </tr>
150
- </table>
151
- </div></div>
152
-
153
- <div class="postbox" >
154
- <div class="inside" >
155
- <h3><?php EZP_CS_Utility::_e("Social") ?></h3>
156
- <table class="form-table">
157
- <tr>
158
- <th scope="row">
159
- <?php echo EZP_CS_Utility::_e("Facebook URL") ?>
160
- </th>
161
- <td>
162
- <div class="compound-setting">
163
- <input class="long-input" name="facebook_url" type="text" value="<?php echo $config->facebook_url; ?>" />
164
- </div>
165
- </td>
166
- </tr>
167
- <tr>
168
- <th scope="row">
169
- <?php echo EZP_CS_Utility::_e("Google Plus URL") ?>
170
- </th>
171
- <td>
172
- <div class="compound-setting">
173
- <input class="long-input" name="google_plus_url" type="text" value="<?php echo $config->google_plus_url; ?>" />
174
- </div>
175
- </td>
176
- </tr>
177
- <tr>
178
- <th scope="row">
179
- <?php echo EZP_CS_Utility::_e("Twitter URL") ?>
180
- </th>
181
- <td>
182
- <div class="compound-setting">
183
- <input class="long-input" name="twitter_url" type="text" value="<?php echo $config->twitter_url; ?>" />
184
- </div>
185
- </td>
186
- </tr>
187
- <tr>
188
- <td style="padding-left:0; padding-bottom:0;" colspan="2">
189
- <small>Get more social icons with <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
190
- </td>
191
- </tr>
192
- </table>
193
- </div>
194
- </div>
195
-
196
- <div class="postbox" >
197
- <div class="inside" >
198
- <h3><?php EZP_CS_Utility::_e("SEO") ?></h3>
199
- <table class="form-table">
200
- <tr>
201
- <th scope="row">
202
- <?php echo EZP_CS_Utility::_e("Author URL") ?>
203
- </th>
204
- <td>
205
- <div class="compound-setting">
206
- <input class="long-input" name="author_url" type="text" value="<?php echo $config->author_url; ?>" />
207
- <div><span class="description"><?php EZP_CS_Utility::_e('Google+ or other identifying URL'); ?></span></div>
208
- </div>
209
- </td>
210
- </tr>
211
- <tr>
212
- <th scope="row">
213
- <?php echo EZP_CS_Utility::_e("Meta Description") ?>
214
- </th>
215
- <td>
216
- <div class="compound-setting">
217
- <textarea rows="5" cols="60" name="meta_description" type="text" ><?php echo EZP_CS_Utility::_he($config->meta_description); ?></textarea>
218
- </div>
219
- </td>
220
- </tr>
221
- <tr>
222
- <th scope="row">
223
- <?php echo EZP_CS_Utility::_e("Meta Keywords") ?>
224
- </th>
225
- <td>
226
- <div class="compound-setting">
227
- <input class="long-input" name="meta_keywords" type="text" value="<?php echo $config->meta_keywords; ?>" />
228
- <div><span class="description"><?php EZP_CS_Utility::_e('Comma separated list'); ?></span></div>
229
- </div>
230
- </td>
231
- </tr>
232
- <tr>
233
- <th scope="row">
234
- <?php echo EZP_CS_Utility::_e("Analytics Code") ?>
235
- </th>
236
- <td>
237
- <div class="compound-setting">
238
- <textarea rows="5" cols="60" name="analytics_code" type="text" ><?php echo EZP_CS_Utility::_he($config->analytics_code); ?></textarea>
239
- <div><span class="description"><?php echo EZP_CS_Utility::__('Analytics tracking code') . ' (' . EZP_CS_Utility::__('include') . '&lt;script&gt;&lt;/script&gt;)'; ?></span></div>
240
- </div>
241
- </td>
242
- </tr>
243
- </table>
244
- </div>
245
- </div>
246
-
247
- <div class="postbox" >
248
- <div class="inside" >
249
- <h3><?php EZP_CS_Utility::_e("Access") ?></h3>
250
- <table class="form-table">
251
- <tr>
252
- <th scope="row">
253
- <?php echo EZP_CS_Utility::_e("Unfiltered URLs") ?>
254
- </th>
255
- <td>
256
- <div class="compound-setting">
257
- <textarea rows="5" cols="60" name="unfiltered_urls" type="text" ><?php echo $config->unfiltered_urls; ?></textarea>
258
- <div><span class="description"><?php EZP_CS_Utility::_e('Each line should contain a relative URL you don\'t want the page shown on (e.g. for http://mysite.com/mypage enter /mypage)'); ?></span></div>
259
- </div>
260
- </td>
261
- </tr>
262
- <tr>
263
- <td style="padding-left:0; padding-bottom:0;" colspan="2">
264
- <small>Grant access by IP or special URL with <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
265
- </td>
266
- </tr>
267
- </table>
268
- </div>
269
- </div>
270
 
271
  <?php
272
  submit_button();
273
  ?>
274
- <a href="https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/" target="_blank"><?php EZP_CS_Utility::_e('FAQ'); ?></a>
275
- |
276
- <a href="https://wordpress.org/support/plugin/easy-pie-coming-soon/reviews/" target="_blank"><?php echo EZP_CS_Utility::__('Rate'); ?></a>
277
- |
278
- <a href="https://snapcreek.com/support/" target="_blank"><?php EZP_CS_Utility::_e('Contact') ?></a>
279
- </form>
280
  </div>
 
281
  </div>
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  <style lang="text/css">
3
  .compound-setting { line-height:20px;}
4
  .narrow-input { width:66px;}
5
  .long-input { width: 345px;}
6
+ .postbox .inside {margin-bottom: 6px}
7
+ .form-table th{padding: 8px 8px 8px 25px}
8
+ .form-table td{padding: 3px 0 3px 0}
9
  </style>
10
 
11
  <div class="wrap">
12
+ <?php screen_icon(EZP_CS_Constants::PLUGIN_SLUG); ?>
13
+ <h2><?php EZP_CS_Utility::_e('Settings') ?></h2>
14
+
15
+ <form id="easy-pie-cs-main-form" method="post" action="<?php echo admin_url('admin.php?page=' . EZP_CS_Constants::$SETTINGS_SUBMENU_SLUG); ?>" >
16
+
17
 
 
 
18
  <?php
19
  if (isset($_GET['settings-updated']))
20
  {
22
  }
23
  ?>
24
  <div id="easypie-cs-options" class="inside">
25
+
26
+ <?php
27
+ $action_updated = null;
28
+ $global = EZP_CS_Global_Entity::get_instance();
29
+ $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
30
+ $error_string = "";
31
+
32
+ if (isset($_POST['action']) && $_POST['action'] == 'save')
33
+ {
34
+ check_admin_referer('easy-pie-coming-soon-save-settings');
35
+
36
+ // Artificially set the bools since they aren't part of the postback
37
+ $config->collect_email = false;
38
+ $config->collect_name = false;
39
+
40
+ $error_string = $config->set_post_variables($_POST);
41
+ if ($error_string == "")
42
+ {
43
+ $config->fix_url_fields();
44
+ $action_updated = $config->save();
45
+ }
46
+ }
47
+ ?>
48
+
49
+ <?php wp_nonce_field('easy-pie-coming-soon-save-settings'); ?>
50
+ <input type="hidden" name="action" value="save"/>
51
+ <?php if ($error_string != "") : ?>
52
+ <div id="message" class="error below-h2"><p><?php echo EZP_CS_Utility::__('Errors present:') . "<br/> $error_string" ?></p></div>
53
+ <?php endif; ?>
54
+
55
+ <?php if ($action_updated) : ?>
56
+ <div id="message" class="updated below-h2">
57
+ <p><span><?php echo EZP_CS_Utility::__('Settings Saved.'); ?></span><strong style="margin-left:7px;"><?php echo ' ' . EZP_CS_Utility::__('If you have a caching plugin be sure to clear it.'); ?></strong></p>
58
+ </div>
59
+ <?php endif; ?>
60
+
61
+ <!-- ===================================
62
+ BASIC -->
63
+ <div class="postbox" style="margin-top:10px;">
64
+ <div class="inside">
65
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Basic") ?></h3>
66
+ <table class="form-table">
67
+ <tr>
68
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Status") ?></th>
69
+ <td>
70
+ <input type="radio" name="coming_soon_mode_on" value="true" <?php echo $config->coming_soon_mode_on ? 'checked' : ''; ?>/><span><?php echo EZP_CS_Utility::__('On'); ?></span>
71
+ <input type="radio" name="coming_soon_mode_on" value="" <?php echo $config->coming_soon_mode_on ? '' : 'checked'; ?>/><span><?php echo EZP_CS_Utility::__('Off'); ?></span>
72
+ </td>
73
+ </tr>
74
+ </table>
75
+
76
+ <!-- COLLECTION-->
77
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("COLLECTION") ?></div>
78
+ <table class="form-table">
79
+ <tr>
80
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Collect Email") ?></th>
81
+ <td>
82
+ <input type="checkbox" name="collect_email" <?php echo $config->collect_email ? 'checked' : ''; ?> />
83
+ <span><?php EZP_CS_Utility::_e("Yes") ?></span>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Collect Name") ?></th>
88
+ <td>
89
+ <div class="compound-setting">
90
+ <input type="checkbox" name="collect_name" <?php echo $config->collect_name ? 'checked' : ''; ?> />
91
+ <span><?php EZP_CS_Utility::_e("Yes") ?></span>
92
+ </div>
93
+ </td>
94
+ </tr>
95
+ </table>
96
+
97
+ <!-- SOCIAL-->
98
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("SOCIAL") ?></div>
99
+ <table class="form-table">
100
+ <tr>
101
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Facebook URL") ?></th>
102
+ <td><input class="long-input" name="facebook_url" type="text" value="<?php echo $config->facebook_url; ?>" /></td>
103
+ </tr>
104
+ <tr>
105
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Google Plus URL") ?></th>
106
+ <td><input class="long-input" name="google_plus_url" type="text" value="<?php echo $config->google_plus_url; ?>" /></td>
107
+ </tr>
108
+ <tr>
109
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Twitter URL") ?></th>
110
+ <td>
111
+ <input class="long-input" name="twitter_url" type="text" value="<?php echo $config->twitter_url; ?>" /><br/>
112
+ <small>Get more social icons with <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
113
+ </td>
114
+ </tr>
115
+ </table>
116
+
117
+ </div>
118
+ </div>
119
+
120
+
121
+ <!-- ===================================
122
+ ADVANCED -->
123
+ <div class="postbox" style="margin-top:10px;">
124
+ <div class="inside">
125
+ <h3 class="ezp-cspe-subtitle"><?php EZP_CS_Utility::_e("Advanced") ?></h3>
126
+
127
+ <!-- HTTP -->
128
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("HTTP") ?></div>
129
+ <table class="form-table">
130
+ <tr>
131
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Return Code") ?></th>
132
+ <td>
133
+ <input type="radio" name="return_code" value="200" <?php echo $config->return_code == 200 ? 'checked' : ''; ?> /><?php echo EZP_CS_Utility::_e("200") ?>
134
+ <input type="radio" name="return_code" value="503" <?php echo $config->return_code == 503 ? 'checked' : ''; ?> /><?php echo EZP_CS_Utility::_e("503") ?>
135
+ </td>
136
+ </tr>
137
+ </table>
138
+
139
+
140
+ <!-- SEO -->
141
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("SEO") ?></div>
142
+ <table class="form-table">
143
+ <tr>
144
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Author URL") ?></th>
145
+ <td>
146
+ <input class="long-input" name="author_url" type="text" value="<?php echo $config->author_url; ?>" />
147
+ <div><span class="description"><?php EZP_CS_Utility::_e('Google+ or other identifying URL'); ?></span></div>
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Meta Description") ?></th>
152
+ <td>
153
+ <textarea rows="5" cols="60" name="meta_description"><?php echo EZP_CS_Utility::_he($config->meta_description); ?></textarea>
154
+ </td>
155
+ </tr>
156
+ <tr>
157
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Meta Keywords") ?></th>
158
+ <td>
159
+ <input class="long-input" name="meta_keywords" type="text" value="<?php echo $config->meta_keywords; ?>" />
160
+ <div><span class="description"><?php EZP_CS_Utility::_e('Comma separated list'); ?></span></div>
161
+ </td>
162
+ </tr>
163
+ <tr>
164
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Analytics Code") ?></th>
165
+ <td>
166
+ <textarea rows="5" cols="60" name="analytics_code"><?php echo EZP_CS_Utility::_he($config->analytics_code); ?></textarea>
167
+ <div><span class="description"><?php echo EZP_CS_Utility::__('Analytics tracking code') . ' (' . EZP_CS_Utility::__('include') . '&lt;script&gt;&lt;/script&gt;)'; ?></span></div>
168
+ </td>
169
+ </tr>
170
+ </table>
171
+
172
+
173
+ <!-- ACCESS -->
174
+ <div class="ezp-cspe-subtitle2" style="margin-top:15px"><?php EZP_CS_Utility::_e("ACCESS") ?></div>
175
+ <table class="form-table">
176
+ <tr>
177
+ <th scope="row"><?php echo EZP_CS_Utility::_e("Unfiltered URLs") ?></th>
178
+ <td>
179
+ <textarea rows="5" cols="60" name="unfiltered_urls"><?php echo $config->unfiltered_urls; ?></textarea>
180
+ <div><span class="description"><?php EZP_CS_Utility::_e('Each line should contain a relative URL you don\'t want the page shown on (e.g. for http://mysite.com/mypage enter /mypage)'); ?></span></div>
181
+ <br/>
182
+ <small>Grant access by IP or special URL with <a style="color:#DC3232" href="https://snapcreek.com/ezp-coming-soon/" target="_blank">Coming Soon Page Elite</a></small>
183
+ </td>
184
+ </tr>
185
+ </table>
186
+ </div>
187
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
  <?php
190
  submit_button();
191
  ?>
192
+ <a href="https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/" target="_blank"><?php EZP_CS_Utility::_e('FAQ'); ?></a> |
193
+ <a href="https://wordpress.org/support/plugin/easy-pie-coming-soon/reviews/" target="_blank"><?php echo EZP_CS_Utility::__('Rate'); ?></a> |
194
+ <a href="https://snapcreek.com/support/" target="_blank"><?php EZP_CS_Utility::_e('Contact') ?></a>
195
+
 
 
196
  </div>
197
+ </form>
198
  </div>
199
 
pages/page-options.php CHANGED
@@ -1,26 +1,4 @@
1
  <?php
2
- /*
3
- Easy Pie Coming Soon Plugin
4
- Copyright (C) 2016, Snap Creek LLC
5
- website: snapcreek.com contact: support@snapcreek.com
6
-
7
- Easy Pie Coming Soon Plugin is distributed under the GNU General Public License, Version 3,
8
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
9
- St, Fifth Floor, Boston, MA 02110, USA
10
-
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
15
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
- */
22
- ?>
23
- <?php
24
 
25
  if (isset($_GET['tab'])) {
26
 
@@ -35,6 +13,11 @@ if (isset($_GET['tab'])) {
35
  $active_tab = 'display';
36
  }
37
  ?>
 
 
 
 
 
38
 
39
  <script type="text/javascript" src='<?php echo EZP_CS_Utility::$PLUGIN_URL . "/js/page-options-$active_tab-tab.js?" . EZP_CS_Constants::PLUGIN_VERSION; ?>'></script>
40
 
@@ -42,36 +25,32 @@ if (isset($_GET['tab'])) {
42
  .compound-setting { line-height:20px;}
43
  .narrow-input { width:66px;}
44
  .long-input { width: 345px;}
 
 
 
45
  </style>
46
 
47
  <div class="wrap">
48
 
49
  <?php screen_icon(EZP_CS_Constants::PLUGIN_SLUG); ?>
50
- <h2>EZP Coming Soon: <?php EZP_CS_Utility::_e('Template'); ?></h2>
51
  <?php
52
  if (isset($_GET['settings-updated'])) {
53
  echo "<div class='updated'><p>" . EZP_CS_Utility::__('If you have a caching plugin, be sure to clear the cache!') . "</p></div>";
54
  }
55
 
56
  $global = EZP_CS_Global_Entity::get_instance();
57
-
58
  $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
59
 
60
- // EZP_CS_Utility::display_admin_notice($config->coming_soon_mode_on);
61
  ?>
62
 
63
  <div id="easypie-cs-options" class="inside">
64
  <h2 class="nav-tab-wrapper">
65
- <a href="?page=<?php echo EZP_CS_Constants::PLUGIN_SLUG . '&tab=display' ?>" class="nav-tab <?php echo $active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Display'); ?></a>
66
- <a href="?page=<?php echo EZP_CS_Constants::PLUGIN_SLUG . '&tab=content' ?>" class="nav-tab <?php echo $active_tab == 'content' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Content'); ?></a>
67
  <a href="?page=<?php echo EZP_CS_Constants::PLUGIN_SLUG . '&tab=preview' ?>" class="nav-tab <?php echo $active_tab == 'preview' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Preview'); ?></a>
68
  </h2>
69
- <form id="easy-pie-cs-main-form" method="post" action="<?php echo admin_url('admin.php?page=' . EZP_CS_Constants::PLUGIN_SLUG . '&tab=' . $active_tab); ?>" >
70
- <?php
71
- // settings_fields(EZP_CS_Constants::MAIN_PAGE_KEY);
72
- //do_settings_sections(EZP_CS_Constants::MAIN_PAGE_KEY);
73
-
74
- ?>
75
  <div id='tab-holder'>
76
  <?php
77
  if ($active_tab == 'display') {
@@ -84,10 +63,10 @@ if (isset($_GET['tab'])) {
84
 
85
  if (isset($_POST['ezp-cs-submit-type']) && ($_POST['ezp-cs-submit-type'] == 'preview') ){
86
 
87
- $redirect_url = '?page=' . EZP_CS_Constants::PLUGIN_SLUG . '&tab=preview';
88
 
89
  echo '<script>'
90
- . 'window.location="' . $redirect_url . '";'
91
  . '</script>';
92
  }
93
 
@@ -98,14 +77,12 @@ if (isset($_GET['tab'])) {
98
  <input type="hidden" id="ezp-cs-submit-type" name="ezp-cs-submit-type" value="save"/>
99
 
100
  <p>
101
- <input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes" />
102
- <input style="margin-left:15px" type="submit" name="submit" id="submit" class="button button-primary" value="Save & Preview" onclick="document.getElementById('ezp-cs-submit-type').value = 'preview';debugger;return true;"/>
103
  </p>
104
 
105
- <a href="https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/" target="_blank"><?php EZP_CS_Utility::_e('FAQ'); ?></a>
106
- |
107
- <a href="https://wordpress.org/support/plugin/easy-pie-coming-soon/reviews/" target="_blank"><?php echo EZP_CS_Utility::__('Rate'); ?></a>
108
- |
109
  <a href="https://snapcreek.com/support/" target="_blank"><?php EZP_CS_Utility::_e('Contact') ?></a>
110
  </form>
111
  </div>
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  if (isset($_GET['tab'])) {
4
 
13
  $active_tab = 'display';
14
  }
15
  ?>
16
+ <script type="text/javascript">
17
+ easyPie = {};
18
+ easyPie.CS = {};
19
+ easyPie.CS.Options = {};
20
+ </script>
21
 
22
  <script type="text/javascript" src='<?php echo EZP_CS_Utility::$PLUGIN_URL . "/js/page-options-$active_tab-tab.js?" . EZP_CS_Constants::PLUGIN_VERSION; ?>'></script>
23
 
25
  .compound-setting { line-height:20px;}
26
  .narrow-input { width:66px;}
27
  .long-input { width: 345px;}
28
+ .postbox .inside {margin-bottom: 6px}
29
+ .form-table th{padding: 8px 8px 8px 25px}
30
+ .form-table td{padding: 3px 0 3px 0}
31
  </style>
32
 
33
  <div class="wrap">
34
 
35
  <?php screen_icon(EZP_CS_Constants::PLUGIN_SLUG); ?>
36
+ <h2><?php EZP_CS_Utility::_e('Template'); ?></h2>
37
  <?php
38
  if (isset($_GET['settings-updated'])) {
39
  echo "<div class='updated'><p>" . EZP_CS_Utility::__('If you have a caching plugin, be sure to clear the cache!') . "</p></div>";
40
  }
41
 
42
  $global = EZP_CS_Global_Entity::get_instance();
 
43
  $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
44
 
 
45
  ?>
46
 
47
  <div id="easypie-cs-options" class="inside">
48
  <h2 class="nav-tab-wrapper">
49
+ <a href="?page=<?php echo EZP_CS_Constants::PLUGIN_SLUG . '&tab=display' ?>" class="nav-tab <?php echo $active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Style'); ?></a>
50
+ <a href="?page=<?php echo EZP_CS_Constants::PLUGIN_SLUG . '&tab=content' ?>" class="nav-tab <?php echo $active_tab == 'content' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Text'); ?></a>
51
  <a href="?page=<?php echo EZP_CS_Constants::PLUGIN_SLUG . '&tab=preview' ?>" class="nav-tab <?php echo $active_tab == 'preview' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Preview'); ?></a>
52
  </h2>
53
+ <form id="easy-pie-cs-main-form" method="post" action="<?php echo admin_url('admin.php?page=' . EZP_CS_Constants::PLUGIN_SLUG . '&tab=' . $active_tab); ?>" >
 
 
 
 
 
54
  <div id='tab-holder'>
55
  <?php
56
  if ($active_tab == 'display') {
63
 
64
  if (isset($_POST['ezp-cs-submit-type']) && ($_POST['ezp-cs-submit-type'] == 'preview') ){
65
 
66
+ $preview_url = '?page=' . EZP_CS_Constants::PLUGIN_SLUG . '&tab=preview';
67
 
68
  echo '<script>'
69
+ . 'window.location="' . $preview_url . '";'
70
  . '</script>';
71
  }
72
 
77
  <input type="hidden" id="ezp-cs-submit-type" name="ezp-cs-submit-type" value="save"/>
78
 
79
  <p>
80
+ <input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes" />&nbsp;
81
+ <input type="submit" name="submit" id="submit" class="button button-primary" value="Save & Preview" onclick="document.getElementById('ezp-cs-submit-type').value = 'preview';debugger;return true;"/>
82
  </p>
83
 
84
+ <a href="https://snapcreek.com/ezp-coming-soon/docs/faqs-tech/" target="_blank"><?php EZP_CS_Utility::_e('FAQ'); ?></a> |
85
+ <a href="https://wordpress.org/support/plugin/easy-pie-coming-soon/reviews/" target="_blank"><?php echo EZP_CS_Utility::__('Rate'); ?></a> |
 
 
86
  <a href="https://snapcreek.com/support/" target="_blank"><?php EZP_CS_Utility::_e('Contact') ?></a>
87
  </form>
88
  </div>
pages/page-subscribers.php CHANGED
@@ -1,37 +1,12 @@
1
  <?php
2
- /*
3
- Easy Pie Coming Soon Plugin
4
- Copyright (C) 2016, Snap Creek LLC
5
- website: snapcreek.com contact: support@snapcreek.com
6
-
7
- Easy Pie Coming Soon Plugin is distributed under the GNU General Public License, Version 3,
8
- June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
9
- St, Fifth Floor, Boston, MA 02110, USA
10
-
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
15
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
- */
22
- ?>
23
- <?php
24
  if (isset($_GET['tab'])) {
25
-
26
  $active_tab = $_GET['tab'];
27
-
28
  if(($active_tab != '') && ($active_tab != 'list') && ($active_tab != 'newsletter'))
29
  {
30
  echo 'Invalid request';
31
  die();
32
  }
33
  } else {
34
-
35
  $active_tab = 'list';
36
  }
37
  ?>
@@ -47,14 +22,10 @@ if (isset($_GET['tab'])) {
47
  <div class="wrap">
48
 
49
  <?php screen_icon(EZP_CS_Constants::PLUGIN_SLUG); ?>
50
- <h2>EZP Coming Soon: <?php EZP_CS_Utility::_e('Subscriber Management'); ?></h2>
51
  <?php
52
-
53
  $global = EZP_CS_Global_Entity::get_instance();
54
-
55
  $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
56
-
57
- // EZP_CS_Utility::display_admin_notice($config->coming_soon_mode_on);
58
  ?>
59
 
60
  <div id="easypie-cs-options" class="inside">
@@ -63,11 +34,6 @@ if (isset($_GET['tab'])) {
63
  <a href="?page=<?php echo EZP_CS_Constants::$SUBSCRIBERS_SUBMENU_SLUG . '&tab=newsletter' ?>" class="nav-tab <?php echo $active_tab == 'newsletter' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Create Newsletter'); ?></a>
64
  </h2>
65
  <form id="easy-pie-cs-main-form" method="post" action="<?php echo admin_url('admin.php?page=' . EZP_CS_Constants::$SUBSCRIBERS_SUBMENU_SLUG . '&tab=' . $active_tab); ?>" >
66
- <?php
67
- // settings_fields(EZP_CS_Constants::MAIN_PAGE_KEY);
68
- //do_settings_sections(EZP_CS_Constants::MAIN_PAGE_KEY);
69
-
70
- ?>
71
  <div id='tab-holder'>
72
  <?php
73
  if ($active_tab == 'list') {
@@ -82,9 +48,6 @@ if (isset($_GET['tab'])) {
82
 
83
  <?php EZP_CS_Utility::echo_footer_links(); ?>
84
  </form>
85
-
86
-
87
-
88
  </div>
89
  </div>
90
 
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  if (isset($_GET['tab'])) {
 
3
  $active_tab = $_GET['tab'];
 
4
  if(($active_tab != '') && ($active_tab != 'list') && ($active_tab != 'newsletter'))
5
  {
6
  echo 'Invalid request';
7
  die();
8
  }
9
  } else {
 
10
  $active_tab = 'list';
11
  }
12
  ?>
22
  <div class="wrap">
23
 
24
  <?php screen_icon(EZP_CS_Constants::PLUGIN_SLUG); ?>
25
+ <h2><?php EZP_CS_Utility::_e('Subscriber Management'); ?></h2>
26
  <?php
 
27
  $global = EZP_CS_Global_Entity::get_instance();
 
28
  $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
 
 
29
  ?>
30
 
31
  <div id="easypie-cs-options" class="inside">
34
  <a href="?page=<?php echo EZP_CS_Constants::$SUBSCRIBERS_SUBMENU_SLUG . '&tab=newsletter' ?>" class="nav-tab <?php echo $active_tab == 'newsletter' ? 'nav-tab-active' : ''; ?>"><?php EZP_CS_Utility::_e('Create Newsletter'); ?></a>
35
  </h2>
36
  <form id="easy-pie-cs-main-form" method="post" action="<?php echo admin_url('admin.php?page=' . EZP_CS_Constants::$SUBSCRIBERS_SUBMENU_SLUG . '&tab=' . $active_tab); ?>" >
 
 
 
 
 
37
  <div id='tab-holder'>
38
  <?php
39
  if ($active_tab == 'list') {
48
 
49
  <?php EZP_CS_Utility::echo_footer_links(); ?>
50
  </form>
 
 
 
51
  </div>
52
  </div>
53
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === EZP Coming Soon Page ===
2
  Contributors: bobriley, corylamleorg
3
  Donate link: http://easypiewp.com/donate/
4
- Tags: coming soon, coming soon page, construction, landing page, launch, launch page, maintenance, maintenance mode, offline, unavailable, under construction, underconstruction, wordpress coming soon, wordpress maintenance mode, wordpress under construction
5
  Requires at least: 3.5
6
  Tested up to: 4.6.1
7
- Stable tag: 1.0.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -12,12 +12,15 @@ EZP Coming Soon Page lets visitors know that your website is 'Coming Soon' while
12
 
13
  == Description ==
14
 
15
- Let your visitors know your site is Coming Soon while gathering their contact information.
16
 
17
- ### Basic Features
 
 
18
  * Professional look
19
  * Highly customizable
20
- * Fully Responsive
 
21
  * Optional countdown timer
22
  * No HTML required
23
  * CSS customizable but not required
@@ -33,11 +36,11 @@ Let your visitors know your site is Coming Soon while gathering their contact in
33
  * Choose either a 503 or 200 HTTP status when in Coming Soon mode
34
  * Selectively disable Coming Soon Page on certain URLs
35
 
36
- ### Advanced Features
37
- * Export email addresses gathered by EZP Coming Soon Page to CSV for compatibility with **MailChimp**, **AWeber** and other major email providers.
38
 
39
  ### Need More? Go Elite!
40
- Take things to the next level with [Coming Soon Page Elite](https://snapcreek.com/ezp-coming-soon/) where you get everything and the following great features:
 
 
41
 
42
  * Fullscreen video
43
  * Google Fonts & Effects
@@ -84,14 +87,17 @@ For the FAQ on EZP Coming Soon Page please visit the [Snap Creek Website](https:
84
 
85
  == Screenshots ==
86
 
87
- 1. Example Coming Soon page
88
- 2. Display configuration
89
- 3. Content configuration
90
- 4. Settings
91
- 5. Subscriber list
92
 
93
  == Changelog ==
94
 
 
 
 
95
  = 1.0.4 =
96
  * Switched home website from easypiewp.com to snapcreek.com
97
 
@@ -153,6 +159,9 @@ For the FAQ on EZP Coming Soon Page please visit the [Snap Creek Website](https:
153
 
154
  == Upgrade Notice ==
155
 
 
 
 
156
  = 1.0.4 =
157
  * Switched home website from easypiewp.com to snapcreek.com
158
 
1
  === EZP Coming Soon Page ===
2
  Contributors: bobriley, corylamleorg
3
  Donate link: http://easypiewp.com/donate/
4
+ Tags: admin, admin maintenance, maintenance page, coming soon, coming soon page, squeeze page, landing page, launch, launch page, maintenance, maintenance mode, offline, unavailable, under construction, underconstruction, wordpress coming soon, wordpress maintenance mode, wordpress under construction, easypie, easy pie
5
  Requires at least: 3.5
6
  Tested up to: 4.6.1
7
+ Stable tag: 1.0.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ EZP Coming Soon Page looks great and tells visitors your site is coming soon - while you gather contact information. The plugin has been streamlined for use so you'll go from having nothing to a fully functioning coming soon page collecting emails within minutes.
16
 
17
+ Don't skimp on your important website launch. Get EZP Coming Soon Page today!
18
+
19
+ ### Features
20
  * Professional look
21
  * Highly customizable
22
+ * Fully responsive
23
+ * Export email addresses to **MailChimp**, **AWeber** and other email providers.
24
  * Optional countdown timer
25
  * No HTML required
26
  * CSS customizable but not required
36
  * Choose either a 503 or 200 HTTP status when in Coming Soon mode
37
  * Selectively disable Coming Soon Page on certain URLs
38
 
 
 
39
 
40
  ### Need More? Go Elite!
41
+ To take things to the next level, check out [Coming Soon Page Elite](https://snapcreek.com/ezp-coming-soon/). We've taken the core EZP Coming Soon Page and added professional level features.
42
+
43
+ With Coming Soon Page Elite, you'll get everything above plus:
44
 
45
  * Fullscreen video
46
  * Google Fonts & Effects
87
 
88
  == Screenshots ==
89
 
90
+ 1. Example Coming Soon Page
91
+ 2. Example Coming Soon Page
92
+ 3. Example Coming Soon Page
93
+ 4. Display Settings
94
+ 5. Subscriber List
95
 
96
  == Changelog ==
97
 
98
+ = 1.0.5 =
99
+ * Made UI easier to use
100
+
101
  = 1.0.4 =
102
  * Switched home website from easypiewp.com to snapcreek.com
103
 
159
 
160
  == Upgrade Notice ==
161
 
162
+ = 1.0.5 =
163
+ * Made UI easier to use
164
+
165
  = 1.0.4 =
166
  * Switched home website from easypiewp.com to snapcreek.com
167
 
styles/easy-pie-cs-common-admin-styles.css CHANGED
@@ -7,4 +7,8 @@
7
  .easy-pie-cs-on > a:hover {
8
  background-color: black!important;
9
  color: #00b9eb!important;
10
- }
 
 
 
 
7
  .easy-pie-cs-on > a:hover {
8
  background-color: black!important;
9
  color: #00b9eb!important;
10
+ }
11
+
12
+ /*Section Titles*/
13
+ h3.ezp-cspe-subtitle {border-bottom: 1px solid #dfdfdf; padding:0 0 6px 8px; margin:-3px 0 0 -10px; font-size:19px; font-weight: bold }
14
+ div.ezp-cspe-subtitle2 { font-weight: bold; font-size:15px; margin-top:25px}