Postie - Version 1.7.13

Version Description

(2015-10-01) = * Fix support for "Automatically convert urls to links" with html * Fix support for "date" tag with html * Prep for upcoming translation

Download this release

Release Info

Developer WayneAllen
Plugin Icon 128x128 Postie
Version 1.7.13
Comparing to
See all releases

Code changes from version 1.7.12 to 1.7.13

Files changed (7) hide show
  1. config_form.php +137 -137
  2. deploy/deploy.sh +1 -0
  3. docs/Changes.txt +6 -1
  4. docs/Postie.txt +2 -3
  5. postie-functions.php +48 -62
  6. postie.php +20 -20
  7. readme.txt +8 -4
config_form.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="wrap">
2
  <div style="float:right; width: 220px; border: 1px solid darkgrey; padding:2px;border-radius:10px;margin-left: 10px;" >
3
- <p class="" style="text-align:center;font-weight: bolder; margin-top: 0px; margin-bottom: 2px;"><?php _e("Please Donate, Every $ Helps!", POSTIE_SLUG); ?></p>
4
- <p style="margin-top: 0;margin-bottom: 2px;"><?php _e("Your generous donation allows me to continue developing Postie for the WordPress community.", POSTIE_SLUG); ?></p>
5
  <form style="" action="https://www.paypal.com/cgi-bin/webscr" method="post">
6
  <input type="hidden" name="cmd" value="_s-xclick">
7
  <input type="hidden" name="hosted_button_id" value="HPK99BJ88V4C2">
@@ -14,10 +14,10 @@
14
  <a style='text-decoration:none' href='admin.php?page=postie-settings'>
15
  <?php
16
  echo '<img src="' . plugins_url('images/mail.png', __FILE__) . '" alt="postie" />';
17
- _e('Postie Settings', POSTIE_SLUG);
18
  ?>
19
  </a>
20
- <span class="description">(v<?php _e(POSTIE_VERSION, POSTIE_SLUG); ?>)</span>
21
  </h2>
22
 
23
  <?php
@@ -37,12 +37,12 @@
37
  exit;
38
  break;
39
  case "runpostie":
40
- EchoInfo(__("Checking for mail manually", POSTIE_SLUG));
41
  postie_get_mail();
42
  exit;
43
  break;
44
  case "runpostie-debug":
45
- EchoInfo(__("Checking for mail manually with debug output", POSTIE_SLUG));
46
  if (!defined('POSTIE_DEBUG')) {
47
  define('POSTIE_DEBUG', true);
48
  }
@@ -71,7 +71,7 @@
71
  }
72
  extract($config);
73
  if (!isset($maxemails)) {
74
- EchoInfo(__("New setting: maxemails", POSTIE_SLUG));
75
  $maxemails = 0;
76
  }
77
  if (!isset($category_match)) {
@@ -82,27 +82,27 @@
82
  wp_clear_scheduled_hook('check_postie_hook');
83
  }
84
 
85
- $messages[1] = __("Configuration successfully updated!", POSTIE_SLUG);
86
- $messages[2] = __("Error - unable to save configuration", POSTIE_SLUG);
87
  ?>
88
  <?php if (isset($_GET['message'])) : ?>
89
- <div class="updated"><p><?php _e($messages[$_GET['message']], POSTIE_SLUG); ?></p></div>
90
  <?php endif; ?>
91
 
92
  <form name="postie-options" method='post'>
93
  <input type="hidden" name="action" value="runpostie" />
94
- <input name="Submit" value="<?php _e("Run Postie", POSTIE_SLUG); ?> &raquo;" type="submit" class='button'>
95
- <?php _e("(To run the check mail script manually)", POSTIE_SLUG); ?>
96
  </form>
97
  <form name="postie-options" method='post'>
98
  <input type="hidden" name="action" value="runpostie-debug" />
99
- <input name="Submit" value="<?php _e("Run Postie (Debug)", POSTIE_SLUG); ?> &raquo;" type="submit" class='button'>
100
- <?php _e("(To run the check mail script manually with full debug output)", POSTIE_SLUG); ?>
101
  </form>
102
  <form name="postie-options" method="post">
103
  <input type="hidden" name="action" value="test" />
104
- <input name="Submit" value="<?php _e("Test Config", POSTIE_SLUG); ?>&raquo;" type="submit" class='button'>
105
- <?php _e("this will check your configuration options", POSTIE_SLUG); ?>
106
  </form>
107
 
108
  <form name="postie-options" method="post" action='options.php' autocomplete="off">
@@ -115,20 +115,20 @@
115
  <div id="simpleTabs">
116
  <div class="simpleTabs-nav">
117
  <ul>
118
- <li id="simpleTabs-nav-1"><?php _e('Mailserver', POSTIE_SLUG) ?></li>
119
- <li id="simpleTabs-nav-2"><?php _e('User', POSTIE_SLUG) ?></li>
120
- <li id="simpleTabs-nav-3"><?php _e('Message', POSTIE_SLUG) ?></li>
121
- <li id="simpleTabs-nav-4"><?php _e('Image', POSTIE_SLUG) ?></li>
122
- <li id="simpleTabs-nav-5"><?php _e('Video and Audio', POSTIE_SLUG) ?></li>
123
- <li id="simpleTabs-nav-6"><?php _e('Attachments', POSTIE_SLUG) ?></li>
124
- <li id="simpleTabs-nav-7"><?php _e('Support', POSTIE_SLUG) ?></li>
125
  </ul>
126
  </div>
127
  <div id="simpleTabs-content-1" class="simpleTabs-content">
128
  <table class='form-table'>
129
 
130
  <tr>
131
- <th scope="row"><lable for="postie-settings-input_protocol"><?php _e('Mail Protocol', POSTIE_SLUG) ?></lable></th>
132
  <td>
133
  <select name='postie-settings[input_protocol]' id='postie-settings-input_protocol'>
134
  <option value="pop3" <?php echo (($input_protocol == "pop3") ? " selected='selected' " : "") ?>>POP3</option>
@@ -144,45 +144,45 @@
144
  </td>
145
  </tr>
146
 
147
- <?php echo BuildBooleanSelect(__("Use Transport Layer Security (TLS)", POSTIE_SLUG), 'postie-settings[email_tls]', $email_tls, __("Choose Yes if your server requires TLS", POSTIE_SLUG)); ?>
148
 
149
  <tr>
150
- <th scope="row"><label for="postie-settings-mail_server_port"><?php _e('Port', POSTIE_SLUG) ?></label></th>
151
  <td valign="top">
152
  <input name='postie-settings[mail_server_port]' style="width: 70px;" type="number" min="0" id='postie-settings-mail_server_port' value="<?php echo esc_attr($mail_server_port); ?>" size="6" />
153
- <p class='description'><?php _e("Standard Ports:", POSTIE_SLUG); ?><br />
154
- <?php _e("POP3", POSTIE_SLUG); ?> - 110<br />
155
- <?php _e("IMAP", POSTIE_SLUG); ?> - 143<br />
156
- <?php _e("IMAP-SSL", POSTIE_SLUG); ?>- 993 <br />
157
- <?php _e("POP3-SSL", POSTIE_SLUG); ?> - 995 <br />
158
  </p>
159
  </td>
160
  </tr>
161
  <tr valign="top">
162
- <th scope="row"><?php _e('Mail Server', POSTIE_SLUG) ?></th>
163
  <td><input name='postie-settings[mail_server]' type="text" id='postie-settings-mail_server' value="<?php echo esc_attr($mail_server); ?>" size="40" />
164
  </td>
165
  </tr>
166
  <tr valign="top">
167
- <th scope="row"><?php _e('Mail Userid', POSTIE_SLUG) ?></th>
168
  <td><input name='postie-settings[mail_userid]' type="text" id='postie-settings-mail_userid' autocomplete='off' value="<?php echo esc_attr($mail_userid); ?>" size="40" /></td>
169
  </tr>
170
  <tr valign="top">
171
- <th scope="row"><?php _e('Mail Password', POSTIE_SLUG) ?></th>
172
  <td>
173
  <input name='postie-settings[mail_password]' type="password" id='postie-settings-mail_password' autocomplete='off' value="<?php echo esc_attr($mail_password); ?>" size="40" />
174
  </td>
175
  </tr>
176
  <tr>
177
- <th scope="row"><?php _e('Postie Time Correction', POSTIE_SLUG) ?></th>
178
  <td><input style="width: 70px;" name='postie-settings[time_offset]' type="number" step="0.5" id='postie-settings-time_offset' size="2" value="<?php echo esc_attr($time_offset); ?>" />
179
- <?php _e('hours', POSTIE_SLUG) ?>
180
- <p class='description'><?php _e("Should be the same as your normal offset, but this lets you adjust it in cases where that doesn't work.", POSTIE_SLUG); ?></p>
181
  </td>
182
  </tr>
183
  <tr>
184
  <th>
185
- <?php _e('Check for mail every', POSTIE_SLUG) ?>:
186
  </th>
187
  <td>
188
  <select name='postie-settings[interval]' id='postie-settings-interval'>
@@ -190,81 +190,81 @@
190
  if ($interval == "weekly") {
191
  echo "selected='selected'";
192
  }
193
- ?>><?php _e('Once weekly', POSTIE_SLUG) ?>
194
  </option>
195
 
196
  <option value="daily"<?php
197
  if ($interval == "daily") {
198
  echo "selected='selected'";
199
  }
200
- ?>><?php _e('daily', POSTIE_SLUG) ?>
201
  </option>
202
 
203
  <option value="hourly" <?php
204
  if ($interval == "hourly") {
205
  echo "selected='selected'";
206
  }
207
- ?>><?php _e('hourly', POSTIE_SLUG) ?>
208
  </option>
209
 
210
  <option value="twiceperhour" <?php
211
  if ($interval == "twiceperhour") {
212
  echo "selected='selected'";
213
  }
214
- ?>><?php _e('twice per hour', POSTIE_SLUG) ?>
215
  </option>
216
 
217
  <option value="tenminutes" <?php
218
  if ($interval == "tenminutes") {
219
  echo "selected='selected'";
220
  }
221
- ?>><?php _e('every 10 minutes', POSTIE_SLUG) ?>
222
  </option>
223
 
224
  <option value="fiveminutes" <?php
225
  if ($interval == "fiveminutes") {
226
  echo "selected='selected'";
227
  }
228
- ?>><?php _e('every 5 minutes', POSTIE_SLUG) ?>
229
  </option>
230
 
231
  <option value="oneminute" <?php
232
  if ($interval == "oneminute") {
233
  echo "selected='selected'";
234
  }
235
- ?>><?php _e('every 1 minute', POSTIE_SLUG) ?>
236
  </option>
237
 
238
  <option value="thirtyseconds" <?php
239
  if ($interval == "thirtyseconds") {
240
  echo "selected='selected'";
241
  }
242
- ?>><?php _e('every 30 seconds', POSTIE_SLUG) ?>
243
  </option>
244
 
245
  <option value="fifteenseconds" <?php
246
  if ($interval == "fifteenseconds") {
247
  echo "selected='selected'";
248
  }
249
- ?>><?php _e('every 15 seconds', POSTIE_SLUG) ?>
250
  </option>
251
 
252
  <option value="manual" <?php
253
  if ($interval == "manual") {
254
  echo "selected='selected'";
255
  }
256
- ?>><?php _e('check manually', POSTIE_SLUG) ?>
257
  </option>
258
  </select>
259
  </td>
260
  </tr>
261
  <tr>
262
  <th>
263
- <?php _e('Maximum number of emails to process', POSTIE_SLUG); ?>
264
  </th>
265
  <td>
266
  <select name='postie-settings[maxemails]' id='postie-settings-maxemails'>
267
- <option value="0" <?php if ($maxemails == '0') echo "selected='selected'" ?>><?php _e('All', POSTIE_SLUG); ?></option>
268
  <option value="1" <?php if ($maxemails == '1') echo "selected='selected'" ?>>1</option>
269
  <option value="2" <?php if ($maxemails == '2') echo "selected='selected'" ?>>2</option>
270
  <option value="5" <?php if ($maxemails == '5') echo "selected='selected'" ?>>5</option>
@@ -274,20 +274,20 @@
274
  </select>
275
  </td>
276
  </tr>
277
- <?php echo BuildBooleanSelect(__("Delete email after posting", POSTIE_SLUG), 'postie-settings[delete_mail_after_processing]', $delete_mail_after_processing, __("Only set to no for testing purposes", POSTIE_SLUG)); ?>
278
- <?php echo BuildBooleanSelect(__("Ignore mail state", POSTIE_SLUG), 'postie-settings[ignore_mail_state]', $ignore_mail_state, __("Ignore whether the mails is 'read' or 'unread' If 'No' then only unread messages are processed.", POSTIE_SLUG)); ?>
279
- <?php echo BuildTextArea(__("Allowed SMTP servers", POSTIE_SLUG), "postie-settings[smtp]", $smtp, __("Only allow messages which have been sent throught the following SMTP servers. Put each server on a separate line. Leave blank to allow any SMTP server.", POSTIE_SLUG)); ?>
280
  </table>
