Flamingo - Version 1.5

Version Description

  • Tested up to WordPress 4.7.
  • Requires WordPress 4.5 or higher.
  • count() method added to Flamingo_Inbound_Message class.
  • All language files in the languages folder were removed. Translations have moved to translate.wordpress.org.
Download this release

Release Info

Developer takayukister
Plugin Icon 128x128 Flamingo
Version 1.5
Comparing to
See all releases

Code changes from version 1.4 to 1.5

admin/admin-functions.php CHANGED
@@ -1,14 +1,18 @@
1
  <?php
2
 
3
  function flamingo_current_action() {
4
- if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
 
5
  return 'delete_all';
 
6
 
7
- if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
8
  return $_REQUEST['action'];
 
9
 
10
- if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
11
  return $_REQUEST['action2'];
 
12
 
13
  return false;
14
  }
@@ -21,5 +25,3 @@ function flamingo_get_all_ids_in_trash( $post_type ) {
21
 
22
  return $wpdb->get_col( $q );
23
  }
24
-
25
- ?>
1
  <?php
2
 
3
  function flamingo_current_action() {
4
+ if ( isset( $_REQUEST['delete_all'] )
5
+ || isset( $_REQUEST['delete_all2'] ) ) {
6
  return 'delete_all';
7
+ }
8
 
9
+ if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
10
  return $_REQUEST['action'];
11
+ }
12
 
13
+ if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
14
  return $_REQUEST['action2'];
15
+ }
16
 
17
  return false;
18
  }
25
 
26
  return $wpdb->get_col( $q );
27
  }
 
 
admin/admin.php CHANGED
@@ -40,8 +40,9 @@ function flamingo_set_screen_options( $result, $option, $value ) {
40
  'toplevel_page_flamingo_per_page',
41
  'flamingo_page_flamingo_inbound_per_page' );
42
 
43
- if ( in_array( $option, $flamingo_screens ) )
44
  $result = $value;
 
45
 
46
  return $result;
47
  }
@@ -94,8 +95,9 @@ function flamingo_admin_updated_message() {
94
  return;
95
  }
96
 
97
- if ( empty( $updated_message ) )
98
  return;
 
99
 
100
  ?>
101
  <div id="message" class="updated"><p><?php echo $updated_message; ?></p></div>