281
  </div>
282
 
283
  <div id="simpleTabs-content-2" class="simpleTabs-content">
284
  <table class='form-table'>
285
 
286
- <?php echo BuildBooleanSelect(__("Allow Anyone To Post Via Email", POSTIE_SLUG), "postie-settings[turn_authorization_off]", $turn_authorization_off, __("Changing this to yes <b style='color: red'>is not recommended</b> - anything that gets sent in will automatically be posted.", POSTIE_SLUG)); ?>
287
- <?php echo BuildBooleanSelect(__("Force User Login", POSTIE_SLUG), "postie-settings[force_user_login]", $force_user_login, __("Changing this to yes will cause Postie to try and login as the 'from' user if they exist. This should be set to 'Yes' if you use custom taxonomies in the subject line.", POSTIE_SLUG)); ?>
288
  <tr>
289
  <th scope="row">
290
- <?php _e('Roles That Can Post', POSTIE_SLUG) ?><br />
291
  </th>
292
  <td>
293
  <table class="checkbox-table">
@@ -315,15 +315,15 @@
315
  }
316
  }
317
  ?>
318
- <p class='description'><?php _e("This allows you to grant access to other users to post if they have the proper access level. Administrators can always post.", POSTIE_SLUG); ?></p>
319
 
320
  </table>
321
  </td>
322
  </tr>
323
 
324
- <?php echo BuildTextArea(__("Authorized Addresses", POSTIE_SLUG), "postie-settings[authorized_addresses]", $authorized_addresses, __("Put each email address on a single line. Posts from emails in this list will be treated as if they came from the admin. If you would prefer to have users post under their own name - create a WordPress user with the correct access level.", POSTIE_SLUG)); ?>
325
  <tr>
326
- <th scope="row"><?php _e('Default Poster', POSTIE_SLUG) ?></th>
327
  <td>
328
  <select name='postie-settings[admin_username]' id='postie-settings[admin_username]'>
329
  <?php
@@ -340,7 +340,7 @@
340
  }
341
  ?>
342
  </select>
343
- <p class='description'><?php _e("This will be the poster if you allow posting from emails that are not a registered blog user.", POSTIE_SLUG); ?></p>
344
  </td>
345
  </tr>
346
  </table>
@@ -349,7 +349,7 @@
349
  <div id = "simpleTabs-content-3" class = "simpleTabs-content">
350
  <table class = 'form-table'>
351
  <tr>
352
- <th scope="row"><?php _e('Preferred Text Type', POSTIE_SLUG) ?> </th>
353
  <td>
354
  <select name='postie-settings[prefer_text_type]' id='postie-settings-prefer_text_type'>
355
  <?php printf('<option value="plain" %s>plain</option>', ($prefer_text_type == "plain") ? "selected" : "") ?>
@@ -358,7 +358,7 @@
358
  </td>
359
  </tr>
360
  <tr valign = "top">
361
- <th scope = "row"><?php _e('Default category', POSTIE_SLUG) ?></th>
362
  <td>
363
  <?php
364
  $defaultCat = $default_post_category;
@@ -366,20 +366,20 @@
366
  wp_dropdown_categories($args);
367
  ?>
368
  </tr>
369
- <?php echo BuildBooleanSelect(__("Match short category", POSTIE_SLUG), "postie-settings[category_match]", $category_match, __("Try to match categories using 'starts with logic' otherwise only do exact matches.<br />Note that custom taxonomies will not be found if this setting is 'No'", POSTIE_SLUG)); ?>
370
 
371
  <tr valign="top">
372
  <th scope="row">
373
- <?php _e('Default tag(s)', POSTIE_SLUG) ?><br />
374
  </th>
375
  <td>
376
  <input type='text' name='postie-settings[default_post_tags]' id='postie-settings-default_post_tags' value='<?php echo esc_attr($default_post_tags) ?>' />
377
- <p class='description'><?php _e('separated by commas', POSTIE_SLUG) ?></p>
378
  </td>
379
  </tr>
380
 
381
  <tr>
382
- <th scope="row"><?php _e('Default Post Status', POSTIE_SLUG) ?> </th>
383
  <td>
384
  <select name='postie-settings[post_status]' id='postie-settings-post_status'>
385
  <?php
@@ -399,7 +399,7 @@
399
  </tr>
400
 
401
  <tr>
402
- <th scope="row"><?php _e('Default Post Format', POSTIE_SLUG) ?> </th>
403
  <td>
404
  <select name='postie-settings[post_format]' id='postie-settings-post_format'>
405
  <?php
@@ -423,7 +423,7 @@
423
  </tr>
424
 
425
  <tr>
426
- <th scope="row"><?php _e('Default Post Type', POSTIE_SLUG) ?> </th>
427
  <td>
428
  <select name='postie-settings[post_type]' id='postie-settings-post_type'>
429
  <?php
@@ -442,65 +442,65 @@
442
  </tr>
443
 
444
  <tr>
445
- <th scope="row"><?php _e('Default Title', POSTIE_SLUG) ?> </th>
446
  <td>
447
  <input name='postie-settings[default_title]' type="text" id='postie-settings-default_title' value="<?php echo esc_attr($default_title); ?>" size="50" /><br />
448
  </td>
449
  </tr>
450
 
451
- <?php echo BuildBooleanSelect(__("Treat Replies As", POSTIE_SLUG), "postie-settings[reply_as_comment]", $reply_as_comment, "", array("comments", "new posts")); ?>
452
- <?php echo BuildBooleanSelect(__("Forward Rejected Mail", POSTIE_SLUG), "postie-settings[forward_rejected_mail]", $forward_rejected_mail); ?>
453
- <?php echo BuildBooleanSelect(__("Allow Subject In Mail", POSTIE_SLUG), "postie-settings[allow_subject_in_mail]", $allow_subject_in_mail, "Enclose the subject between '#' on the very first line. E.g. #this is my subject#"); ?>
454
- <?php echo BuildBooleanSelect(__("Allow HTML In Mail Subject", POSTIE_SLUG), "postie-settings[allow_html_in_subject]", $allow_html_in_subject); ?>
455
- <?php echo BuildBooleanSelect(__("Allow HTML In Mail Body", POSTIE_SLUG), "postie-settings[allow_html_in_body]", $allow_html_in_body); ?>
456
  <tr>
457
- <th scope="row"><?php _e('Text for Message Start', POSTIE_SLUG) ?> </th>
458
  <td>
459
  <input name='postie-settings[message_start]' type="text" id='postie-settings-message_start' value="<?php echo esc_attr($message_start); ?>" size="50" /><br />
460
- <p class='description'><?php _e('Remove all text from the beginning of the message up to the point where this is found.', POSTIE_SLUG) ?></p>
461
  </td>
462
  </tr>
463
  <tr>
464
- <th scope="row"><?php _e('Text for Message End', POSTIE_SLUG) ?> </th>
465
  <td>
466
  <input name='postie-settings[message_end]' type="text" id='postie-settings-message_end' value="<?php echo esc_attr($message_end); ?>" size="50" /><br />
467
- <p class='description'><?php _e('Remove all text from the point this is found to the end of the message.', POSTIE_SLUG) ?></p>
468
  </td>
469
  </tr>
470
 
471
  <?php
472
- echo BuildBooleanSelect(__("Filter newlines", POSTIE_SLUG), "postie-settings[filternewlines]", $filternewlines, __("Whether to strip newlines from plain text. Set to no if using markdown or textitle syntax", POSTIE_SLUG));
473
- echo BuildBooleanSelect(__("Replace newline characters with html line breaks (&lt;br /&gt;)", POSTIE_SLUG), "postie-settings[convertnewline]", $convertnewline, __("Filter newlines must be turned on for this option to take effect", POSTIE_SLUG));
474
- echo BuildBooleanSelect(__("Return rejected mail to sender", POSTIE_SLUG), "postie-settings[return_to_sender]", $return_to_sender);
475
  ?>
476
  <tr>
477
  <th>
478
- <?php _e("Send post confirmation email to", POSTIE_SLUG) ?>:
479
  </th>
480
  <td>
481
  <select name='postie-settings[confirmation_email]' id='postie-settings-confirmation_email'>
482
- <option value="sender" <?php echo($confirmation_email == "sender") ? "selected" : "" ?>><?php _e('sender', POSTIE_SLUG) ?></option>
483
- <option value="admin" <?php echo ($confirmation_email == "admin") ? "selected" : "" ?>><?php _e('administrator', POSTIE_SLUG) ?></option>
484
- <option value="both" <?php echo ($confirmation_email == "both") ? "selected" : "" ?>><?php _e('sender and administrator', POSTIE_SLUG) ?></option>
485
- <option value="" <?php echo ($confirmation_email == "") ? "selected" : "" ?>><?php _e('none', POSTIE_SLUG) ?></option>
486
  </select>
487
  </td>
488
  </tr>
489
 
490
  <?php
491
- echo BuildBooleanSelect(__("Automatically convert urls to links", POSTIE_SLUG), "postie-settings[converturls]", $converturls);
492
  ?>
493
  <tr>
494
- <th scope="row"><?php _e('Encoding for pages and feeds', POSTIE_SLUG) ?> </th>
495
  <td>
496
  <input name='postie-settings[message_encoding]' type="text" id='postie-settings-message_encoding' value="<?php echo esc_attr($message_encoding); ?>" size="10" />
497
- <p class='description'><?php _e('The character set for your blog.', POSTIE_SLUG) ?></p>
498
- <p class='description'>UTF-8 <?php _e("should handle ISO-8859-1 as well", POSTIE_SLUG); ?></p>
499
  </td>
500
  </tr>
501
- <?php echo BuildBooleanSelect(__("Decode Quoted Printable Data", POSTIE_SLUG), "postie-settings[message_dequote]", $message_dequote); ?>
502
- <?php echo BuildBooleanSelect(__("Drop The Signature From Mail", POSTIE_SLUG), "postie-settings[drop_signature]", $drop_signature, __("Really only works with 'plain' format.")); ?>
503
- <?php echo BuildTextArea(__("Signature Patterns", POSTIE_SLUG), "postie-settings[sig_pattern_list]", $sig_pattern_list, __("Really only works with 'plain' format. Put each pattern on a separate line. Patterns are <a href='http://regex101.com/' target='_blank'>regular expressions</a> and are put inside /^{pattern}$/i", POSTIE_SLUG)); ?>
504
  </table>
505
  </div>
506
 
@@ -508,23 +508,23 @@
508
  <table class='form-table'>
509
 
510
  <?php
511
- echo BuildBooleanSelect(__("Use First Image as Featured Image", POSTIE_SLUG), "postie-settings[featured_image]", $featured_image, __("If any images are attached, the first one will be the featured image for the post", POSTIE_SLUG));
512
- echo BuildBooleanSelect(__("Include Featured Image in Post", POSTIE_SLUG), "postie-settings[include_featured_image]", $include_featured_image, __("Should the featured image be included in the post", POSTIE_SLUG));
513
- echo BuildBooleanSelect(__("Automatically insert image gallery", POSTIE_SLUG), "postie-settings[auto_gallery]", $auto_gallery, __("If any images are attached, they will automatically be inserted as a gallery", POSTIE_SLUG));
514
- echo BuildSelect(__("Gallery Link Type", POSTIE_SLUG), "postie-settings[auto_gallery_link]", $auto_gallery_link, array('Default', 'Post', 'File', 'None'), "Select the type of link the gallery should use");
515
- echo BuildBooleanSelect(__("Image Location", POSTIE_SLUG), "postie-settings[images_append]", $images_append, __("Location of attachments if using 'plain' format. Before or After content.", POSTIE_SLUG), array('After', 'Before'));
516
- echo BuildBooleanSelect(__("Generate Thumbnails", POSTIE_SLUG), "postie-settings[generate_thumbnails]", $generate_thumbnails, __("Some hosts crash during thumbnail generation. Set this to 'No' if you have this issue", POSTIE_SLUG));
517
- echo BuildBooleanSelect(__("Start Image Count At", POSTIE_SLUG), "postie-settings[start_image_count_at_zero]", $start_image_count_at_zero, __('For use if using "Image Place Holder Tag" below.', POSTIE_SLUG), array('Start at 0', 'Start at 1'));
518
  ?>
519
  <tr>
520
- <th scope="row"><?php _e('Image Place Holder Tag', POSTIE_SLUG) ?></th>
521
  <td>
522
  <input name='postie-settings[image_placeholder]' type="text" id='postie-settings-image_placeholder' value="<?php echo esc_attr($image_placeholder); ?>" size="50" /><br />
523
- <p class='description'><?php _e("For use in 'plain' messages. The code for inserting an image. I.e. put \"#img1# in your email where you want the first image to show. See also \"Start Image Count At\"", POSTIE_SLUG) ?></p>
524
  </td>
525
  </tr>
526
  <tr>
527
- <th scope="row"><?php _e('Image Template', POSTIE_SLUG) ?></th>
528
  <td>
529
  <input type='hidden' id='postie-settings-selected_imagetemplate' name='postie-settings[selected_imagetemplate]'
530
  value="<?php echo esc_attr($selected_imagetemplate) ?>" />
@@ -550,10 +550,10 @@
550
  }
551
  ?>
552
  </select>
553
- <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', POSTIE_SLUG); ?></p>
554
- <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', POSTIE_SLUG); ?></p>
555
- <p class='description'><?php _e('Sizes for thumbnail, medium, and large images can be chosen in the <a href="options-media.php">Media Settings</a>. The samples here use the default sizes, and will not reflect the sizes you have chosen.', POSTIE_SLUG); ?></p>
556
- <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', POSTIE_SLUG); ?></div>
557
  <div id='imageTemplatePreview'></div>
558
  <textarea onchange='changeStyle("imageTemplatePreview", "postie-settings-imagetemplate", "imagetemplateselect",
559
  "postie-settings-selected_imagetemplate", "smiling.jpg", true);' cols='70' rows='7' id='postie-settings-imagetemplate' name='postie-settings[imagetemplate]'>
@@ -599,10 +599,10 @@
599
  <div id="simpleTabs-content-5" class="simpleTabs-content">
600
  <table class='form-table'>
601
  <?php
602
- echo BuildBooleanSelect(__("Use shortcode for embedding video (youtube or vimeo)", POSTIE_SLUG), "postie-settings[shortcode]", $shortcode, "Only change this value to 'Yes' if you have another plugin that will process the shortcode.");
603
  ?>
604
  <tr>
605
- <th scope='row'><?php _e('Video template 1', POSTIE_SLUG) ?></th>
606
  <?php $templateDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/templates'; ?>
607
  <td>
608
  <input type='hidden' id='postie-settings-selected_video1template' name='postie-settings[selected_video1template]'
@@ -628,10 +628,10 @@
628
  }
629
  ?>
630
  </select>
631
- <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', POSTIE_SLUG) ?></p>
632
- <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', POSTIE_SLUG); ?></p>
633
 
634
- <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', POSTIE_SLUG); ?></div>
635
  <div id='video1TemplatePreview'></div>
636
  <textarea onchange="changeStyle('video1TemplatePreview', 'postie-settings-video1template',
637
  'video1templateselect', 'postie-settings-selected_video1template', 'hi.mp4', true);" cols='70' rows='7' id='postie-settings-video1template'
@@ -639,17 +639,17 @@
639
  </td>
640
  </tr>
641
  <tr>
642
- <th scope="row"><?php _e('Video 1 file extensions', POSTIE_SLUG) ?></th>
643
  <td>
644
  <br/><input name='postie-settings[video1types]' type="text" id='postie-settings-video1types'
645
  value="<?php if ($video1types != '') echo esc_attr($video1types); ?>" size="40" />
646
  <p class='description'>
647
- <?php _e('Use video template 1 for files with these extensions (separated by commas)', POSTIE_SLUG) ?></p>
648
  </td>
649
  </tr>
650
  <tr><td colspan="2"><hr /></td></tr>
651
  <tr>
652
- <th scope='row'><?php _e('Video template 2', POSTIE_SLUG) ?></th>
653
  <td>
654
  <input type='hidden' id='postie-settings-selected_video2template' name='postie-settings[selected_video2template]'
655
  value="<?php echo esc_attr($selected_video2template) ?>" />
@@ -674,10 +674,10 @@
674
  }
675
  ?>
676
  </select>
677
- <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', POSTIE_SLUG) ?></p>
678
- <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', POSTIE_SLUG); ?></p>
679
 
680
- <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', POSTIE_SLUG); ?></div>
681
  <div id='video2TemplatePreview'></div>
682
  <textarea onchange="changeStyle('video2TemplatePreview', 'postie-settings-video2template',
683
  'video2templateselect', 'postie-settings-selected_video2template', 'hi.flv', true);" cols='70' rows='7' id='postie-settings-video2template'
@@ -687,17 +687,17 @@
687
  </td>
688
  </tr>
689
  <tr>
690
- <th scope="row"><?php _e('Video 2 file extensions', POSTIE_SLUG) ?></th>
691
  <td>
692
  <br/><input name='postie-settings[video2types]' type="text" id='postie-settings-video2types'
693
  value="<?php if ($video2types != '') echo esc_attr($video2types); ?>" size="40" />
694
  <p class='description'>
695
- <?php _e('Use video template 2 for files with these extensions (separated by commas)', POSTIE_SLUG) ?></p>
696
  </td>
697
  </tr>
698
  <tr><td colspan="2"><hr /></td></tr>
699
  <tr>
700
- <th scope='row'><?php _e('Audio template', POSTIE_SLUG) ?></th>
701
  <td>
702
  <input type='hidden' id='postie-settings-selected_audiotemplate' name='postie-settings[selected_audiotemplate]'
703
  value="<?php echo esc_attr($selected_audiotemplate) ?>" />
@@ -723,10 +723,10 @@
723
  }
724
  ?>
725
  </select>
726
- <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', POSTIE_SLUG) ?></p>
727
- <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', POSTIE_SLUG); ?></p>
728
 
729
- <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', POSTIE_SLUG); ?></div>
730
  <div id='audioTemplatePreview'></div>
731
  <textarea onchange="changeStyle('audioTemplatePreview', 'postie-settings-audiotemplate',
732
  'audiotemplateselect', 'postie-settings-selected_audiotemplate', 'funky.mp3', true);" cols='70' rows='7' id='postie-settings-audiotemplate'
@@ -734,10 +734,10 @@
734
  </td>
735
  </tr>
736
  <tr>
737
- <th scope="row"><?php _e('Audio file extensions', POSTIE_SLUG) ?></th>
738
  <td>
739
  <input name='postie-settings[audiotypes]' type="text" id='postie-settings-audiotypes' value="<?php echo esc_attr($audiotypes); ?>" size="40" />
740
- <p class='description'><?php _e('Use the audio template for files with these extensions (separated by commas)', POSTIE_SLUG) ?></p>
741
  </td>
742
  </tr>
743
  </table>
@@ -749,11 +749,11 @@
749
 
750
  <div id="simpleTabs-content-6" class="simpleTabs-content">
751
  <table class='form-table'>
752
- <?php echo BuildTextArea(__("Supported MIME Types", POSTIE_SLUG), "postie-settings[supported_file_types]", $supported_file_types, __("Add just the type (not the subtype). Text, Video, Audio, Image and Multipart are always supported. Put each type on a single line", POSTIE_SLUG)); ?>
753
- <?php echo BuildTextArea(__("Banned File Names", POSTIE_SLUG), "postie-settings[banned_files_list]", $banned_files_list, __("Put each file name on a single line.Files matching this list will never be posted to your blog. You can use wildcards such as *.xls, or *.* for all files", POSTIE_SLUG)); ?>
754
 
755
  <tr>
756
- <th scope='row'><?php _e('Attachment icon set', POSTIE_SLUG) ?></th>
757
  <td>
758
  <input type='hidden' id='postie-settings-icon_set' name='postie-settings[icon_set]'
759
  value="<?php echo esc_attr($icon_set) ?>" />
@@ -782,7 +782,7 @@
782
  </td>
783
  </tr>
784
  <tr>
785
- <th scope='row'><?php _e('Attachment icon size (in pixels)', POSTIE_SLUG) ?></th>
786
  <td>
787
  <input type='hidden' id='postie-settings-icon_size' name='postie-settings[icon_size]'
788
  value="<?php echo esc_attr($icon_size) ?>" />
@@ -805,7 +805,7 @@
805
  </td>
806
  </tr>
807
  <tr>
808
- <th scope='row'><?php _e('Attachment template', POSTIE_SLUG) ?>:<br />
809
  </th>
810
  <td>
811
  <input type='hidden' id='postie-settings-selected_generaltemplate' name='postie-settings[selected_generaltemplate]'
@@ -831,11 +831,11 @@
831
  }
832
  ?>
833
  </select>
834
- <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', POSTIE_SLUG) ?></p>
835
- <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', POSTIE_SLUG); ?></p>
836
 
837
  <div style="margin-top: 10px; font-weight: bold;">
838
- <?php _e('Preview', POSTIE_SLUG); ?>
839
  </div>
840
  <div id='generalTemplatePreview'></div>
841
  <textarea onchange="changeStyle('generalTemplatePreview', 'postie-settings-generaltemplate', 'generaltemplateselect', 'postie-settings-selected_generaltemplate', 'interesting_document.doc', true);"
@@ -844,7 +844,7 @@
844
  name='postie-settings[generaltemplate]'><?php echo esc_attr($generaltemplate) ?></textarea>
845
  </td>
846
  </tr>
847
- <?php echo BuildBooleanSelect(__("Use custom image field for attachments", POSTIE_SLUG), "postie-settings[custom_image_field]", $custom_image_field, __("When set to 'Yes' no attachments will appear in the post (including images, video &amp; sound files). Instead the url to the attachment will be put into a custom field named 'image'. Your theme will need logic to display these attachments", POSTIE_SLUG)); ?>
848
  </table>
849
  </div>
850
  <div id="simpleTabs-content-7" class="simpleTabs-content">
@@ -874,8 +874,8 @@
874
  </form>
875
  <form id="postie-options" name="postie-options" method="post">
876
  <input type="hidden" name="action" value="reset" />
877
- <input name="Submit" value="<?php _e("Reset Settings To Defaults", POSTIE_SLUG) ?>" type="submit" class='button'>
878
- <span>&nbsp;<?php _e('(Your Mail server settings will be retained)', POSTIE_SLUG) ?></span>
879
  </form>
880
  </div>
881
 
1
  <div class="wrap">
2
  <div style="float:right; width: 220px; border: 1px solid darkgrey; padding:2px;border-radius:10px;margin-left: 10px;" >
3
+ <p class="" style="text-align:center;font-weight: bolder; margin-top: 0px; margin-bottom: 2px;"><?php _e("Please Donate, Every $ Helps!", 'postie'); ?></p>
4
+ <p style="margin-top: 0;margin-bottom: 2px;"><?php _e("Your generous donation allows me to continue developing Postie for the WordPress community.", 'postie'); ?></p>
5
  <form style="" action="https://www.paypal.com/cgi-bin/webscr" method="post">
6
  <input type="hidden" name="cmd" value="_s-xclick">
7
  <input type="hidden" name="hosted_button_id" value="HPK99BJ88V4C2">
14
  <a style='text-decoration:none' href='admin.php?page=postie-settings'>
15
  <?php
16
  echo '<img src="' . plugins_url('images/mail.png', __FILE__) . '" alt="postie" />';
17
+ _e('Postie Settings', 'postie');
18
  ?>
19
  </a>
20
+ <span class="description">(v<?php _e(POSTIE_VERSION, 'postie'); ?>)</span>
21
  </h2>
22
 
23
  <?php
37
  exit;
38
  break;
39
  case "runpostie":
40
+ EchoInfo(__("Checking for mail manually", 'postie'));
41
  postie_get_mail();
42
  exit;
43
  break;
44
  case "runpostie-debug":
45
+ EchoInfo(__("Checking for mail manually with debug output", 'postie'));
46
  if (!defined('POSTIE_DEBUG')) {
47
  define('POSTIE_DEBUG', true);
48
  }
71
  }
72
  extract($config);
73
  if (!isset($maxemails)) {
74
+ EchoInfo(__("New setting: maxemails", 'postie'));
75
  $maxemails = 0;
76
  }
77
  if (!isset($category_match)) {
82
  wp_clear_scheduled_hook('check_postie_hook');
83
  }
84
 
85
+ $messages[1] = __("Configuration successfully updated!", 'postie');
86
+ $messages[2] = __("Error - unable to save configuration", 'postie');
87
  ?>
88
  <?php if (isset($_GET['message'])) : ?>
89
+ <div class="updated"><p><?php _e($messages[$_GET['message']], 'postie'); ?></p></div>
90
  <?php endif; ?>
91
 
92
  <form name="postie-options" method='post'>
93
  <input type="hidden" name="action" value="runpostie" />