@@ -113,8 +115,9 @@ function flamingo_load_contact_admin() {
113
  $post = new Flamingo_Contact( $_REQUEST['post'] );
114
 
115
  if ( ! empty( $post ) ) {
116
- if ( ! current_user_can( 'flamingo_edit_contact', $post->id ) )
117
  wp_die( __( 'You are not allowed to edit this item.', 'flamingo' ) );
 
118
 
119
  check_admin_referer( 'flamingo-update-contact_' . $post->id );
120
 
@@ -139,30 +142,36 @@ function flamingo_load_contact_admin() {
139
  }
140
 
141
  if ( 'delete' == $action && ! empty( $_REQUEST['post'] ) ) {
142
- if ( ! is_array( $_REQUEST['post'] ) )
143
  check_admin_referer( 'flamingo-delete-contact_' . $_REQUEST['post'] );
144
- else
145
  check_admin_referer( 'bulk-posts' );
 
146
 
147
  $deleted = 0;
148
 
149
  foreach ( (array) $_REQUEST['post'] as $post ) {
150
  $post = new Flamingo_Contact( $post );
151
 
152
- if ( empty( $post ) )
153
  continue;
 
154
 
155
- if ( ! current_user_can( 'flamingo_delete_contact', $post->id ) )
156
  wp_die( __( 'You are not allowed to delete this item.', 'flamingo' ) );
 
157
 
158
- if ( ! $post->delete() )
159
  wp_die( __( 'Error in deleting.', 'flamingo' ) );
 
160
 
161
  $deleted += 1;
162
  }
163
 
164
- if ( ! empty( $deleted ) )
165
- $redirect_to = add_query_arg( array( 'message' => 'contactdeleted' ), $redirect_to );
 
 
166
 
167
  wp_safe_redirect( $redirect_to );
168
  exit();
@@ -192,21 +201,25 @@ function flamingo_load_contact_admin() {
192
  'order' => 'ASC',
193
  'meta_key' => '_email' );
194
 
195
- if ( ! empty( $_GET['s'] ) )
196
  $args['s'] = $_GET['s'];
 
197
 
198
  if ( ! empty( $_GET['orderby'] ) ) {
199
- if ( 'email' == $_GET['orderby'] )
200
  $args['meta_key'] = '_email';
201
- elseif ( 'name' == $_GET['orderby'] )
202
  $args['meta_key'] = '_name';
 
203
  }
204
 
205
- if ( ! empty( $_GET['order'] ) && 'asc' == strtolower( $_GET['order'] ) )
206
  $args['order'] = 'ASC';
 
207
 
208
- if ( ! empty( $_GET['contact_tag_id'] ) )
209
  $args['contact_tag_id'] = explode( ',', $_GET['contact_tag_id'] );
 
210
 
211
  $items = Flamingo_Contact::find( $args );
212
 
@@ -223,7 +236,8 @@ function flamingo_load_contact_admin() {
223
  exit();
224
  }
225
 
226
- if ( ! empty( $_GET['sendmail'] ) && ! empty( $_REQUEST['contact_tag_id'] ) ) {
 
227
  $redirect_to = admin_url( 'admin.php?page=flamingo_outbound' );
228
 
229
  $redirect_to = add_query_arg( array(
@@ -248,8 +262,10 @@ function flamingo_load_contact_admin() {
248
  'flamingo_contact_name_meta_box', null, 'normal', 'core' );
249
 
250
  } else {
251
- if ( ! class_exists( 'Flamingo_Contacts_List_Table' ) )
252
- require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/class-contacts-list-table.php';
 
 
253
 
254
  $current_screen = get_current_screen();
255
 
@@ -266,7 +282,8 @@ function flamingo_contact_admin_page() {
266
  $action = flamingo_current_action();
267
  $post_id = ! empty( $_REQUEST['post'] ) ? $_REQUEST['post'] : '';
268
 
269
- if ( 'edit' == $action && Flamingo_Contact::post_type == get_post_type( $post_id ) ) {
 
270
  flamingo_contact_edit_page();
271
  return;
272
  }
@@ -276,7 +293,6 @@ function flamingo_contact_admin_page() {
276
 
277
  ?>
278
  <div class="wrap">
279
- <?php screen_icon(); ?>
280
 
281
  <h1><?php
282
  echo esc_html( __( 'Flamingo Address Book', 'flamingo' ) );
@@ -303,8 +319,9 @@ function flamingo_contact_admin_page() {
303
  function flamingo_contact_edit_page() {
304
  $post = new Flamingo_Contact( $_REQUEST['post'] );
305
 
306
- if ( empty( $post ) )
307
  return;
 
308
 
309
  require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/meta-boxes.php';
310
 
@@ -319,60 +336,76 @@ function flamingo_load_inbound_admin() {
319
  $redirect_to = admin_url( 'admin.php?page=flamingo_inbound' );
320
 
321
  if ( 'trash' == $action && ! empty( $_REQUEST['post'] ) ) {
322
- if ( ! is_array( $_REQUEST['post'] ) )
323
- check_admin_referer( 'flamingo-trash-inbound-message_' . $_REQUEST['post'] );
324
- else
 
325
  check_admin_referer( 'bulk-posts' );
 
326
 
327
  $trashed = 0;
328
 
329
  foreach ( (array) $_REQUEST['post'] as $post ) {
330
  $post = new Flamingo_Inbound_Message( $post );
331
 
332
- if ( empty( $post ) )
333
  continue;
 
334
 
335
- if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id ) )
 
336
  wp_die( __( 'You are not allowed to move this item to the Trash.', 'flamingo' ) );
 
337
 
338
- if ( ! $post->trash() )
339
  wp_die( __( 'Error in moving to Trash.', 'flamingo' ) );
 
340
 
341
  $trashed += 1;
342
  }
343
 
344
- if ( ! empty( $trashed ) )
345
- $redirect_to = add_query_arg( array( 'message' => 'inboundtrashed' ), $redirect_to );
 
 
346
 
347
  wp_safe_redirect( $redirect_to );
348
  exit();
349
  }
350
 
351
  if ( 'untrash' == $action && ! empty( $_REQUEST['post'] ) ) {
352
- if ( ! is_array( $_REQUEST['post'] ) )
353
- check_admin_referer( 'flamingo-untrash-inbound-message_' . $_REQUEST['post'] );
354
- else
 
355
  check_admin_referer( 'bulk-posts' );
 
356
 
357
  $untrashed = 0;
358
 
359
  foreach ( (array) $_REQUEST['post'] as $post ) {
360
  $post = new Flamingo_Inbound_Message( $post );
361
 
362
- if ( empty( $post ) )
363
  continue;
 
364
 
365
- if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id ) )
 
366
  wp_die( __( 'You are not allowed to restore this item from the Trash.', 'flamingo' ) );
 
367
 
368
- if ( ! $post->untrash() )
369
  wp_die( __( 'Error in restoring from Trash.', 'flamingo' ) );
 
370
 
371
  $untrashed += 1;
372
  }
373
 
374
- if ( ! empty( $untrashed ) )
375
- $redirect_to = add_query_arg( array( 'message' => 'inbounduntrashed' ), $redirect_to );
 
 
376
 
377
  wp_safe_redirect( $redirect_to );
378
  exit();
@@ -388,86 +421,109 @@ function flamingo_load_inbound_admin() {
388
  }
389
 
390
  if ( 'delete' == $action && ! empty( $_REQUEST['post'] ) ) {
391
- if ( ! is_array( $_REQUEST['post'] ) )
392
- check_admin_referer( 'flamingo-delete-inbound-message_' . $_REQUEST['post'] );
393
- else
 
394
  check_admin_referer( 'bulk-posts' );
 
395
 
396
  $deleted = 0;
397
 
398
  foreach ( (array) $_REQUEST['post'] as $post ) {
399
  $post = new Flamingo_Inbound_Message( $post );
400
 
401
- if ( empty( $post ) )
402
  continue;
 
403
 
404
- if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id ) )
 
405
  wp_die( __( 'You are not allowed to delete this item.', 'flamingo' ) );
 
406
 
407
- if ( ! $post->delete() )
408
  wp_die( __( 'Error in deleting.', 'flamingo' ) );
 
409
 
410
  $deleted += 1;
411
  }
412
 
413
- if ( ! empty( $deleted ) )
414
- $redirect_to = add_query_arg( array( 'message' => 'inbounddeleted' ), $redirect_to );
 
 
415
 
416
  wp_safe_redirect( $redirect_to );
417
  exit();
418
  }
419
 
420
  if ( 'spam' == $action && ! empty( $_REQUEST['post'] ) ) {
421
- if ( ! is_array( $_REQUEST['post'] ) )
422
- check_admin_referer( 'flamingo-spam-inbound-message_' . $_REQUEST['post'] );
423
- else
 
424
  check_admin_referer( 'bulk-posts' );
 
425
 
426
  $submitted = 0;
427
 
428
  foreach ( (array) $_REQUEST['post'] as $post ) {
429
  $post = new Flamingo_Inbound_Message( $post );
430
 
431
- if ( empty( $post ) )
432
  continue;
 
433
 
434
- if ( ! current_user_can( 'flamingo_spam_inbound_message', $post->id ) )
435
  wp_die( __( 'You are not allowed to spam this item.', 'flamingo' ) );
 
436
 
437
- if ( $post->spam() )
438
  $submitted += 1;
 
439
  }
440
 
441
- if ( ! empty( $submitted ) )
442
- $redirect_to = add_query_arg( array( 'message' => 'inboundspammed' ), $redirect_to );
 
 
443
 
444
  wp_safe_redirect( $redirect_to );
445
  exit();
446
  }
447
 
448
  if ( 'unspam' == $action && ! empty( $_REQUEST['post'] ) ) {
449
- if ( ! is_array( $_REQUEST['post'] ) )
450
- check_admin_referer( 'flamingo-unspam-inbound-message_' . $_REQUEST['post'] );
451
- else
 
452
  check_admin_referer( 'bulk-posts' );
 
453
 
454
  $submitted = 0;
455
 
456
  foreach ( (array) $_REQUEST['post'] as $post ) {
457
  $post = new Flamingo_Inbound_Message( $post );
458
 
459
- if ( empty( $post ) )
460
  continue;
 
461
 
462
- if ( ! current_user_can( 'flamingo_unspam_inbound_message', $post->id ) )
 
463
  wp_die( __( 'You are not allowed to unspam this item.', 'flamingo' ) );
 
464
 
465
- if ( $post->unspam() )
466
  $submitted += 1;
 
467
  }
468
 
469
- if ( ! empty( $submitted ) )
470
- $redirect_to = add_query_arg( array( 'message' => 'inboundunspammed' ), $redirect_to );
 
 
471
 
472
  wp_safe_redirect( $redirect_to );
473
  exit();
@@ -595,7 +651,6 @@ function flamingo_inbound_admin_page() {
595
 
596
  ?>
597
  <div class="wrap">
598
- <?php screen_icon(); ?>
599
 
600
  <h1><?php
601
  echo esc_html( __( 'Inbound Messages', 'flamingo' ) );
@@ -707,7 +762,6 @@ function flamingo_outbound_admin_page() {
707
 
708
  ?>
709
  <div class="wrap">
710
- <?php screen_icon(); ?>
711
 
712
  <h1><?php
713
  echo esc_html( __( 'Outbound Messages', 'flamingo' ) );
40
  'toplevel_page_flamingo_per_page',
41
  'flamingo_page_flamingo_inbound_per_page' );
42
 
43
+ if ( in_array( $option, $flamingo_screens ) ) {
44
  $result = $value;
45
+ }
46
 
47
  return $result;
48
  }
95
  return;
96
  }
97
 
98
+ if ( empty( $updated_message ) ) {
99
  return;
100
+ }
101
 
102
  ?>
103
  <div id="message" class="updated"><p><?php echo $updated_message; ?></p></div>
115
  $post = new Flamingo_Contact( $_REQUEST['post'] );
116
 
117
  if ( ! empty( $post ) ) {
118
+ if ( ! current_user_can( 'flamingo_edit_contact', $post->id ) ) {
119
  wp_die( __( 'You are not allowed to edit this item.', 'flamingo' ) );
120
+ }
121
 
122
  check_admin_referer( 'flamingo-update-contact_' . $post->id );
123
 
142
  }
143
 
144
  if ( 'delete' == $action && ! empty( $_REQUEST['post'] ) ) {
145
+ if ( ! is_array( $_REQUEST['post'] ) ) {
146
  check_admin_referer( 'flamingo-delete-contact_' . $_REQUEST['post'] );
147
+ } else {
148
  check_admin_referer( 'bulk-posts' );
149
+ }
150
 
151
  $deleted = 0;
152
 
153
  foreach ( (array) $_REQUEST['post'] as $post ) {
154
  $post = new Flamingo_Contact( $post );
155
 
156
+ if ( empty( $post ) ) {
157
  continue;
158
+ }
159
 
160
+ if ( ! current_user_can( 'flamingo_delete_contact', $post->id ) ) {
161
  wp_die( __( 'You are not allowed to delete this item.', 'flamingo' ) );
162
+ }
163
 
164
+ if ( ! $post->delete() ) {
165
  wp_die( __( 'Error in deleting.', 'flamingo' ) );
166
+ }
167
 
168
  $deleted += 1;
169
  }
170
 
171
+ if ( ! empty( $deleted ) ) {
172
+ $redirect_to = add_query_arg(
173
+ array( 'message' => 'contactdeleted' ), $redirect_to );
174
+ }
175
 
176
  wp_safe_redirect( $redirect_to );
177
  exit();
201
  'order' => 'ASC',
202
  'meta_key' => '_email' );
203
 
204
+ if ( ! empty( $_GET['s'] ) ) {
205
  $args['s'] = $_GET['s'];
206
+ }
207
 
208
  if ( ! empty( $_GET['orderby'] ) ) {
209
+ if ( 'email' == $_GET['orderby'] ) {
210
  $args['meta_key'] = '_email';
211
+ } elseif ( 'name' == $_GET['orderby'] ) {
212
  $args['meta_key'] = '_name';
213
+ }
214
  }
215
 
216
+ if ( ! empty( $_GET['order'] ) && 'asc' == strtolower( $_GET['order'] ) ) {
217
  $args['order'] = 'ASC';
218
+ }
219
 
220
+ if ( ! empty( $_GET['contact_tag_id'] ) ) {
221
  $args['contact_tag_id'] = explode( ',', $_GET['contact_tag_id'] );
222
+ }
223
 
224
  $items = Flamingo_Contact::find( $args );
225
 
236
  exit();
237
  }
238
 
239
+ if ( ! empty( $_GET['sendmail'] )
240
+ && ! empty( $_REQUEST['contact_tag_id'] ) ) {
241
  $redirect_to = admin_url( 'admin.php?page=flamingo_outbound' );
242
 
243
  $redirect_to = add_query_arg( array(
262
  'flamingo_contact_name_meta_box', null, 'normal', 'core' );
263
 
264
  } else {
265
+ if ( ! class_exists( 'Flamingo_Contacts_List_Table' ) ) {
266
+ require_once FLAMINGO_PLUGIN_DIR
267
+ . '/admin/includes/class-contacts-list-table.php';
268
+ }
269
 
270
  $current_screen = get_current_screen();
271
 
282
  $action = flamingo_current_action();
283
  $post_id = ! empty( $_REQUEST['post'] ) ? $_REQUEST['post'] : '';
284
 
285
+ if ( 'edit' == $action
286
+ && Flamingo_Contact::post_type == get_post_type( $post_id ) ) {
287
  flamingo_contact_edit_page();
288
  return;
289
  }
293
 
294
  ?>
295
  <div class="wrap">
 
296
 
297
  <h1><?php
298
  echo esc_html( __( 'Flamingo Address Book', 'flamingo' ) );
319
  function flamingo_contact_edit_page() {
320
  $post = new Flamingo_Contact( $_REQUEST['post'] );
321
 
322
+ if ( empty( $post ) ) {
323
  return;
324
+ }
325
 
326
  require_once FLAMINGO_PLUGIN_DIR . '/admin/includes/meta-boxes.php';
327
 
336
  $redirect_to = admin_url( 'admin.php?page=flamingo_inbound' );
337
 
338
  if ( 'trash' == $action && ! empty( $_REQUEST['post'] ) ) {
339
+ if ( ! is_array( $_REQUEST['post'] ) ) {
340
+ check_admin_referer(
341
+ 'flamingo-trash-inbound-message_' . $_REQUEST['post'] );
342
+ } else {
343
  check_admin_referer( 'bulk-posts' );
344
+ }
345
 
346
  $trashed = 0;
347
 
348
  foreach ( (array) $_REQUEST['post'] as $post ) {
349
  $post = new Flamingo_Inbound_Message( $post );
350
 
351
+ if ( empty( $post ) ) {
352
  continue;
353
+ }
354
 
355
+ if ( ! current_user_can(
356
+ 'flamingo_delete_inbound_message', $post->id ) ) {
357
  wp_die( __( 'You are not allowed to move this item to the Trash.', 'flamingo' ) );
358
+ }
359
 
360
+ if ( ! $post->trash() ) {
361
  wp_die( __( 'Error in moving to Trash.', 'flamingo' ) );
362
+ }
363
 
364
  $trashed += 1;
365
  }
366
 
367
+ if ( ! empty( $trashed ) ) {
368
+ $redirect_to = add_query_arg(
369
+ array( 'message' => 'inboundtrashed' ), $redirect_to );
370
+ }
371
 
372
  wp_safe_redirect( $redirect_to );
373
  exit();
374
  }
375
 
376
  if ( 'untrash' == $action && ! empty( $_REQUEST['post'] ) ) {
377
+ if ( ! is_array( $_REQUEST['post'] ) ) {
378
+ check_admin_referer(
379
+ 'flamingo-untrash-inbound-message_' . $_REQUEST['post'] );
380
+ } else {
381
  check_admin_referer( 'bulk-posts' );
382
+ }
383
 
384
  $untrashed = 0;
385
 
386
  foreach ( (array) $_REQUEST['post'] as $post ) {
387
  $post = new Flamingo_Inbound_Message( $post );
388
 
389
+ if ( empty( $post ) ) {
390
  continue;
391
+ }
392
 
393
+ if ( ! current_user_can(
394
+ 'flamingo_delete_inbound_message', $post->id ) ) {
395
  wp_die( __( 'You are not allowed to restore this item from the Trash.', 'flamingo' ) );
396
+ }
397
 
398
+ if ( ! $post->untrash() ) {
399
  wp_die( __( 'Error in restoring from Trash.', 'flamingo' ) );
400
+ }
401
 
402
  $untrashed += 1;
403
  }
404
 
405
+ if ( ! empty( $untrashed ) ) {
406
+ $redirect_to = add_query_arg(
407
+ array( 'message' => 'inbounduntrashed' ), $redirect_to );
408
+ }
409
 
410
  wp_safe_redirect( $redirect_to );
411
  exit();
421
  }
422
 
423
  if ( 'delete' == $action && ! empty( $_REQUEST['post'] ) ) {
424
+ if ( ! is_array( $_REQUEST['post'] ) ) {
425
+ check_admin_referer(
426
+ 'flamingo-delete-inbound-message_' . $_REQUEST['post'] );
427
+ } else {
428
  check_admin_referer( 'bulk-posts' );
429
+ }
430
 
431
  $deleted = 0;
432
 
433
  foreach ( (array) $_REQUEST['post'] as $post ) {
434
  $post = new Flamingo_Inbound_Message( $post );
435
 
436
+ if ( empty( $post ) ) {
437
  continue;
438
+ }
439
 
440
+ if ( ! current_user_can(
441
+ 'flamingo_delete_inbound_message', $post->id ) ) {
442
  wp_die( __( 'You are not allowed to delete this item.', 'flamingo' ) );
443
+ }
444
 
445
+ if ( ! $post->delete() ) {
446
  wp_die( __( 'Error in deleting.', 'flamingo' ) );
447
+ }
448
 
449
  $deleted += 1;
450
  }
451
 
452
+ if ( ! empty( $deleted ) ) {
453
+ $redirect_to = add_query_arg(
454
+ array( 'message' => 'inbounddeleted' ), $redirect_to );
455
+ }
456
 
457
  wp_safe_redirect( $redirect_to );
458
  exit();
459
  }
460
 
461
  if ( 'spam' == $action && ! empty( $_REQUEST['post'] ) ) {
462
+ if ( ! is_array( $_REQUEST['post'] ) ) {
463
+ check_admin_referer(
464
+ 'flamingo-spam-inbound-message_' . $_REQUEST['post'] );
465
+ } else {
466
  check_admin_referer( 'bulk-posts' );
467
+ }
468
 
469
  $submitted = 0;
470
 
471
  foreach ( (array) $_REQUEST['post'] as $post ) {
472
  $post = new Flamingo_Inbound_Message( $post );
473
 
474
+ if ( empty( $post ) ) {
475
  continue;
476
+ }
477
 
478
+ if ( ! current_user_can( 'flamingo_spam_inbound_message', $post->id ) ) {
479
  wp_die( __( 'You are not allowed to spam this item.', 'flamingo' ) );
480
+ }
481
 
482
+ if ( $post->spam() ) {
483
  $submitted += 1;
484
+ }
485
  }
486
 
487
+ if ( ! empty( $submitted ) ) {
488
+ $redirect_to = add_query_arg(
489
+ array( 'message' => 'inboundspammed' ), $redirect_to );
490
+ }
491
 
492
  wp_safe_redirect( $redirect_to );
493
  exit();
494
  }
495
 
496
  if ( 'unspam' == $action && ! empty( $_REQUEST['post'] ) ) {
497
+ if ( ! is_array( $_REQUEST['post'] ) ) {
498
+ check_admin_referer(
499
+ 'flamingo-unspam-inbound-message_' . $_REQUEST['post'] );
500
+ } else {
501
  check_admin_referer( 'bulk-posts' );
502
+ }
503
 
504
  $submitted = 0;
505
 
506
  foreach ( (array) $_REQUEST['post'] as $post ) {
507
  $post = new Flamingo_Inbound_Message( $post );
508
 
509
+ if ( empty( $post ) ) {
510
  continue;
511
+ }
512
 
513
+ if ( ! current_user_can(
514
+ 'flamingo_unspam_inbound_message', $post->id ) ) {
515
  wp_die( __( 'You are not allowed to unspam this item.', 'flamingo' ) );
516
+ }
517
 
518
+ if ( $post->unspam() ) {
519
  $submitted += 1;
520
+ }
521
  }
522
 
523
+ if ( ! empty( $submitted ) ) {
524
+ $redirect_to = add_query_arg(
525
+ array( 'message' => 'inboundunspammed' ), $redirect_to );
526
+ }
527
 
528
  wp_safe_redirect( $redirect_to );
529
  exit();
651
 
652
  ?>
653
  <div class="wrap">
 
654
 
655
  <h1><?php
656
  echo esc_html( __( 'Inbound Messages', 'flamingo' ) );
762
 
763
  ?>
764
  <div class="wrap">
 
765
 
766
  <h1><?php
767
  echo esc_html( __( 'Outbound Messages', 'flamingo' ) );
admin/edit-contact-form.php CHANGED
@@ -12,7 +12,6 @@ if ( ! empty( $post->id ) ) {
12
 
13
  ?>
14
  <div class="wrap columns-2">
15
- <?php screen_icon(); ?>
16
 
17
  <h1><?php echo esc_html( __( 'Edit Contact', 'flamingo' ) ); ?></h1>
18
 
12
 
13
  ?>
14
  <div class="wrap columns-2">
 
15
 
16
  <h1><?php echo esc_html( __( 'Edit Contact', 'flamingo' ) ); ?></h1>
17
 
admin/edit-inbound-form.php CHANGED
@@ -12,7 +12,6 @@ if ( ! empty( $post->id ) ) {
12
 
13
  ?>
14
  <div class="wrap columns-2">
15
- <?php screen_icon(); ?>
16
 
17
  <h1><?php echo esc_html( __( 'Inbound Message', 'flamingo' ) ); ?></h1>
18
 
12
 
13
  ?>
14
  <div class="wrap columns-2">
 
15
 
16
  <h1><?php echo esc_html( __( 'Inbound Message', 'flamingo' ) ); ?></h1>
17
 
admin/edit-outbound-form.php CHANGED
@@ -12,7 +12,6 @@ if ( ! empty( $post->id ) ) {
12
 
13
  ?>
14
  <div class="wrap columns-2">
15
- <?php screen_icon(); ?>
16
 
17
  <h1><?php
18
  if ( 'new' == $action ) {
12
 
13
  ?>
14
  <div class="wrap columns-2">
 
15
 
16
  <h1><?php
17
  if ( 'new' == $action ) {
admin/includes/class-contacts-list-table.php CHANGED
@@ -1,7 +1,8 @@
1
  <?php
2
 
3
- if ( ! class_exists( 'WP_List_Table' ) )
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
 
5
 
6
  class Flamingo_Contacts_List_Table extends WP_List_Table {
7
 
1
  <?php
2
 
3
+ if ( ! class_exists( 'WP_List_Table' ) ) {
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class Flamingo_Contacts_List_Table extends WP_List_Table {
8
 
admin/includes/class-inbound-messages-list-table.php CHANGED
@@ -1,7 +1,8 @@
1
  <?php
2
 
3
- if ( ! class_exists( 'WP_List_Table' ) )
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
 
5
 
6
  class Flamingo_Inbound_Messages_List_Table extends WP_List_Table {
7
 
1
  <?php
2
 
3
+ if ( ! class_exists( 'WP_List_Table' ) ) {
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class Flamingo_Inbound_Messages_List_Table extends WP_List_Table {
8
 
admin/includes/class-outbound-messages-list-table.php CHANGED
@@ -1,7 +1,8 @@
1
  <?php
2
 
3
- if ( ! class_exists( 'WP_List_Table' ) )
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
 
5
 
6
  class Flamingo_Outbound_Messages_List_Table extends WP_List_Table {
7
 
1
  <?php
2
 
3
+ if ( ! class_exists( 'WP_List_Table' ) ) {
4
  require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
+ }
6
 
7
  class Flamingo_Outbound_Messages_List_Table extends WP_List_Table {
8
 
flamingo.php CHANGED
@@ -5,10 +5,10 @@ Description: Flamingo manages your contact list on WordPress.
5
  Author: Takayuki Miyoshi
6
  Text Domain: flamingo
7
  Domain Path: /languages/
8
- Version: 1.4
9
  */
10
 
11
- define( 'FLAMINGO_VERSION', '1.4' );
12
 
13
  define( 'FLAMINGO_PLUGIN', __FILE__ );
14
 
@@ -35,8 +35,9 @@ require_once FLAMINGO_PLUGIN_DIR . '/includes/user.php';
35
  require_once FLAMINGO_PLUGIN_DIR . '/includes/comment.php';
36
  require_once FLAMINGO_PLUGIN_DIR . '/includes/akismet.php';
37
 
38
- if ( is_admin() )
39
  require_once FLAMINGO_PLUGIN_DIR . '/admin/admin.php';
 
40
 
41
  /* Init */
42
 
5
  Author: Takayuki Miyoshi
6
  Text Domain: flamingo
7
  Domain Path: /languages/
8
+ Version: 1.5
9
  */
10
 
11
+ define( 'FLAMINGO_VERSION', '1.5' );
12
 
13
  define( 'FLAMINGO_PLUGIN', __FILE__ );
14
 
35
  require_once FLAMINGO_PLUGIN_DIR . '/includes/comment.php';
36
  require_once FLAMINGO_PLUGIN_DIR . '/includes/akismet.php';
37
 
38
+ if ( is_admin() ) {
39
  require_once FLAMINGO_PLUGIN_DIR . '/admin/admin.php';
40
+ }
41
 
42
  /* Init */
43
 
includes/akismet.php CHANGED
@@ -43,5 +43,3 @@ function flamingo_akismet_is_active() {
43
 
44
  return false;
45
  }
46
-
47
- ?>
43
 
44
  return false;
45
  }
 
 
includes/capabilities.php CHANGED
@@ -20,10 +20,9 @@ function flamingo_map_meta_cap( $caps, $cap, $user_id, $args ) {
20
 
21
  $caps = array_diff( $caps, array_keys( $meta_caps ) );
22
 
23
- if ( isset( $meta_caps[$cap] ) )
24
  $caps[] = $meta_caps[$cap];
 
25
 
26
  return $caps;
27
  }
28
-
29
- ?>
20
 
21
  $caps = array_diff( $caps, array_keys( $meta_caps ) );
22
 
23
+ if ( isset( $meta_caps[$cap] ) ) {
24
  $caps[] = $meta_caps[$cap];
25
+ }
26
 
27
  return $caps;
28
  }
 
 
includes/class-inbound-message.php CHANGED
@@ -56,7 +56,7 @@ class Flamingo_Inbound_Message {
56
  'post_status' => 'any',
57
  'tax_query' => array(),
58
  'channel' => '',
59
- 'channel_id' => '' );
60
 
61
  $args = wp_parse_args( $args, $defaults );
62
 
@@ -65,7 +65,7 @@ class Flamingo_Inbound_Message {
65
  if ( ! empty( $args['channel_id'] ) ) {
66
  $args['tax_query'][] = array(
67
  'taxonomy' => self::channel_taxonomy,
68
- 'terms' => $args['channel_id'],
69
  'field' => 'term_id' );
70
  }
71
 
@@ -83,12 +83,25 @@ class Flamingo_Inbound_Message {
83
 
84
  $objs = array();
85
 
86
- foreach ( (array) $posts as $post )
87
  $objs[] = new self( $post );
 
88
 
89
  return $objs;
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  public static function add( $args = '' ) {
93
  $defaults = array(
94
  'channel' => '',
56
  'post_status' => 'any',
57
  'tax_query' => array(),
58
  'channel' => '',
59
+ 'channel_id' => 0 );
60
 
61
  $args = wp_parse_args( $args, $defaults );
62
 
65
  if ( ! empty( $args['channel_id'] ) ) {
66
  $args['tax_query'][] = array(
67
  'taxonomy' => self::channel_taxonomy,
68
+ 'terms' => absint( $args['channel_id'] ),
69
  'field' => 'term_id' );
70
  }
71
 
83
 
84
  $objs = array();
85
 
86
+ foreach ( (array) $posts as $post ) {
87
  $objs[] = new self( $post );
88
+ }
89
 
90
  return $objs;
91
  }
92
 
93
+ public static function count( $args = '' ) {
94
+ $args = wp_parse_args( $args, array(
95
+ 'offset' => 0,
96
+ 'channel' => '',
97
+ 'channel_id' => 0,
98
+ 'post_status' => 'publish' ) );
99
+
100
+ self::find( $args );
101
+
102
+ return absint( self::$found_items );
103
+ }
104
+
105
  public static function add( $args = '' ) {
106
  $defaults = array(
107
  'channel' => '',
includes/comment.php CHANGED
@@ -8,8 +8,9 @@ add_action( 'wp_insert_comment', 'flamingo_insert_comment' );
8
  function flamingo_insert_comment( $comment_id ) {
9
  $comment = get_comment( $comment_id );
10
 
11
- if ( 1 != (int) $comment->comment_approved )
12
  return;
 
13
 
14
  Flamingo_Contact::add( array(
15
  'email' => $comment->comment_author_email,
@@ -20,8 +21,9 @@ function flamingo_insert_comment( $comment_id ) {
20
  add_action( 'transition_comment_status', 'flamingo_transition_comment_status', 10, 3 );
21
 
22
  function flamingo_transition_comment_status( $new_status, $old_status, $comment ) {
23
- if ( 'approved' != $new_status )
24
  return;
 
25
 
26
  $email = $comment->comment_author_email;
27
  $name = $comment->comment_author;
@@ -33,7 +35,8 @@ function flamingo_transition_comment_status( $new_status, $old_status, $comment
33
  }
34
 
35
  /* Collect contact info from existing comments when activating plugin */
36
- add_action( 'activate_' . FLAMINGO_PLUGIN_BASENAME, 'flamingo_collect_contacts_from_comments' );
 
37
 
38
  function flamingo_collect_contacts_from_comments() {
39
  $comments = get_comments( array(
@@ -45,8 +48,9 @@ function flamingo_collect_contacts_from_comments() {
45
  $email = $comment->comment_author_email;
46
  $name = $comment->comment_author;
47
 
48
- if ( empty( $email ) )
49
  continue;
 
50
 
51
  Flamingo_Contact::add( array(
52
  'email' => $email,
@@ -54,5 +58,3 @@ function flamingo_collect_contacts_from_comments() {
54
  'channel' => 'comment' ) );
55
  }
56
  }
57
-
58
- ?>
8
  function flamingo_insert_comment( $comment_id ) {
9
  $comment = get_comment( $comment_id );
10
 
11
+ if ( 1 != (int) $comment->comment_approved ) {
12
  return;
13
+ }
14
 
15
  Flamingo_Contact::add( array(
16
  'email' => $comment->comment_author_email,
21
  add_action( 'transition_comment_status', 'flamingo_transition_comment_status', 10, 3 );
22
 
23
  function flamingo_transition_comment_status( $new_status, $old_status, $comment ) {
24
+ if ( 'approved' != $new_status ) {
25
  return;
26
+ }
27
 
28
  $email = $comment->comment_author_email;
29
  $name = $comment->comment_author;
35
  }
36
 
37
  /* Collect contact info from existing comments when activating plugin */
38
+ add_action( 'activate_' . FLAMINGO_PLUGIN_BASENAME,
39
+ 'flamingo_collect_contacts_from_comments' );
40
 
41
  function flamingo_collect_contacts_from_comments() {
42
  $comments = get_comments( array(
48
  $email = $comment->comment_author_email;
49
  $name = $comment->comment_author;
50
 
51
+ if ( empty( $email ) ) {
52
  continue;
53
+ }
54
 
55
  Flamingo_Contact::add( array(
56
  'email' => $email,
58
  'channel' => 'comment' ) );
59
  }
60
  }
 
 
includes/formatting.php CHANGED
@@ -4,8 +4,9 @@ function flamingo_htmlize( $val ) {
4
  if ( is_array( $val ) ) {
5
  $result = '';
6
 
7
- foreach ( $val as $v )
8
  $result .= '<li>' . flamingo_htmlize( $v ) . '</li>';
 
9
 
10
  return '<ul>' . $result . '</ul>';
11
  }
@@ -25,5 +26,3 @@ function flamingo_csv_row( $inputs = array() ) {
25
 
26
  return implode( ',', $row );
27
  }
28
-
29
- ?>
4
  if ( is_array( $val ) ) {
5
  $result = '';
6
 
7
+ foreach ( $val as $v ) {
8
  $result .= '<li>' . flamingo_htmlize( $v ) . '</li>';
9
+ }
10
 
11
  return '<ul>' . $result . '</ul>';
12
  }
26
 
27
  return implode( ',', $row );
28
  }
 
 
includes/functions.php CHANGED
@@ -11,13 +11,15 @@ function flamingo_plugin_url( $path = '' ) {
11
  }
12
 
13
  function flamingo_array_flatten( $input ) {
14
- if ( ! is_array( $input ) )
15
  return array( $input );
 
16
 
17
  $output = array();
18
 
19
- foreach ( $input as $value )
20
  $output = array_merge( $output, flamingo_array_flatten( $value ) );
 
21
 
22
  return $output;
23
  }
11
  }
12
 
13
  function flamingo_array_flatten( $input ) {
14
+ if ( ! is_array( $input ) ) {
15
  return array( $input );
16
+ }
17
 
18
  $output = array();
19
 
20
+ foreach ( $input as $value ) {
21
  $output = array_merge( $output, flamingo_array_flatten( $value ) );
22
+ }
23
 
24
  return $output;
25
  }
includes/user.php CHANGED
@@ -36,8 +36,9 @@ function flamingo_collect_contacts_from_users() {
36
  $email = $user->user_email;
37
  $name = $user->display_name;
38
 
39
- if ( empty( $email ) )
40
  continue;
 
41
 
42
  $props = array(
43
  'first_name' => empty( $user->first_name ) ? '' : $user->first_name,
@@ -50,5 +51,3 @@ function flamingo_collect_contacts_from_users() {
50
  'channel' => 'user' ) );
51
  }
52
  }
53
-
54
- ?>
36
  $email = $user->user_email;
37
  $name = $user->display_name;
38
 
39
+ if ( empty( $email ) ) {
40
  continue;
41
+ }
42
 
43
  $props = array(
44
  'first_name' => empty( $user->first_name ) ? '' : $user->first_name,
51
  'channel' => 'user' ) );
52
  }
53
  }
 
 
languages/flamingo-ar.mo DELETED
Binary file
languages/flamingo-es_ES.mo DELETED
Binary file
languages/flamingo-fa_IR.mo DELETED
Binary file
languages/flamingo-fr_FR.mo DELETED
Binary file
languages/flamingo-hr.mo DELETED
Binary file
languages/flamingo-hu_HU.mo DELETED
Binary file
languages/flamingo-it_IT.mo DELETED
Binary file
languages/flamingo-my_MM.mo DELETED
Binary file
languages/flamingo-nb_NO.mo DELETED
Binary file
languages/flamingo-nl_NL.mo DELETED
Binary file
languages/flamingo-pt_BR.mo DELETED
Binary file
languages/flamingo-pt_PT.mo DELETED
Binary file
languages/flamingo-ro_RO.mo DELETED
Binary file
languages/flamingo-ru_RU.mo DELETED
Binary file
languages/flamingo-sk_SK.mo DELETED
Binary file
languages/flamingo-sq.mo DELETED
Binary file
languages/flamingo-sv_SE.mo DELETED
Binary file
languages/flamingo-th.mo DELETED
Binary file
languages/flamingo-tr_TR.mo DELETED
Binary file
languages/flamingo-vi_VN.mo DELETED
Binary file
languages/flamingo-zh_CN.mo DELETED
Binary file
languages/flamingo.pot DELETED
@@ -1,422 +0,0 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Project-Id-Version: Flamingo\n"
5
- "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2016-04-04 01:23+0900\n"
7
- "PO-Revision-Date: 2014-04-03 00:21+0900\n"
8
- "Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
9
- "Language-Team: \n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c\n"
15
- "X-Poedit-Basepath: ../..\n"
16
- "Plural-Forms: nplurals=1; plural=0;\n"
17
- "X-Generator: Poedit 1.8.6\n"
18
- "X-Poedit-SearchPath-0: flamingo\n"
19
-
20
- #: flamingo/admin/admin.php:13 flamingo/admin/admin.php:20
21
- #: flamingo/admin/admin.php:282
22
- msgid "Flamingo Address Book"
23
- msgstr ""
24
-
25
- #: flamingo/admin/admin.php:14
26
- msgid "Flamingo"
27
- msgstr ""
28
-
29
- #: flamingo/admin/admin.php:21
30
- msgid "Address Book"
31
- msgstr ""
32
-
33
- #: flamingo/admin/admin.php:28 flamingo/includes/class-inbound-message.php:26
34
- msgid "Flamingo Inbound Messages"
35
- msgstr ""
36
-
37
- #: flamingo/admin/admin.php:29 flamingo/admin/admin.php:598
38
- msgid "Inbound Messages"
39
- msgstr ""
40
-
41
- #: flamingo/admin/admin.php:76
42
- msgid "Contact updated."
43
- msgstr ""
44
-
45
- #: flamingo/admin/admin.php:78
46
- msgid "Contact deleted."
47
- msgstr ""
48
-
49
- #: flamingo/admin/admin.php:80
50
- msgid "Messages trashed."
51
- msgstr ""
52
-
53
- #: flamingo/admin/admin.php:82
54
- msgid "Messages restored."
55
- msgstr ""
56
-
57
- #: flamingo/admin/admin.php:84
58
- msgid "Messages deleted."
59
- msgstr ""
60
-
61
- #: flamingo/admin/admin.php:86
62
- msgid "Messages got marked as spam."
63
- msgstr ""
64
-
65
- #: flamingo/admin/admin.php:88
66
- msgid "Messages got marked as not spam."
67
- msgstr ""
68
-
69
- #: flamingo/admin/admin.php:90
70
- msgid "Messages updated."
71
- msgstr ""
72
-
73
- #: flamingo/admin/admin.php:117 flamingo/admin/admin.php:655
74
- msgid "You are not allowed to edit this item."
75
- msgstr ""
76
-
77
- #: flamingo/admin/admin.php:156 flamingo/admin/admin.php:405
78
- msgid "You are not allowed to delete this item."
79
- msgstr ""
80
-
81
- #: flamingo/admin/admin.php:159 flamingo/admin/admin.php:408
82
- msgid "Error in deleting."
83
- msgstr ""
84
-
85
- #: flamingo/admin/admin.php:184
86
- #: flamingo/admin/includes/class-contacts-list-table.php:11
87
- msgid "Email"
88
- msgstr ""
89
-
90
- #: flamingo/admin/admin.php:184 flamingo/admin/includes/meta-boxes.php:142
91
- msgid "Full name"
92
- msgstr ""
93
-
94
- #: flamingo/admin/admin.php:185 flamingo/admin/includes/meta-boxes.php:147
95
- msgid "First name"
96
- msgstr ""
97
-
98
- #: flamingo/admin/admin.php:185 flamingo/admin/includes/meta-boxes.php:152
99
- msgid "Last name"
100
- msgstr ""
101
-
102
- #: flamingo/admin/admin.php:241 flamingo/admin/admin.php:560
103
- #: flamingo/admin/includes/meta-boxes.php:184
104
- msgid "Save"
105
- msgstr ""
106
-
107
- #: flamingo/admin/admin.php:244
108
- #: flamingo/admin/includes/class-contacts-list-table.php:13
109
- msgid "Tags"
110
- msgstr ""
111
-
112
- #: flamingo/admin/admin.php:247
113
- #: flamingo/admin/includes/class-contacts-list-table.php:12
114
- msgid "Name"
115
- msgstr ""
116
-
117
- #: flamingo/admin/admin.php:260
118
- msgid "Contacts"
119
- msgstr ""
120
-
121
- #: flamingo/admin/admin.php:286 flamingo/admin/admin.php:602
122
- #: flamingo/admin/admin.php:714
123
- #, php-format
124
- msgid "Search results for &#8220;%s&#8221;"
125
- msgstr ""
126
-
127
- #: flamingo/admin/admin.php:295
128
- msgid "Search Contacts"
129
- msgstr ""
130
-
131
- #: flamingo/admin/admin.php:336
132
- msgid "You are not allowed to move this item to the Trash."
133
- msgstr ""
134
-
135
- #: flamingo/admin/admin.php:339
136
- msgid "Error in moving to Trash."
137
- msgstr ""
138
-
139
- #: flamingo/admin/admin.php:366
140
- msgid "You are not allowed to restore this item from the Trash."
141
- msgstr ""
142
-
143
- #: flamingo/admin/admin.php:369
144
- msgid "Error in restoring from Trash."
145
- msgstr ""
146
-
147
- #: flamingo/admin/admin.php:435
148
- msgid "You are not allowed to spam this item."
149
- msgstr ""
150
-
151
- #: flamingo/admin/admin.php:463
152
- msgid "You are not allowed to unspam this item."
153
- msgstr ""
154
-
155
- #: flamingo/admin/admin.php:531 flamingo/admin/edit-inbound-form.php:42
156
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:17
157
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:15
158
- msgid "Date"
159
- msgstr ""
160
-
161
- #: flamingo/admin/admin.php:563
162
- msgid "Fields"
163
- msgstr ""
164
-
165
- #: flamingo/admin/admin.php:576 flamingo/admin/admin.php:688
166
- msgid "Messages"
167
- msgstr ""
168
-
169
- #: flamingo/admin/admin.php:613 flamingo/admin/admin.php:725
170
- msgid "Search Messages"
171
- msgstr ""
172
-
173
- #: flamingo/admin/admin.php:675
174
- msgid "Send"
175
- msgstr ""
176
-
177
- #: flamingo/admin/admin.php:710
178
- msgid "Outbound Messages"
179
- msgstr ""
180
-
181
- #: flamingo/admin/edit-contact-form.php:17
182
- msgid "Edit Contact"
183
- msgstr ""
184
-
185
- #: flamingo/admin/edit-contact-form.php:43
186
- msgid "Enter email here"
187
- msgstr ""
188
-
189
- #: flamingo/admin/edit-inbound-form.php:17
190
- msgid "Inbound Message"
191
- msgstr ""
192
-
193
- #: flamingo/admin/edit-inbound-form.php:47
194
- #: flamingo/admin/edit-outbound-form.php:61
195
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:14
196
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:13
197
- msgid "Subject"
198
- msgstr ""
199
-
200
- #: flamingo/admin/edit-inbound-form.php:52
201
- #: flamingo/admin/edit-outbound-form.php:56
202
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:15
203
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:14
204
- msgid "From"
205
- msgstr ""
206
-
207
- #: flamingo/admin/edit-outbound-form.php:19
208
- msgid "Compose a Message"
209
- msgstr ""
210
-
211
- #: flamingo/admin/edit-outbound-form.php:21
212
- msgid "Outbound Message"
213
- msgstr ""
214
-
215
- #: flamingo/admin/edit-outbound-form.php:48
216
- msgid "To"
217
- msgstr ""
218
-
219
- #: flamingo/admin/edit-outbound-form.php:66
220
- msgid "Body"
221
- msgstr ""
222
-
223
- #: flamingo/admin/includes/class-contacts-list-table.php:14
224
- msgid "History"
225
- msgstr ""
226
-
227
- #: flamingo/admin/includes/class-contacts-list-table.php:15
228
- msgid "Last Contact"
229
- msgstr ""
230
-
231
- #: flamingo/admin/includes/class-contacts-list-table.php:85
232
- #: flamingo/admin/includes/meta-boxes.php:11
233
- msgid "Delete"
234
- msgstr ""
235
-
236
- #: flamingo/admin/includes/class-contacts-list-table.php:109
237
- msgid "View all tags"
238
- msgstr ""
239
-
240
- #: flamingo/admin/includes/class-contacts-list-table.php:115
241
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:220
242
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:159
243
- msgid "Filter"
244
- msgstr ""
245
-
246
- #: flamingo/admin/includes/class-contacts-list-table.php:118
247
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:225
248
- msgid "Export"
249
- msgstr ""
250
-
251
- #: flamingo/admin/includes/class-contacts-list-table.php:142
252
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:261
253
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:194
254
- msgid "Edit"
255
- msgstr ""
256
-
257
- #: flamingo/admin/includes/class-contacts-list-table.php:146
258
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:280
259
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:198
260
- #, php-format
261
- msgid "Edit &#8220;%s&#8221;"
262
- msgstr ""
263
-
264
- #: flamingo/admin/includes/class-contacts-list-table.php:158
265
- msgid "No Tags"
266
- msgstr ""
267
-
268
- #: flamingo/admin/includes/class-contacts-list-table.php:187
269
- msgid "User"
270
- msgstr ""
271
-
272
- #: flamingo/admin/includes/class-contacts-list-table.php:200
273
- #, php-format
274
- msgid "Comment (%d)"
275
- msgstr ""
276
-
277
- #: flamingo/admin/includes/class-contacts-list-table.php:239
278
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:332
279
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:214
280
- #: flamingo/includes/class-inbound-message.php:132
281
- #: flamingo/includes/class-outbound-message.php:80
282
- msgid "Y/m/d g:i:s A"
283
- msgstr ""
284
-
285
- #: flamingo/admin/includes/class-contacts-list-table.php:246
286
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:339
287
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:221
288
- #, php-format
289
- msgid "%s ago"
290
- msgstr ""
291
-
292
- #: flamingo/admin/includes/class-contacts-list-table.php:248
293
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:341
294
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:223
295
- msgid "Y/m/d"
296
- msgstr ""
297
-
298
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:16
299
- msgid "Channel"
300
- msgstr ""
301
-
302
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:168
303
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:140
304
- msgid "Restore"
305
- msgstr ""
306
-
307
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:172
308
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:144
309
- #: flamingo/admin/includes/meta-boxes.php:108
310
- #: flamingo/admin/includes/meta-boxes.php:209
311
- msgid "Delete Permanently"
312
- msgstr ""
313
-
314
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:174
315
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:146
316
- #: flamingo/admin/includes/meta-boxes.php:110
317
- #: flamingo/admin/includes/meta-boxes.php:211
318
- msgid "Move to Trash"
319
- msgstr ""
320
-
321
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:178
322
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:269
323
- msgid "Not Spam"
324
- msgstr ""
325
-
326
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:180
327
- msgid "Mark as Spam"
328
- msgstr ""
329
-
330
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:212
331
- msgid "View all channels"
332
- msgstr ""
333
-
334
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:231
335
- #: flamingo/admin/includes/class-outbound-messages-list-table.php:164
336
- msgid "Empty Trash"
337
- msgstr ""
338
-
339
- #: flamingo/admin/includes/class-inbound-messages-list-table.php:275
340
- #: flamingo/includes/class-inbound-message.php:32
341
- msgid "Spam"
342
- msgstr ""
343
-
344
- #: flamingo/admin/includes/meta-boxes.php:17
345
- #, php-format
346
- msgid ""
347
- "You are about to delete this contact '%s'\n"
348
- " 'Cancel' to stop, 'OK' to delete."
349
- msgstr ""
350
-
351
- #: flamingo/admin/includes/meta-boxes.php:23
352
- msgid "Update Contact"
353
- msgstr ""
354
-
355
- #: flamingo/admin/includes/meta-boxes.php:25
356
- msgid "Add Contact"
357
- msgstr ""
358
-
359
- #: flamingo/admin/includes/meta-boxes.php:69
360
- msgid "Separate tags with commas"
361
- msgstr ""
362
-
363
- #: flamingo/admin/includes/meta-boxes.php:72
364
- msgid "Choose from the most used tags"
365
- msgstr ""
366
-
367
- #: flamingo/admin/includes/meta-boxes.php:122
368
- msgid "Update Message"
369
- msgstr ""
370
-
371
- #: flamingo/admin/includes/meta-boxes.php:124
372
- msgid "Add Message"
373
- msgstr ""
374
-
375
- #: flamingo/admin/includes/meta-boxes.php:189
376
- msgid "Save Draft"
377
- msgstr ""
378
-
379
- #: flamingo/admin/includes/meta-boxes.php:223
380
- msgid "Send Message"
381
- msgstr ""
382
-
383
- #: flamingo/includes/class-contact.php:20
384
- msgid "Flamingo Contacts"
385
- msgstr ""
386
-
387
- #: flamingo/includes/class-contact.php:21
388
- msgid "Flamingo Contact"
389
- msgstr ""
390
-
391
- #: flamingo/includes/class-contact.php:27
392
- msgid "Flamingo Contact Tags"
393
- msgstr ""
394
-
395
- #: flamingo/includes/class-contact.php:28
396
- msgid "Flamingo Contact Tag"
397
- msgstr ""
398
-
399
- #: flamingo/includes/class-inbound-message.php:27
400
- msgid "Flamingo Inbound Message"
401
- msgstr ""
402
-
403
- #: flamingo/includes/class-inbound-message.php:40
404
- msgid "Flamingo Inbound Message Channels"
405
- msgstr ""
406
-
407
- #: flamingo/includes/class-inbound-message.php:41
408
- msgid "Flamingo Inbound Message Channel"
409
- msgstr ""
410
-
411
- #: flamingo/includes/class-inbound-message.php:170
412
- #: flamingo/includes/class-outbound-message.php:92
413
- msgid "(No Title)"
414
- msgstr ""
415
-
416
- #: flamingo/includes/class-outbound-message.php:20
417
- msgid "Flamingo Outbound Messages"
418
- msgstr ""
419
-
420
- #: flamingo/includes/class-outbound-message.php:21
421
- msgid "Flamingo Outbound Message"
422
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/readme.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ Translations have moved to
2
+ https://translate.wordpress.org/projects/wp-plugins/flamingo
3
+
4
+ Thank you for your contribution.
readme.txt CHANGED
@@ -1,17 +1,21 @@
1
  === Flamingo ===
2
  Contributors: takayukister, megumithemes
3
  Tags: bird, contact, mail, crm
4
- Requires at least: 4.4
5
- Tested up to: 4.5.1
6
- Stable tag: 1.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Flamingo manages your contact list on WordPress.
11
 
12
  == Description ==
13
 
14
- Flamingo is a WordPress plugin created to be a total CRM package. With this version, you can manage your contact list and messages submitted via contact form plugins. It has not yet matured, but we are enhancing it rapidly.
 
 
 
 
15
 
16
  == Installation ==
17
 
@@ -24,17 +28,16 @@ Flamingo is a WordPress plugin created to be a total CRM package. With this vers
24
 
25
  == Changelog ==
26
 
 
 
 
 
 
 
 
27
  = 1.4 =
28
 
29
  * Tested up to WordPress 4.5.1.
30
  * Requires WordPress 4.4 or higher.
31
  * Added "Meta" meta-box to the Inbound Message screen.
32
  * Language packs for German, Hebrew, and Japanese are removed because those are available from translate.wordpress.org.
33
-
34
- = 1.3 =
35
-
36
- * Tested up to WordPress 4.3.
37
- * Requires WordPress 4.2 or higher.
38
- * Translations for Norwegian and Burmese have been created.
39
- * New filter hooks: manage_flamingo_contact_posts_columns, manage_flamingo_inbound_posts_columns, manage_flamingo_outbound_posts_columns
40
- * New action hooks: manage_flamingo_contact_posts_custom_column, manage_flamingo_inbound_posts_custom_column, manage_flamingo_outbound_posts_custom_column
1
  === Flamingo ===
2
  Contributors: takayukister, megumithemes
3
  Tags: bird, contact, mail, crm
4
+ Requires at least: 4.5
5
+ Tested up to: 4.7
6
+ Stable tag: 1.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ A trustworthy message storage plugin for Contact Form 7.
11
 
12
  == Description ==
13
 
14
+ Flamingo is a message storage plugin originally created for [Contact Form 7](https://wordpress.org/plugins/contact-form-7/), which doesn't store submitted messages.
15
+
16
+ After activation of the plugin, you'll find *Flamingo* on the WordPress admin screen menu. All messages through contact forms are listed there and are searchable. With Flamingo, you are no longer need to worry about losing important messages due to mail server issues or misconfiguration in mail setup.
17
+
18
+ For more detailed information, please refer to the [Contact Form 7 documentation page](http://contactform7.com/save-submitted-messages-with-flamingo/).
19
 
20
  == Installation ==
21
 
28
 
29
  == Changelog ==
30
 
31
+ = 1.5 =
32
+
33
+ * Tested up to WordPress 4.7.
34
+ * Requires WordPress 4.5 or higher.
35
+ * count() method added to Flamingo_Inbound_Message class.
36
+ * All language files in the languages folder were removed. Translations have moved to translate.wordpress.org.
37
+
38
  = 1.4 =
39
 
40
  * Tested up to WordPress 4.5.1.
41
  * Requires WordPress 4.4 or higher.
42
  * Added "Meta" meta-box to the Inbound Message screen.
43
  * Language packs for German, Hebrew, and Japanese are removed because those are available from translate.wordpress.org.