94
+ <input name="Submit" value="<?php _e("Run Postie", 'postie'); ?> &raquo;" type="submit" class='button'>
95
+ <?php _e("(To run the check mail script manually)", 'postie'); ?>
96
  </form>
97
  <form name="postie-options" method='post'>
98
  <input type="hidden" name="action" value="runpostie-debug" />
99
+ <input name="Submit" value="<?php _e("Run Postie (Debug)", 'postie'); ?> &raquo;" type="submit" class='button'>
100
+ <?php _e("(To run the check mail script manually with full debug output)", 'postie'); ?>
101
  </form>
102
  <form name="postie-options" method="post">
103
  <input type="hidden" name="action" value="test" />
104
+ <input name="Submit" value="<?php _e("Test Config", 'postie'); ?>&raquo;" type="submit" class='button'>
105
+ <?php _e("this will check your configuration options", 'postie'); ?>
106
  </form>
107
 
108
  <form name="postie-options" method="post" action='options.php' autocomplete="off">
115
  <div id="simpleTabs">
116
  <div class="simpleTabs-nav">
117
  <ul>
118
+ <li id="simpleTabs-nav-1"><?php _e('Mailserver', 'postie') ?></li>
119
+ <li id="simpleTabs-nav-2"><?php _e('User', 'postie') ?></li>
120
+ <li id="simpleTabs-nav-3"><?php _e('Message', 'postie') ?></li>
121
+ <li id="simpleTabs-nav-4"><?php _e('Image', 'postie') ?></li>
122
+ <li id="simpleTabs-nav-5"><?php _e('Video and Audio', 'postie') ?></li>
123
+ <li id="simpleTabs-nav-6"><?php _e('Attachments', 'postie') ?></li>
124
+ <li id="simpleTabs-nav-7"><?php _e('Support', 'postie') ?></li>
125
  </ul>
126
  </div>
127
  <div id="simpleTabs-content-1" class="simpleTabs-content">
128
  <table class='form-table'>
129
 
130
  <tr>
131
+ <th scope="row"><lable for="postie-settings-input_protocol"><?php _e('Mail Protocol', 'postie') ?></lable></th>
132
  <td>
133
  <select name='postie-settings[input_protocol]' id='postie-settings-input_protocol'>
134
  <option value="pop3" <?php echo (($input_protocol == "pop3") ? " selected='selected' " : "") ?>>POP3</option>
144
  </td>
145
  </tr>
146
 
147
+ <?php echo BuildBooleanSelect(__("Use Transport Layer Security (TLS)", 'postie'), 'postie-settings[email_tls]', $email_tls, __("Choose Yes if your server requires TLS", 'postie')); ?>
148
 
149
  <tr>
150
+ <th scope="row"><label for="postie-settings-mail_server_port"><?php _e('Port', 'postie') ?></label></th>
151
  <td valign="top">
152
  <input name='postie-settings[mail_server_port]' style="width: 70px;" type="number" min="0" id='postie-settings-mail_server_port' value="<?php echo esc_attr($mail_server_port); ?>" size="6" />
153
+ <p class='description'><?php _e("Standard Ports:", 'postie'); ?><br />
154
+ <?php _e("POP3", 'postie'); ?> - 110<br />
155
+ <?php _e("IMAP", 'postie'); ?> - 143<br />
156
+ <?php _e("IMAP-SSL", 'postie'); ?>- 993 <br />
157
+ <?php _e("POP3-SSL", 'postie'); ?> - 995 <br />
158
  </p>
159
  </td>
160
  </tr>
161
  <tr valign="top">
162
+ <th scope="row"><?php _e('Mail Server', 'postie') ?></th>
163
  <td><input name='postie-settings[mail_server]' type="text" id='postie-settings-mail_server' value="<?php echo esc_attr($mail_server); ?>" size="40" />
164
  </td>
165
  </tr>
166
  <tr valign="top">
167
+ <th scope="row"><?php _e('Mail Userid', 'postie') ?></th>
168
  <td><input name='postie-settings[mail_userid]' type="text" id='postie-settings-mail_userid' autocomplete='off' value="<?php echo esc_attr($mail_userid); ?>" size="40" /></td>
169
  </tr>
170
  <tr valign="top">
171
+ <th scope="row"><?php _e('Mail Password', 'postie') ?></th>
172
  <td>
173
  <input name='postie-settings[mail_password]' type="password" id='postie-settings-mail_password' autocomplete='off' value="<?php echo esc_attr($mail_password); ?>" size="40" />
174
  </td>
175
  </tr>
176
  <tr>
177
+ <th scope="row"><?php _e('Postie Time Correction', 'postie') ?></th>
178
  <td><input style="width: 70px;" name='postie-settings[time_offset]' type="number" step="0.5" id='postie-settings-time_offset' size="2" value="<?php echo esc_attr($time_offset); ?>" />
179
+ <?php _e('hours', 'postie') ?>
180
+ <p class='description'><?php _e("Should be the same as your normal offset, but this lets you adjust it in cases where that doesn't work.", 'postie'); ?></p>
181
  </td>
182
  </tr>
183
  <tr>
184
  <th>
185
+ <?php _e('Check for mail every', 'postie') ?>:
186
  </th>
187
  <td>
188
  <select name='postie-settings[interval]' id='postie-settings-interval'>
190
  if ($interval == "weekly") {
191
  echo "selected='selected'";
192
  }
193
+ ?>><?php _e('Once weekly', 'postie') ?>
194
  </option>
195
 
196
  <option value="daily"<?php
197
  if ($interval == "daily") {
198
  echo "selected='selected'";
199
  }
200
+ ?>><?php _e('daily', 'postie') ?>
201
  </option>
202
 
203
  <option value="hourly" <?php
204
  if ($interval == "hourly") {
205
  echo "selected='selected'";
206
  }
207
+ ?>><?php _e('hourly', 'postie') ?>
208
  </option>
209
 
210
  <option value="twiceperhour" <?php
211
  if ($interval == "twiceperhour") {
212
  echo "selected='selected'";
213
  }
214
+ ?>><?php _e('twice per hour', 'postie') ?>
215
  </option>
216
 
217
  <option value="tenminutes" <?php
218
  if ($interval == "tenminutes") {
219
  echo "selected='selected'";
220
  }
221
+ ?>><?php _e('every 10 minutes', 'postie') ?>
222
  </option>
223
 
224
  <option value="fiveminutes" <?php
225
  if ($interval == "fiveminutes") {
226
  echo "selected='selected'";
227
  }
228
+ ?>><?php _e('every 5 minutes', 'postie') ?>
229
  </option>
230
 
231
  <option value="oneminute" <?php
232
  if ($interval == "oneminute") {
233
  echo "selected='selected'";
234
  }
235
+ ?>><?php _e('every 1 minute', 'postie') ?>
236
  </option>
237
 
238
  <option value="thirtyseconds" <?php
239
  if ($interval == "thirtyseconds") {
240
  echo "selected='selected'";
241
  }
242
+ ?>><?php _e('every 30 seconds', 'postie') ?>
243
  </option>
244
 
245
  <option value="fifteenseconds" <?php
246
  if ($interval == "fifteenseconds") {
247
  echo "selected='selected'";
248
  }
249
+ ?>><?php _e('every 15 seconds', 'postie') ?>
250
  </option>
251
 
252
  <option value="manual" <?php
253
  if ($interval == "manual") {
254
  echo "selected='selected'";
255
  }
256
+ ?>><?php _e('check manually', 'postie') ?>
257
  </option>
258
  </select>
259
  </td>
260
  </tr>
261
  <tr>
262
  <th>
263
+ <?php _e('Maximum number of emails to process', 'postie'); ?>
264
  </th>
265
  <td>
266
  <select name='postie-settings[maxemails]' id='postie-settings-maxemails'>
267
+ <option value="0" <?php if ($maxemails == '0') echo "selected='selected'" ?>><?php _e('All', 'postie'); ?></option>
268
  <option value="1" <?php if ($maxemails == '1') echo "selected='selected'" ?>>1</option>
269
  <option value="2" <?php if ($maxemails == '2') echo "selected='selected'" ?>>2</option>
270
  <option value="5" <?php if ($maxemails == '5') echo "selected='selected'" ?>>5</option>
274
  </select>
275
  </td>
276
  </tr>
277
+ <?php echo BuildBooleanSelect(__("Delete email after posting", 'postie'), 'postie-settings[delete_mail_after_processing]', $delete_mail_after_processing, __("Only set to no for testing purposes", 'postie')); ?>
278
+ <?php echo BuildBooleanSelect(__("Ignore mail state", 'postie'), 'postie-settings[ignore_mail_state]', $ignore_mail_state, __("Ignore whether the mails is 'read' or 'unread' If 'No' then only unread messages are processed.", 'postie')); ?>
279
+ <?php echo BuildTextArea(__("Allowed SMTP servers", 'postie'), "postie-settings[smtp]", $smtp, __("Only allow messages which have been sent throught the following SMTP servers. Put each server on a separate line. Leave blank to allow any SMTP server.", 'postie')); ?>
280
  </table>
281
  </div>
282
 
283
  <div id="simpleTabs-content-2" class="simpleTabs-content">
284
  <table class='form-table'>
285
 
286
+ <?php echo BuildBooleanSelect(__("Allow Anyone To Post Via Email", 'postie'), "postie-settings[turn_authorization_off]", $turn_authorization_off, __("Changing this to yes <b style='color: red'>is not recommended</b> - anything that gets sent in will automatically be posted.", 'postie')); ?>
287
+ <?php echo BuildBooleanSelect(__("Force User Login", 'postie'), "postie-settings[force_user_login]", $force_user_login, __("Changing this to yes will cause Postie to try and login as the 'from' user if they exist. This should be set to 'Yes' if you use custom taxonomies in the subject line.", 'postie')); ?>
288
  <tr>
289
  <th scope="row">
290
+ <?php _e('Roles That Can Post', 'postie') ?><br />
291
  </th>
292
  <td>
293
  <table class="checkbox-table">
315
  }
316
  }
317
  ?>
318
+ <p class='description'><?php _e("This allows you to grant access to other users to post if they have the proper access level. Administrators can always post.", 'postie'); ?></p>
319
 
320
  </table>
321
  </td>
322
  </tr>
323
 
324
+ <?php echo BuildTextArea(__("Authorized Addresses", 'postie'), "postie-settings[authorized_addresses]", $authorized_addresses, __("Put each email address on a single line. Posts from emails in this list will be treated as if they came from the admin. If you would prefer to have users post under their own name - create a WordPress user with the correct access level.", 'postie')); ?>
325
  <tr>
326
+ <th scope="row"><?php _e('Default Poster', 'postie') ?></th>
327
  <td>
328
  <select name='postie-settings[admin_username]' id='postie-settings[admin_username]'>
329
  <?php
340
  }
341
  ?>
342
  </select>
343
+ <p class='description'><?php _e("This will be the poster if you allow posting from emails that are not a registered blog user.", 'postie'); ?></p>
344
  </td>
345
  </tr>
346
  </table>
349
  <div id = "simpleTabs-content-3" class = "simpleTabs-content">
350
  <table class = 'form-table'>
351
  <tr>
352
+ <th scope="row"><?php _e('Preferred Text Type', 'postie') ?> </th>
353
  <td>
354
  <select name='postie-settings[prefer_text_type]' id='postie-settings-prefer_text_type'>
355
  <?php printf('<option value="plain" %s>plain</option>', ($prefer_text_type == "plain") ? "selected" : "") ?>
358
  </td>
359
  </tr>
360
  <tr valign = "top">
361
+ <th scope = "row"><?php _e('Default category', 'postie') ?></th>
362
  <td>
363
  <?php
364
  $defaultCat = $default_post_category;
366
  wp_dropdown_categories($args);
367
  ?>
368
  </tr>
369
+ <?php echo BuildBooleanSelect(__("Match short category", 'postie'), "postie-settings[category_match]", $category_match, __("Try to match categories using 'starts with logic' otherwise only do exact matches.<br />Note that custom taxonomies will not be found if this setting is 'No'", 'postie')); ?>
370
 
371
  <tr valign="top">
372
  <th scope="row">
373
+ <?php _e('Default tag(s)', 'postie') ?><br />
374
  </th>
375
  <td>
376
  <input type='text' name='postie-settings[default_post_tags]' id='postie-settings-default_post_tags' value='<?php echo esc_attr($default_post_tags) ?>' />
377
+ <p class='description'><?php _e('separated by commas', 'postie') ?></p>
378
  </td>
379
  </tr>
380
 
381
  <tr>
382
+ <th scope="row"><?php _e('Default Post Status', 'postie') ?> </th>
383
  <td>
384
  <select name='postie-settings[post_status]' id='postie-settings-post_status'>
385
  <?php
399
  </tr>
400
 
401
  <tr>
402
+ <th scope="row"><?php _e('Default Post Format', 'postie') ?> </th>
403
  <td>
404
  <select name='postie-settings[post_format]' id='postie-settings-post_format'>
405
  <?php
423
  </tr>
424
 
425
  <tr>
426
+ <th scope="row"><?php _e('Default Post Type', 'postie') ?> </th>
427
  <td>
428
  <select name='postie-settings[post_type]' id='postie-settings-post_type'>
429
  <?php
442
  </tr>
443
 
444
  <tr>
445
+ <th scope="row"><?php _e('Default Title', 'postie') ?> </th>
446
  <td>
447
  <input name='postie-settings[default_title]' type="text" id='postie-settings-default_title' value="<?php echo esc_attr($default_title); ?>" size="50" /><br />
448
  </td>
449
  </tr>
450
 
451
+ <?php echo BuildBooleanSelect(__("Treat Replies As", 'postie'), "postie-settings[reply_as_comment]", $reply_as_comment, "", array("comments", "new posts")); ?>
452
+ <?php echo BuildBooleanSelect(__("Forward Rejected Mail", 'postie'), "postie-settings[forward_rejected_mail]", $forward_rejected_mail); ?>
453
+ <?php echo BuildBooleanSelect(__("Allow Subject In Mail", 'postie'), "postie-settings[allow_subject_in_mail]", $allow_subject_in_mail, "Enclose the subject between '#' on the very first line. E.g. #this is my subject#"); ?>
454
+ <?php echo BuildBooleanSelect(__("Allow HTML In Mail Subject", 'postie'), "postie-settings[allow_html_in_subject]", $allow_html_in_subject); ?>
455
+ <?php echo BuildBooleanSelect(__("Allow HTML In Mail Body", 'postie'), "postie-settings[allow_html_in_body]", $allow_html_in_body); ?>
456
  <tr>
457
+ <th scope="row"><?php _e('Text for Message Start', 'postie') ?> </th>
458
  <td>
459
  <input name='postie-settings[message_start]' type="text" id='postie-settings-message_start' value="<?php echo esc_attr($message_start); ?>" size="50" /><br />
460
+ <p class='description'><?php _e('Remove all text from the beginning of the message up to the point where this is found. Note this works best with "Plain" messages.', 'postie') ?></p>
461
  </td>
462
  </tr>
463
  <tr>
464
+ <th scope="row"><?php _e('Text for Message End', 'postie') ?> </th>
465
  <td>
466
  <input name='postie-settings[message_end]' type="text" id='postie-settings-message_end' value="<?php echo esc_attr($message_end); ?>" size="50" /><br />
467
+ <p class='description'><?php _e('Remove all text from the point this is found to the end of the message. Note this works best with "Plain" messages.', 'postie') ?></p>
468
  </td>
469
  </tr>
470
 
471
  <?php
472
+ echo BuildBooleanSelect(__("Filter newlines", 'postie'), "postie-settings[filternewlines]", $filternewlines, __("Whether to strip newlines from plain text. Set to no if using markdown or textitle syntax", 'postie'));
473
+ echo BuildBooleanSelect(__("Replace newline characters with html line breaks (&lt;br /&gt;)", 'postie'), "postie-settings[convertnewline]", $convertnewline, __("Filter newlines must be turned on for this option to take effect", 'postie'));
474
+ echo BuildBooleanSelect(__("Return rejected mail to sender", 'postie'), "postie-settings[return_to_sender]", $return_to_sender);
475
  ?>
476
  <tr>
477
  <th>
478
+ <?php _e("Send post confirmation email to", 'postie') ?>:
479
  </th>
480
  <td>
481
  <select name='postie-settings[confirmation_email]' id='postie-settings-confirmation_email'>
482
+ <option value="sender" <?php echo($confirmation_email == "sender") ? "selected" : "" ?>><?php _e('sender', 'postie') ?></option>
483
+ <option value="admin" <?php echo ($confirmation_email == "admin") ? "selected" : "" ?>><?php _e('administrator', 'postie') ?></option>
484
+ <option value="both" <?php echo ($confirmation_email == "both") ? "selected" : "" ?>><?php _e('sender and administrator', 'postie') ?></option>
485
+ <option value="" <?php echo ($confirmation_email == "") ? "selected" : "" ?>><?php _e('none', 'postie') ?></option>
486
  </select>
487
  </td>
488
  </tr>
489
 
490
  <?php
491
+ echo BuildBooleanSelect(__("Automatically convert urls to links", 'postie'), "postie-settings[converturls]", $converturls);
492
  ?>
493
  <tr>
494
+ <th scope="row"><?php _e('Encoding for pages and feeds', 'postie') ?> </th>
495
  <td>
496
  <input name='postie-settings[message_encoding]' type="text" id='postie-settings-message_encoding' value="<?php echo esc_attr($message_encoding); ?>" size="10" />
497
+ <p class='description'><?php _e('The character set for your blog.', 'postie') ?></p>
498
+ <p class='description'>UTF-8 <?php _e("should handle ISO-8859-1 as well", 'postie'); ?></p>
499
  </td>
500
  </tr>
501
+ <?php echo BuildBooleanSelect(__("Decode Quoted Printable Data", 'postie'), "postie-settings[message_dequote]", $message_dequote); ?>
502
+ <?php echo BuildBooleanSelect(__("Drop The Signature From Mail", 'postie'), "postie-settings[drop_signature]", $drop_signature, __("Really only works with 'plain' format.")); ?>
503
+ <?php echo BuildTextArea(__("Signature Patterns", 'postie'), "postie-settings[sig_pattern_list]", $sig_pattern_list, __("Really only works with 'plain' format. Put each pattern on a separate line. Patterns are <a href='http://regex101.com/' target='_blank'>regular expressions</a> and are put inside /^{pattern}$/i", 'postie')); ?>
504
  </table>
505
  </div>
506
 
508
  <table class='form-table'>
509
 
510
  <?php
511
+ echo BuildBooleanSelect(__("Use First Image as Featured Image", 'postie'), "postie-settings[featured_image]", $featured_image, __("If any images are attached, the first one will be the featured image for the post", 'postie'));
512
+ echo BuildBooleanSelect(__("Include Featured Image in Post", 'postie'), "postie-settings[include_featured_image]", $include_featured_image, __("Should the featured image be included in the post", 'postie'));
513
+ echo BuildBooleanSelect(__("Automatically insert image gallery", 'postie'), "postie-settings[auto_gallery]", $auto_gallery, __("If any images are attached, they will automatically be inserted as a gallery", 'postie'));
514
+ echo BuildSelect(__("Gallery Link Type", 'postie'), "postie-settings[auto_gallery_link]", $auto_gallery_link, array('Default', 'Post', 'File', 'None'), "Select the type of link the gallery should use");
515
+ echo BuildBooleanSelect(__("Image Location", 'postie'), "postie-settings[images_append]", $images_append, __("Location of attachments if using 'plain' format. Before or After content.", 'postie'), array('After', 'Before'));
516
+ echo BuildBooleanSelect(__("Generate Thumbnails", 'postie'), "postie-settings[generate_thumbnails]", $generate_thumbnails, __("Some hosts crash during thumbnail generation. Set this to 'No' if you have this issue", 'postie'));
517
+ echo BuildBooleanSelect(__("Start Image Count At", 'postie'), "postie-settings[start_image_count_at_zero]", $start_image_count_at_zero, __('For use if using "Image Place Holder Tag" below.', 'postie'), array('Start at 0', 'Start at 1'));
518
  ?>
519
  <tr>
520
+ <th scope="row"><?php _e('Image Place Holder Tag', 'postie') ?></th>
521
  <td>
522
  <input name='postie-settings[image_placeholder]' type="text" id='postie-settings-image_placeholder' value="<?php echo esc_attr($image_placeholder); ?>" size="50" /><br />
523
+ <p class='description'><?php _e("For use in 'plain' messages. The code for inserting an image. I.e. put \"#img1# in your email where you want the first image to show. See also \"Start Image Count At\"", 'postie') ?></p>
524
  </td>
525
  </tr>
526
  <tr>
527
+ <th scope="row"><?php _e('Image Template', 'postie') ?></th>
528
  <td>
529
  <input type='hidden' id='postie-settings-selected_imagetemplate' name='postie-settings[selected_imagetemplate]'
530
  value="<?php echo esc_attr($selected_imagetemplate) ?>" />
550
  }
551
  ?>
552
  </select>
553
+ <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie'); ?></p>
554
+ <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></p>
555
+ <p class='description'><?php _e('Sizes for thumbnail, medium, and large images can be chosen in the <a href="options-media.php">Media Settings</a>. The samples here use the default sizes, and will not reflect the sizes you have chosen.', 'postie'); ?></p>
556
+ <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', 'postie'); ?></div>
557
  <div id='imageTemplatePreview'></div>
558
  <textarea onchange='changeStyle("imageTemplatePreview", "postie-settings-imagetemplate", "imagetemplateselect",
559
  "postie-settings-selected_imagetemplate", "smiling.jpg", true);' cols='70' rows='7' id='postie-settings-imagetemplate' name='postie-settings[imagetemplate]'>
599
  <div id="simpleTabs-content-5" class="simpleTabs-content">
600
  <table class='form-table'>
601
  <?php
602
+ echo BuildBooleanSelect(__("Use shortcode for embedding video (youtube or vimeo)", 'postie'), "postie-settings[shortcode]", $shortcode, "Only change this value to 'Yes' if you have another plugin that will process the shortcode.");
603
  ?>
604
  <tr>
605
+ <th scope='row'><?php _e('Video template 1', 'postie') ?></th>
606
  <?php $templateDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/templates'; ?>
607
  <td>
608
  <input type='hidden' id='postie-settings-selected_video1template' name='postie-settings[selected_video1template]'
628
  }
629
  ?>
630
  </select>
631
+ <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></p>
632
+ <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></p>
633
 
634
+ <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', 'postie'); ?></div>
635
  <div id='video1TemplatePreview'></div>
636
  <textarea onchange="changeStyle('video1TemplatePreview', 'postie-settings-video1template',
637
  'video1templateselect', 'postie-settings-selected_video1template', 'hi.mp4', true);" cols='70' rows='7' id='postie-settings-video1template'
639
  </td>
640
  </tr>
641
  <tr>
642
+ <th scope="row"><?php _e('Video 1 file extensions', 'postie') ?></th>
643
  <td>
644
  <br/><input name='postie-settings[video1types]' type="text" id='postie-settings-video1types'
645
  value="<?php if ($video1types != '') echo esc_attr($video1types); ?>" size="40" />
646
  <p class='description'>
647
+ <?php _e('Use video template 1 for files with these extensions (separated by commas)', 'postie') ?></p>
648
  </td>
649
  </tr>
650
  <tr><td colspan="2"><hr /></td></tr>
651
  <tr>
652
+ <th scope='row'><?php _e('Video template 2', 'postie') ?></th>
653
  <td>
654
  <input type='hidden' id='postie-settings-selected_video2template' name='postie-settings[selected_video2template]'
655
  value="<?php echo esc_attr($selected_video2template) ?>" />
674
  }
675
  ?>
676
  </select>
677
+ <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></p>
678
+ <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></p>
679
 
680
+ <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', 'postie'); ?></div>
681
  <div id='video2TemplatePreview'></div>
682
  <textarea onchange="changeStyle('video2TemplatePreview', 'postie-settings-video2template',
683
  'video2templateselect', 'postie-settings-selected_video2template', 'hi.flv', true);" cols='70' rows='7' id='postie-settings-video2template'
687
  </td>
688
  </tr>
689
  <tr>
690
+ <th scope="row"><?php _e('Video 2 file extensions', 'postie') ?></th>
691
  <td>
692
  <br/><input name='postie-settings[video2types]' type="text" id='postie-settings-video2types'
693
  value="<?php if ($video2types != '') echo esc_attr($video2types); ?>" size="40" />
694
  <p class='description'>
695
+ <?php _e('Use video template 2 for files with these extensions (separated by commas)', 'postie') ?></p>
696
  </td>
697
  </tr>
698
  <tr><td colspan="2"><hr /></td></tr>
699
  <tr>
700
+ <th scope='row'><?php _e('Audio template', 'postie') ?></th>
701
  <td>
702
  <input type='hidden' id='postie-settings-selected_audiotemplate' name='postie-settings[selected_audiotemplate]'
703
  value="<?php echo esc_attr($selected_audiotemplate) ?>" />
723
  }
724
  ?>
725
  </select>
726
+ <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></p>
727
+ <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></p>
728
 
729
+ <div style="margin-top: 10px; font-weight: bold;"><?php _e('Preview', 'postie'); ?></div>
730
  <div id='audioTemplatePreview'></div>
731
  <textarea onchange="changeStyle('audioTemplatePreview', 'postie-settings-audiotemplate',
732
  'audiotemplateselect', 'postie-settings-selected_audiotemplate', 'funky.mp3', true);" cols='70' rows='7' id='postie-settings-audiotemplate'
734
  </td>
735
  </tr>
736
  <tr>
737
+ <th scope="row"><?php _e('Audio file extensions', 'postie') ?></th>
738
  <td>
739
  <input name='postie-settings[audiotypes]' type="text" id='postie-settings-audiotypes' value="<?php echo esc_attr($audiotypes); ?>" size="40" />
740
+ <p class='description'><?php _e('Use the audio template for files with these extensions (separated by commas)', 'postie') ?></p>
741
  </td>
742
  </tr>
743
  </table>
749
 
750
  <div id="simpleTabs-content-6" class="simpleTabs-content">
751
  <table class='form-table'>
752
+ <?php echo BuildTextArea(__("Supported MIME Types", 'postie'), "postie-settings[supported_file_types]", $supported_file_types, __("Add just the type (not the subtype). Text, Video, Audio, Image and Multipart are always supported. Put each type on a single line", 'postie')); ?>
753
+ <?php echo BuildTextArea(__("Banned File Names", 'postie'), "postie-settings[banned_files_list]", $banned_files_list, __("Put each file name on a single line.Files matching this list will never be posted to your blog. You can use wildcards such as *.xls, or *.* for all files", 'postie')); ?>
754
 
755
  <tr>
756
+ <th scope='row'><?php _e('Attachment icon set', 'postie') ?></th>
757
  <td>
758
  <input type='hidden' id='postie-settings-icon_set' name='postie-settings[icon_set]'
759
  value="<?php echo esc_attr($icon_set) ?>" />
782
  </td>
783
  </tr>
784
  <tr>
785
+ <th scope='row'><?php _e('Attachment icon size (in pixels)', 'postie') ?></th>
786
  <td>
787
  <input type='hidden' id='postie-settings-icon_size' name='postie-settings[icon_size]'
788
  value="<?php echo esc_attr($icon_size) ?>" />
805
  </td>
806
  </tr>
807
  <tr>
808
+ <th scope='row'><?php _e('Attachment template', 'postie') ?>:<br />
809
  </th>
810
  <td>
811
  <input type='hidden' id='postie-settings-selected_generaltemplate' name='postie-settings[selected_generaltemplate]'
831
  }
832
  ?>
833
  </select>
834
+ <p class='description'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></p>
835
+ <p class='description'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></p>
836
 
837
  <div style="margin-top: 10px; font-weight: bold;">
838
+ <?php _e('Preview', 'postie'); ?>
839
  </div>
840
  <div id='generalTemplatePreview'></div>
841
  <textarea onchange="changeStyle('generalTemplatePreview', 'postie-settings-generaltemplate', 'generaltemplateselect', 'postie-settings-selected_generaltemplate', 'interesting_document.doc', true);"
844
  name='postie-settings[generaltemplate]'><?php echo esc_attr($generaltemplate) ?></textarea>
845
  </td>
846
  </tr>
847
+ <?php echo BuildBooleanSelect(__("Use custom image field for attachments", 'postie'), "postie-settings[custom_image_field]", $custom_image_field, __("When set to 'Yes' no attachments will appear in the post (including images, video &amp; sound files). Instead the url to the attachment will be put into a custom field named 'image'. Your theme will need logic to display these attachments", 'postie')); ?>
848
  </table>
849
  </div>
850
  <div id="simpleTabs-content-7" class="simpleTabs-content">
874
  </form>
875
  <form id="postie-options" name="postie-options" method="post">
876
  <input type="hidden" name="action" value="reset" />
877
+ <input name="Submit" value="<?php _e("Reset Settings To Defaults", 'postie') ?>" type="submit" class='button'>
878
+ <span>&nbsp;<?php _e('(Your Mail server settings will be retained)', 'postie') ?></span>
879
  </form>
880
  </div>
881
 
deploy/deploy.sh CHANGED
@@ -1,3 +1,4 @@
 
1
  cd ..
2
  echo Create readme.txt
3
  cat docs/Postie.txt docs/Installation.txt docs/Usage.txt docs/FAQ.txt docs/Changes.txt > readme.txt
1
+ #!/bin/sh
2
  cd ..
3
  echo Create readme.txt
4
  cat docs/Postie.txt docs/Installation.txt docs/Usage.txt docs/FAQ.txt docs/Changes.txt > readme.txt
docs/Changes.txt CHANGED
@@ -27,9 +27,14 @@ All script, style and body tags are stripped from html emails.
27
  Attachments are now processed in the order they were attached.
28
 
29
  == CHANGELOG ==
 
 
 
 
 
30
  = 1.7.12 (2015-09-25) =
31
  * Add new setting to ignore email read/unread state
32
- * fix support for tags in html and plain messages
33
 
34
  = 1.7.11 (2015-09-18) =
35
  * Add FILEID to image and video templates
27
  Attachments are now processed in the order they were attached.
28
 
29
  == CHANGELOG ==
30
+ = 1.7.13 (2015-10-01) =
31
+ * Fix support for "Automatically convert urls to links" with html
32
+ * Fix support for "date" tag with html
33
+ * Prep for upcoming translation
34
+
35
  = 1.7.12 (2015-09-25) =
36
  * Add new setting to ignore email read/unread state
37
+ * Fix support for "tag: tags in html and plain messages
38
 
39
  = 1.7.11 (2015-09-18) =
40
  * Add FILEID to image and video templates
docs/Postie.txt CHANGED
@@ -6,11 +6,9 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
  Tested up to: 4.3.1
9
- Stable tag: 1.7.12
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
- Text Domain: postie
13
- Domain Path: /languages
14
 
15
  Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
16
 
@@ -45,6 +43,7 @@ More info at http://PostiePlugin.com/
45
 
46
  = Developers =
47
  * Several filter hooks available for custom processing of emails.
 
48
 
49
  == Screenshots ==
50
 
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
  Tested up to: 4.3.1
9
+ Stable tag: 1.7.13
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
 
12
 
13
  Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
14
 
43
 
44
  = Developers =
45
  * Several filter hooks available for custom processing of emails.
46
+ * More developer info at http://postieplugin.com/extending/
47
 
48
  == Screenshots ==
49
 
postie-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- $Id: postie-functions.php 1253587 2015-09-25 18:51:46Z WayneAllen $
4
  */
5
 
6
  //to turn on debug output add the following line to wp-config.php
@@ -153,14 +153,14 @@ function DebugEcho($v) {
153
  }
154
  }
155
 
156
- function tag_Date(&$content, $message_date) {
157
  //don't apply any offset here as it is accounted for later
158
  $html = LoadDOM($content);
159
  if ($html !== false) {
160
  $es = $html->find('text');
161
  //DebugEcho("tag_Date: html " . count($es));
162
  foreach ($es as $e) {
163
- DebugEcho("tag_Date: " . trim($e->plaintext));
164
  $matches = array();
165
  if (1 === preg_match("/^date:\s?(.*)$/im", trim($e->plaintext), $matches)) {
166
  $possibledate = trim($matches[1]);
@@ -257,9 +257,9 @@ function CreatePost($poster, $mimeDecodedEmail, $post_id, &$is_reply, $config, $
257
  }
258
  $message_date = HandleMessageEncoding($cte, $cs, $mimeDecodedEmail->headers["date"], $message_encoding, $message_dequote);
259
  }
260
- $message_date = tag_Date($content, $message_date);
261
 
262
- list($post_date, $post_date_gmt, $delay) = filter_Delay($content, $message_date, $config['time_offset']);
263
  if ($fulldebug) {
264
  DebugEcho("post date: $content");
265
  }
@@ -305,7 +305,7 @@ function CreatePost($poster, $mimeDecodedEmail, $post_id, &$is_reply, $config, $
305
  DebugEcho("post video: $content");
306
  }
307
 
308
- $content = filter_Linkify($content);
309
  if ($fulldebug) {
310
  DebugEcho("post linkify: $content");
311
  }
@@ -516,20 +516,20 @@ function tag_PostType(&$subject, $postmodifiers, $config) {
516
  return $post_type;
517
  }
518
 
519
- function filter_Linkify($text) {
520
  # It turns urls into links, and video urls into embedded players
521
- //DebugEcho("begin: filter_linkify");
522
- // $html = LoadDOM($text);
523
- // if ($html) {
524
- // //DebugEcho("filter_linkify: " . $html->save());
525
- // foreach ($html->find('text') as $element) {
526
- // //DebugEcho("filter_linkify: " . $element->innertext);
527
- // $element->innertext = make_links($element->innertext);
528
- // }
529
- // $ret = $html->save();
530
- // } else {
531
- $ret = make_links($text);
532
- // }
533
  //DebugEcho("end: filter_linkify");
534
  return $ret;
535
  }
@@ -1720,7 +1720,7 @@ function tag_Status(&$content, $currentstatus) {
1720
  return $poststatus;
1721
  }
1722
 
1723
- function filter_Delay(&$content, $message_date = NULL, $offset = 0) {
1724
  $delay = 0;
1725
  $matches = array();
1726
  if (preg_match("/delay:(-?[0-9dhm]+)/i", $content, $matches) && trim($matches[1])) {
@@ -1808,7 +1808,7 @@ function postie_media_handle_upload($part, $post_id, $poster, $generate_thubnail
1808
  $post_data = array();
1809
  $overrides = array('test_form' => false);
1810
 
1811
- $tmpFile = tempnam(get_temp_dir(), POSTIE_SLUG);
1812
  if ($tmpFile !== false) {
1813
  $fp = fopen($tmpFile, 'w');
1814
  if ($fp) {
@@ -1971,13 +1971,13 @@ function postie_handle_upload(&$file, $overrides = false, $time = null, $mimetyp
1971
 
1972
  // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error'].
1973
  $upload_error_strings = array(false,
1974
- __("The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>.", POSTIE_SLUG),
1975
- __("The uploaded file exceeds the <em>MAX_FILE_SIZE</em> directive that was specified in the HTML form.", POSTIE_SLUG),
1976
- __("The uploaded file was only partially uploaded.", POSTIE_SLUG),
1977
- __("No file was uploaded.", POSTIE_SLUG),
1978
  '',
1979
- __("Missing a temporary folder.", POSTIE_SLUG),
1980
- __("Failed to write file to disk.", POSTIE_SLUG));
1981
 
1982
  // Install user overrides. Did we mention that this voids your warranty?
1983
  if (is_array($overrides)) {
@@ -1989,11 +1989,11 @@ function postie_handle_upload(&$file, $overrides = false, $time = null, $mimetyp
1989
  }
1990
  // A non-empty file will pass this test.
1991
  if (!($file['size'] > 0 )) {
1992
- return $upload_error_handler($file, __('File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini.', POSTIE_SLUG));
1993
  }
1994
  // A properly uploaded file will pass this test. There should be no reason to override this one.
1995
  if (!file_exists($file['tmp_name'])) {
1996
- return $upload_error_handler($file, __('Specified file failed upload test.', POSTIE_SLUG));
1997
  }
1998
 
1999
  $mimetype = $file['type'];
@@ -2011,7 +2011,7 @@ function postie_handle_upload(&$file, $overrides = false, $time = null, $mimetyp
2011
 
2012
  if ((empty($mimetype) && empty($ext)) && !current_user_can('unfiltered_upload')) {
2013
  DebugEcho("postie_handle_upload: no type/ext & user restricted");
2014
- return $upload_error_handler($file, __('File type does not meet security guidelines. Try another.', POSTIE_SLUG));
2015
  }
2016
 
2017
  // A writable uploads dir will pass this test. Again, there's no point overriding this one.
@@ -2034,7 +2034,7 @@ function postie_handle_upload(&$file, $overrides = false, $time = null, $mimetyp
2034
  DebugEcho("new file: $new_file");
2035
  //DebugDump($file);
2036
  //DebugDump($uploads);
2037
- return $upload_error_handler($file, sprintf(__('The uploaded file could not be moved to %s.', POSTIE_SLUG), $uploads['path']));
2038
  } else {
2039
  DebugEcho("upload: rename to $new_file succeeded");
2040
  }
@@ -2478,8 +2478,6 @@ function filter_ReplaceImageCIDs(&$content, &$attachments, $config) {
2478
 
2479
  /**
2480
  * This function handles replacing image place holder #img1# with the HTML for that image
2481
- * @param string - text of post
2482
- * @param array - array of HTML for images for post
2483
  */
2484
  function filter_ReplaceImagePlaceHolders(&$content, $attachments, $config, $post_id, $image_pattern, $autoadd_images) {
2485
  if (!$config['custom_image_field']) {
@@ -2536,8 +2534,10 @@ function filter_ReplaceImagePlaceHolders(&$content, $attachments, $config, $post
2536
  }
2537
  DebugEcho("caption: $caption");
2538
 
2539
- DebugEcho("Adding alt text to image {$images[$i]->ID}");
2540
- update_post_meta($images[$i]->ID, '_wp_attachment_image_alt', $caption);
 
 
2541
 
2542
  $img_placeholder_temp = substr($matches[0], 0, -1);
2543
  DebugEcho($img_placeholder_temp);
@@ -2622,23 +2622,9 @@ function GetSubject(&$mimeDecodedEmail, &$content, $config) {
2622
  return $subject;
2623
  }
2624
 
2625
- /**
2626
- * this function determines tags for the post
2627
- *
2628
- */
2629
  function tag_Tags(&$content, $defaultTags, $isHtml) {
2630
  $post_tags = array();
2631
 
2632
- $post_tags = tag_TagsWorker($content, $isHtml);
2633
-
2634
- if (count($post_tags) == 0 && is_array($defaultTags)) {
2635
- $post_tags = $defaultTags;
2636
- }
2637
- return $post_tags;
2638
- }
2639
-
2640
- function tag_TagsWorker(&$content, $isHtml) {
2641
- $post_tags = array();
2642
  $matches = array();
2643
  $rx = '/[>|\a]?tags:\s?(.*?)[<|\z]/im';
2644
  if (!$isHtml) {
@@ -2655,17 +2641,17 @@ function tag_TagsWorker(&$content, $isHtml) {
2655
  $post_tags = preg_split("/,\s*/", trim($matches[1]));
2656
  }
2657
  }
 
 
 
 
2658
  return $post_tags;
2659
  }
2660
 
2661
- /**
2662
- * this function determines excerpt for the post
2663
- *
2664
- */
2665
  function tag_Excerpt(&$content, $config) {
2666
  $post_excerpt = '';
2667
  $matches = array();
2668
- if (preg_match('/:excerptstart ?(.*):excerptend/s', $content, $matches)) {
2669
  $content = str_replace($matches[0], "", $content);
2670
  $post_excerpt = $matches[1];
2671
  DebugEcho("excerpt found: $post_excerpt");
@@ -2824,7 +2810,7 @@ function BuildSelect($label, $id, $current_value, $options, $recommendation = NU
2824
 
2825
  $html.="</th><td><select name='$id' id='$id'>";
2826
  foreach ($options as $value) {
2827
- $html.="<option value='$value' " . ($value == $current_value ? "selected='selected'" : "") . ">" . __($value, POSTIE_SLUG) . '</option>';
2828
  }
2829
  $html.='</select>';
2830
  if (!empty($recommendation)) {
@@ -2854,8 +2840,8 @@ function BuildBooleanSelect($label, $id, $current_value, $recommendation = NULL,
2854
 
2855
  $html.="</th>
2856
  <td><select name='$id' id='$id'>
2857
- <option value='1'>" . __($options[0], POSTIE_SLUG) . "</option>
2858
- <option value='0' " . (!$current_value ? "selected='selected'" : "") . ">" . __($options[1], POSTIE_SLUG) . '</option>
2859
  </select>';
2860
  if (!empty($recommendation)) {
2861
  $html.='<p class = "description">' . $recommendation . '</p>';
@@ -3507,7 +3493,7 @@ function postie_test_config() {
3507
  <p>This shows what time it would be if you posted right now</p>
3508
  <?php
3509
  $content = "";
3510
- $data = filter_Delay($content, null, $config['time_offset']);
3511
  EchoInfo("Post time: $data[0]");
3512
  ?>
3513
  <h2>Encoding</h2>
@@ -3618,10 +3604,10 @@ function postie_get_mail() {
3618
  $emails = FetchMail($config['mail_server'], $config['mail_server_port'], $config['mail_userid'], $config['mail_password'], $config['input_protocol'], $config['time_offset'], $test_email, $config['delete_mail_after_processing'], $config['maxemails'], $config['email_tls']);
3619
  $message = 'Done.';
3620
 
3621
- EchoInfo(sprintf(__("There are %d messages to process", POSTIE_SLUG), count($emails)));
3622
 
3623
  if (function_exists('memory_get_usage')) {
3624
- DebugEcho(__("memory at start of email processing:", POSTIE_SLUG) . memory_get_usage());
3625
  }
3626
 
3627
  DebugDump($config);
@@ -3633,11 +3619,11 @@ function postie_get_mail() {
3633
  DebugEcho("$message_number: ------------------------------------");
3634
  //sanity check to see if there is any info in the message
3635
  if ($email == NULL) {
3636
- $message = __('Dang, message is empty!', POSTIE_SLUG);
3637
  EchoInfo("$message_number: $message");
3638
  continue;
3639
  } else if (($config['ignore_mail_state'] == false) && ( $email == 'already read')) {
3640
- $message = __("Message is already marked 'read'.", POSTIE_SLUG);
3641
  EchoInfo("$message_number: $message");
3642
  continue;
3643
  }
1
  <?php
2
  /*
3
+ $Id: postie-functions.php 1257745 2015-10-01 21:57:24Z WayneAllen $
4
  */
5
 
6
  //to turn on debug output add the following line to wp-config.php
153
  }
154
  }
155
 
156
+ function tag_Date(&$content, $message_date, $isHtml) {
157
  //don't apply any offset here as it is accounted for later
158
  $html = LoadDOM($content);
159
  if ($html !== false) {
160
  $es = $html->find('text');
161
  //DebugEcho("tag_Date: html " . count($es));
162
  foreach ($es as $e) {
163
+ //DebugEcho("tag_Date: " . trim($e->plaintext));
164
  $matches = array();
165
  if (1 === preg_match("/^date:\s?(.*)$/im", trim($e->plaintext), $matches)) {
166
  $possibledate = trim($matches[1]);
257
  }
258
  $message_date = HandleMessageEncoding($cte, $cs, $mimeDecodedEmail->headers["date"], $message_encoding, $message_dequote);
259
  }
260
+ $message_date = tag_Date($content, $message_date, 'html' == $config['prefer_text_type']);
261
 
262
+ list($post_date, $post_date_gmt, $delay) = tag_Delay($content, $message_date, $config['time_offset']);
263
  if ($fulldebug) {
264
  DebugEcho("post date: $content");
265
  }
305
  DebugEcho("post video: $content");
306
  }
307
 
308
+ $content = filter_Linkify($content, 'html' == $config['prefer_text_type']);
309
  if ($fulldebug) {
310
  DebugEcho("post linkify: $content");
311
  }
516
  return $post_type;
517
  }
518
 
519
+ function filter_Linkify($text, $isHtml) {
520
  # It turns urls into links, and video urls into embedded players
521
+ DebugEcho("begin: filter_linkify");
522
+ if ($isHtml) {
523
+ $html = LoadDOM($text);
524
+ //DebugEcho("filter_linkify: " . $html->save());
525
+ foreach ($html->find('text') as $element) {
526
+ //DebugEcho("filter_linkify: " . $element->innertext);
527
+ $element->innertext = make_links($element->innertext);
528
+ }
529
+ $ret = $html->save();
530
+ } else {
531
+ $ret = make_links($text);
532
+ }
533
  //DebugEcho("end: filter_linkify");
534
  return $ret;
535
  }
1720
  return $poststatus;
1721
  }
1722
 
1723
+ function tag_Delay(&$content, $message_date = NULL, $offset = 0) {
1724
  $delay = 0;
1725
  $matches = array();
1726
  if (preg_match("/delay:(-?[0-9dhm]+)/i", $content, $matches) && trim($matches[1])) {
1808
  $post_data = array();
1809
  $overrides = array('test_form' => false);
1810
 
1811
+ $tmpFile = tempnam(get_temp_dir(), 'postie');
1812
  if ($tmpFile !== false) {
1813
  $fp = fopen($tmpFile, 'w');
1814
  if ($fp) {
1971
 
1972
  // Courtesy of php.net, the strings that describe the error indicated in $_FILES[{form field}]['error'].
1973
  $upload_error_strings = array(false,
1974
+ __("The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>.", 'postie'),
1975
+ __("The uploaded file exceeds the <em>MAX_FILE_SIZE</em> directive that was specified in the HTML form.", 'postie'),
1976
+ __("The uploaded file was only partially uploaded.", 'postie'),
1977
+ __("No file was uploaded.", 'postie'),
1978
  '',
1979
+ __("Missing a temporary folder.", 'postie'),
1980
+ __("Failed to write file to disk.", 'postie'));
1981
 
1982
  // Install user overrides. Did we mention that this voids your warranty?
1983
  if (is_array($overrides)) {
1989
  }
1990
  // A non-empty file will pass this test.
1991
  if (!($file['size'] > 0 )) {
1992
+ return $upload_error_handler($file, __('File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini.', 'postie'));
1993
  }
1994
  // A properly uploaded file will pass this test. There should be no reason to override this one.
1995
  if (!file_exists($file['tmp_name'])) {
1996
+ return $upload_error_handler($file, __('Specified file failed upload test.', 'postie'));
1997
  }
1998
 
1999
  $mimetype = $file['type'];
2011
 
2012
  if ((empty($mimetype) && empty($ext)) && !current_user_can('unfiltered_upload')) {
2013
  DebugEcho("postie_handle_upload: no type/ext & user restricted");
2014
+ return $upload_error_handler($file, __('File type does not meet security guidelines. Try another.', 'postie'));
2015
  }
2016
 
2017
  // A writable uploads dir will pass this test. Again, there's no point overriding this one.
2034
  DebugEcho("new file: $new_file");
2035
  //DebugDump($file);
2036
  //DebugDump($uploads);
2037
+ return $upload_error_handler($file, sprintf(__('The uploaded file could not be moved to %s.', 'postie'), $uploads['path']));
2038
  } else {
2039
  DebugEcho("upload: rename to $new_file succeeded");
2040
  }
2478
 
2479
  /**
2480
  * This function handles replacing image place holder #img1# with the HTML for that image
 
 
2481
  */
2482
  function filter_ReplaceImagePlaceHolders(&$content, $attachments, $config, $post_id, $image_pattern, $autoadd_images) {
2483
  if (!$config['custom_image_field']) {
2534
  }
2535
  DebugEcho("caption: $caption");
2536
 
2537
+ if (count($images) > $i) {
2538
+ DebugEcho("Adding alt text to image {$images[$i]->ID}");
2539
+ update_post_meta($images[$i]->ID, '_wp_attachment_image_alt', $caption);
2540
+ }
2541
 
2542
  $img_placeholder_temp = substr($matches[0], 0, -1);
2543
  DebugEcho($img_placeholder_temp);
2622
  return $subject;
2623
  }
2624
 
 
 
 
 
2625
  function tag_Tags(&$content, $defaultTags, $isHtml) {
2626
  $post_tags = array();
2627
 
 
 
 
 
 
 
 
 
 
 
2628
  $matches = array();
2629
  $rx = '/[>|\a]?tags:\s?(.*?)[<|\z]/im';
2630
  if (!$isHtml) {
2641
  $post_tags = preg_split("/,\s*/", trim($matches[1]));
2642
  }
2643
  }
2644
+
2645
+ if (count($post_tags) == 0 && is_array($defaultTags)) {
2646
+ $post_tags = $defaultTags;
2647
+ }
2648
  return $post_tags;
2649
  }
2650
 
 
 
 
 
2651
  function tag_Excerpt(&$content, $config) {
2652
  $post_excerpt = '';
2653
  $matches = array();
2654
+ if (preg_match('/:excerptstart ?(.*):excerptend/is', $content, $matches)) {
2655
  $content = str_replace($matches[0], "", $content);
2656
  $post_excerpt = $matches[1];
2657
  DebugEcho("excerpt found: $post_excerpt");
2810
 
2811
  $html.="</th><td><select name='$id' id='$id'>";
2812
  foreach ($options as $value) {
2813
+ $html.="<option value='$value' " . ($value == $current_value ? "selected='selected'" : "") . ">" . __($value, 'postie') . '</option>';
2814
  }
2815
  $html.='</select>';
2816
  if (!empty($recommendation)) {
2840
 
2841
  $html.="</th>
2842
  <td><select name='$id' id='$id'>
2843
+ <option value='1'>" . __($options[0], 'postie') . "</option>
2844
+ <option value='0' " . (!$current_value ? "selected='selected'" : "") . ">" . __($options[1], 'postie') . '</option>
2845
  </select>';
2846
  if (!empty($recommendation)) {
2847
  $html.='<p class = "description">' . $recommendation . '</p>';
3493
  <p>This shows what time it would be if you posted right now</p>
3494
  <?php
3495
  $content = "";
3496
+ $data = tag_Delay($content, null, $config['time_offset']);
3497
  EchoInfo("Post time: $data[0]");
3498
  ?>
3499
  <h2>Encoding</h2>
3604
  $emails = FetchMail($config['mail_server'], $config['mail_server_port'], $config['mail_userid'], $config['mail_password'], $config['input_protocol'], $config['time_offset'], $test_email, $config['delete_mail_after_processing'], $config['maxemails'], $config['email_tls']);
3605
  $message = 'Done.';
3606
 
3607
+ EchoInfo(sprintf(__("There are %d messages to process", 'postie'), count($emails)));
3608
 
3609
  if (function_exists('memory_get_usage')) {
3610
+ DebugEcho(__("memory at start of email processing:", 'postie') . memory_get_usage());
3611
  }
3612
 
3613
  DebugDump($config);
3619
  DebugEcho("$message_number: ------------------------------------");
3620
  //sanity check to see if there is any info in the message
3621
  if ($email == NULL) {
3622
+ $message = __('Dang, message is empty!', 'postie');
3623
  EchoInfo("$message_number: $message");
3624
  continue;
3625
  } else if (($config['ignore_mail_state'] == false) && ( $email == 'already read')) {
3626
+ $message = __("Message is already marked 'read'.", 'postie');
3627
  EchoInfo("$message_number: $message");
3628
  continue;
3629
  }
postie.php CHANGED
@@ -4,10 +4,11 @@
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
7
- Version: 1.7.12
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
 
11
  */
12
 
13
  /* Copyright (c) 2015 Wayne Allen (email : wayne@allens-home.com)
@@ -27,14 +28,13 @@
27
  */
28
 
29
  /*
30
- $Id: postie.php 1253587 2015-09-25 18:51:46Z WayneAllen $
31
  */
32
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
33
 
34
- define('POSTIE_VERSION', '1.7.12');
35
  define("POSTIE_ROOT", dirname(__FILE__));
36
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
37
- define('POSTIE_SLUG', 'postie');
38
 
39
  //register the hooks early in the page in case some method needs the result of one of them (i.e. cron_schedules)
40
  add_action('init', 'postie_disable_kses_content', 20);
@@ -66,7 +66,7 @@ if (is_admin()) {
66
 
67
  function postie_load_domain() {
68
  $plugin_dir = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));
69
- load_plugin_textdomain(POSTIE_SLUG, false, dirname(plugin_basename(__FILE__)) . '/languages/');
70
  }
71
 
72
  add_action('init', 'postie_load_domain');
@@ -141,7 +141,7 @@ function postie_loadjs_options_page() {
141
 
142
  function postie_admin_page() {
143
  if (!current_user_can('manage_options')) {
144
- wp_die(__('You do not have sufficient permissions to access this page.', POSTIE_SLUG));
145
  }
146
  include 'config_form.php';
147
  }
@@ -202,8 +202,8 @@ function postie_warnings() {
202
  ) && !isset($_POST['submit'])) {
203
 
204
  function postie_enter_info() {
205
- echo "<div id='postie-info-warning' class='updated fade'><p><strong>" . __('Postie is almost ready.', POSTIE_SLUG) . "</strong> "
206
- . sprintf(__('You must <a href="%1$s">enter your email settings</a> for it to work.', POSTIE_SLUG), "admin.php?page=postie-settings")
207
  . "</p></div> ";
208
  }
209
 
@@ -215,7 +215,7 @@ function postie_warnings() {
215
 
216
  function postie_imap_warning() {
217
  echo "<div id='postie-imap-warning' class='error'><p><strong>";
218
- echo __('Warning: the IMAP php extension is not installed. Postie can not use IMAP, IMAP-SSL or POP-SSL without this extension.', POSTIE_SLUG);
219
  echo "</strong></p></div>";
220
  }
221
 
@@ -225,7 +225,7 @@ function postie_warnings() {
225
 
226
  function postie_tls_warning() {
227
  echo "<div id='postie-lst-warning' class='error'><p><strong>";
228
- echo __('Warning: The POP3 connector does not support TLS.', POSTIE_SLUG);
229
  echo "</strong></p></div>";
230
  }
231
 
@@ -236,7 +236,7 @@ function postie_warnings() {
236
 
237
  function postie_markdown_warning() {
238
  echo "<div id='postie-lst-warning' class='error'><p><strong>";
239
- _e("You currently have the Markdown plugin installed. It will cause problems if you send in HTML email. Please turn it off if you intend to send email using HTML.", POSTIE_SLUG);
240
  echo "</strong></p></div>";
241
  }
242
 
@@ -247,7 +247,7 @@ function postie_warnings() {
247
 
248
  function postie_iconv_warning() {
249
  echo "<div id='postie-lst-warning' class='error'><p><strong>";
250
- _e("Warning! Postie requires that iconv be enabled.", POSTIE_SLUG);
251
  echo "</strong></p></div>";
252
  }
253
 
@@ -259,7 +259,7 @@ function postie_warnings() {
259
 
260
  function postie_adminuser_warning() {
261
  echo "<div id='postie-mbstring-warning' class='error'><p><strong>";
262
- echo __('Warning: the Admin username is not a valid WordPress login. Postie may reject emails if this is not corrected.', POSTIE_SLUG);
263
  echo "</strong></p></div>";
264
  }
265
 
@@ -327,12 +327,12 @@ function postie_decron() {
327
  function postie_more_reccurences($schedules) {
328
  //Do not echo output in filters, it seems to break some installs
329
  //error_log("postie_more_reccurences: setting cron schedules");
330
- $schedules['weekly'] = array('interval' => (60 * 60 * 24 * 7), 'display' => __('Once Weekly', POSTIE_SLUG));
331
- $schedules['twiceperhour'] = array('interval' => 60 * 30, 'display' => __('Twice per hour', POSTIE_SLUG));
332
- $schedules['tenminutes'] = array('interval' => 60 * 10, 'display' => __('Every 10 minutes', POSTIE_SLUG));
333
- $schedules['fiveminutes'] = array('interval' => 60 * 5, 'display' => __('Every 5 minutes', POSTIE_SLUG));
334
- $schedules['oneminute'] = array('interval' => 60 * 1, 'display' => __('Every 1 minute', POSTIE_SLUG));
335
- $schedules['thirtyseconds'] = array('interval' => 30, 'display' => __('Every 30 seconds', POSTIE_SLUG));
336
- $schedules['fifteenseconds'] = array('interval' => 15, 'display' => __('Every 15 seconds', POSTIE_SLUG));
337
  return $schedules;
338
  }
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
7
+ Version: 1.7.13
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
11
+ Text Domain: postie
12
  */
13
 
14
  /* Copyright (c) 2015 Wayne Allen (email : wayne@allens-home.com)
28
  */
29
 
30
  /*
31
+ $Id: postie.php 1257748 2015-10-01 21:58:29Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
34
 
35
+ define('POSTIE_VERSION', '1.7.13');
36
  define("POSTIE_ROOT", dirname(__FILE__));
37
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
 
38
 
39
  //register the hooks early in the page in case some method needs the result of one of them (i.e. cron_schedules)
40
  add_action('init', 'postie_disable_kses_content', 20);
66
 
67
  function postie_load_domain() {
68
  $plugin_dir = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));
69
+ load_plugin_textdomain('postie', false, dirname(plugin_basename(__FILE__)) . '/languages/');
70
  }
71
 
72
  add_action('init', 'postie_load_domain');
141
 
142
  function postie_admin_page() {
143
  if (!current_user_can('manage_options')) {
144
+ wp_die(__('You do not have sufficient permissions to access this page.', 'postie'));
145
  }
146
  include 'config_form.php';
147
  }
202
  ) && !isset($_POST['submit'])) {
203
 
204
  function postie_enter_info() {
205
+ echo "<div id='postie-info-warning' class='updated fade'><p><strong>" . __('Postie is almost ready.', 'postie') . "</strong> "
206
+ . sprintf(__('You must <a href="%1$s">enter your email settings</a> for it to work.', 'postie'), "admin.php?page=postie-settings")
207
  . "</p></div> ";
208
  }
209
 
215
 
216
  function postie_imap_warning() {
217
  echo "<div id='postie-imap-warning' class='error'><p><strong>";
218
+ echo __('Warning: the IMAP php extension is not installed. Postie can not use IMAP, IMAP-SSL or POP-SSL without this extension.', 'postie');
219
  echo "</strong></p></div>";
220
  }
221
 
225
 
226
  function postie_tls_warning() {
227
  echo "<div id='postie-lst-warning' class='error'><p><strong>";
228
+ echo __('Warning: The POP3 connector does not support TLS.', 'postie');
229
  echo "</strong></p></div>";
230
  }
231
 
236
 
237
  function postie_markdown_warning() {
238
  echo "<div id='postie-lst-warning' class='error'><p><strong>";
239
+ _e("You currently have the Markdown plugin installed. It will cause problems if you send in HTML email. Please turn it off if you intend to send email using HTML.", 'postie');
240
  echo "</strong></p></div>";
241
  }
242
 
247
 
248
  function postie_iconv_warning() {
249
  echo "<div id='postie-lst-warning' class='error'><p><strong>";
250
+ _e("Warning! Postie requires that iconv be enabled.", 'postie');
251
  echo "</strong></p></div>";
252
  }
253
 
259
 
260
  function postie_adminuser_warning() {
261
  echo "<div id='postie-mbstring-warning' class='error'><p><strong>";
262
+ echo __('Warning: the Admin username is not a valid WordPress login. Postie may reject emails if this is not corrected.', 'postie');
263
  echo "</strong></p></div>";
264
  }
265
 
327
  function postie_more_reccurences($schedules) {
328
  //Do not echo output in filters, it seems to break some installs
329
  //error_log("postie_more_reccurences: setting cron schedules");
330
+ $schedules['weekly'] = array('interval' => (60 * 60 * 24 * 7), 'display' => __('Once Weekly', 'postie'));
331
+ $schedules['twiceperhour'] = array('interval' => 60 * 30, 'display' => __('Twice per hour', 'postie'));
332
+ $schedules['tenminutes'] = array('interval' => 60 * 10, 'display' => __('Every 10 minutes', 'postie'));
333
+ $schedules['fiveminutes'] = array('interval' => 60 * 5, 'display' => __('Every 5 minutes', 'postie'));
334
+ $schedules['oneminute'] = array('interval' => 60 * 1, 'display' => __('Every 1 minute', 'postie'));
335
+ $schedules['thirtyseconds'] = array('interval' => 30, 'display' => __('Every 30 seconds', 'postie'));
336
+ $schedules['fifteenseconds'] = array('interval' => 15, 'display' => __('Every 15 seconds', 'postie'));
337
  return $schedules;
338
  }
readme.txt CHANGED
@@ -6,11 +6,9 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
  Tested up to: 4.3.1
9
- Stable tag: 1.7.12
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
- Text Domain: postie
13
- Domain Path: /languages
14
 
15
  Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
16
 
@@ -45,6 +43,7 @@ More info at http://PostiePlugin.com/
45
 
46
  = Developers =
47
  * Several filter hooks available for custom processing of emails.
 
48
 
49
  == Screenshots ==
50
 
@@ -236,9 +235,14 @@ All script, style and body tags are stripped from html emails.
236
  Attachments are now processed in the order they were attached.
237
 
238
  == CHANGELOG ==
 
 
 
 
 
239
  = 1.7.12 (2015-09-25) =
240
  * Add new setting to ignore email read/unread state
241
- * fix support for tags in html and plain messages
242
 
243
  = 1.7.11 (2015-09-18) =
244
  * Add FILEID to image and video templates
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
  Tested up to: 4.3.1
9
+ Stable tag: 1.7.13
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
 
12
 
13
  Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
14
 
43
 
44
  = Developers =
45
  * Several filter hooks available for custom processing of emails.
46
+ * More developer info at http://postieplugin.com/extending/
47
 
48
  == Screenshots ==
49
 
235
  Attachments are now processed in the order they were attached.
236
 
237
  == CHANGELOG ==
238
+ = 1.7.13 (2015-10-01) =
239
+ * Fix support for "Automatically convert urls to links" with html
240
+ * Fix support for "date" tag with html
241
+ * Prep for upcoming translation
242
+
243
  = 1.7.12 (2015-09-25) =
244
  * Add new setting to ignore email read/unread state
245
+ * Fix support for "tag: tags in html and plain messages
246
 
247
  = 1.7.11 (2015-09-18) =
248
  * Add FILEID to image and video templates