Flamingo - Version 1.7

Version Description

  • New filter: flamingo_add_inbound
  • New filter: flamingo_add_contact
  • New filter: flamingo_htmlize
Download this release

Release Info

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

Code changes from version 1.6 to 1.7

flamingo.php CHANGED
@@ -5,10 +5,10 @@ Description: A trustworthy message storage plugin for Contact Form 7.
5
  Author: Takayuki Miyoshi
6
  Text Domain: flamingo
7
  Domain Path: /languages/
8
- Version: 1.6
9
  */
10
 
11
- define( 'FLAMINGO_VERSION', '1.6' );
12
 
13
  define( 'FLAMINGO_PLUGIN', __FILE__ );
14
 
5
  Author: Takayuki Miyoshi
6
  Text Domain: flamingo
7
  Domain Path: /languages/
8
+ Version: 1.7
9
  */
10
 
11
+ define( 'FLAMINGO_VERSION', '1.7' );
12
 
13
  define( 'FLAMINGO_PLUGIN', __FILE__ );
14
 
includes/class-contact.php CHANGED
@@ -96,7 +96,8 @@ class Flamingo_Contact {
96
  'props' => array(),
97
  );
98
 
99
- $args = wp_parse_args( $args, $defaults );
 
100
 
101
  if ( empty( $args['email'] ) || ! is_email( $args['email'] ) ) {
102
  return;
96
  'props' => array(),
97
  );
98
 
99
+ $args = apply_filters( 'flamingo_add_contact',
100
+ wp_parse_args( $args, $defaults ) );
101
 
102
  if ( empty( $args['email'] ) || ! is_email( $args['email'] ) ) {
103
  return;
includes/class-inbound-message.php CHANGED
@@ -124,7 +124,8 @@ class Flamingo_Inbound_Message {
124
  'spam' => false,
125
  );
126
 
127
- $args = wp_parse_args( $args, $defaults );
 
128
 
129
  $obj = new self();
130
 
124
  'spam' => false,
125
  );
126
 
127
+ $args = apply_filters( 'flamingo_add_inbound',
128
+ wp_parse_args( $args, $defaults ) );
129
 
130
  $obj = new self();
131
 
includes/formatting.php CHANGED
@@ -1,15 +1,17 @@
1
  <?php
2
 
3
  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
 
11
- return '<ul>' . $result . '</ul>';
 
 
12
  }
13
 
14
- return wpautop( esc_html( (string) $val ) );
15
  }
1
  <?php
2
 
3
  function flamingo_htmlize( $val ) {
4
+ $result = '';
 
5
 
6
+ if ( is_array( $val ) ) {
7
  foreach ( $val as $v ) {
8
+ $result .= sprintf( '<li>%s</li>', flamingo_htmlize( $v ) );
9
  }
10
 
11
+ $result = sprintf( '<ul>%s</ul>', $result );
12
+ } else {
13
+ $result = wpautop( esc_html( (string) $val ) );
14
  }
15
 
16
+ return apply_filters( 'flamingo_htmlize', $result, $val );
17
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: takayukister, megumithemes
3
  Tags: bird, contact, mail, crm
4
  Requires at least: 4.7
5
- Tested up to: 4.8
6
- Stable tag: 1.6
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -28,6 +28,12 @@ For more detailed information, please refer to the [Contact Form 7 documentation
28
 
29
  == Changelog ==
30
 
 
 
 
 
 
 
31
  = 1.6 =
32
 
33
  * Tested up to WordPress 4.8.
@@ -37,10 +43,3 @@ For more detailed information, please refer to the [Contact Form 7 documentation
37
  * Removed inappropriate content from h1 headings.
38
  * Changed the default format of the export CSV.
39
  * Introduced the flamingo_csv_value_separator and flamingo_csv_quotation filter hooks to enable customizing CSV output.
40
-
41
- = 1.5 =
42
-
43
- * Tested up to WordPress 4.7.
44
- * Requires WordPress 4.5 or higher.
45
- * count() method added to Flamingo_Inbound_Message class.
46
- * All language files in the languages folder were removed. Translations have moved to translate.wordpress.org.
2
  Contributors: takayukister, megumithemes
3
  Tags: bird, contact, mail, crm
4
  Requires at least: 4.7
5
+ Tested up to: 4.8.1
6
+ Stable tag: 1.7
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
28
 
29
  == Changelog ==
30
 
31
+ = 1.7 =
32
+
33
+ * New filter: flamingo_add_inbound
34
+ * New filter: flamingo_add_contact
35
+ * New filter: flamingo_htmlize
36
+
37
  = 1.6 =
38
 
39
  * Tested up to WordPress 4.8.
43
  * Removed inappropriate content from h1 headings.
44
  * Changed the default format of the export CSV.
45
  * Introduced the flamingo_csv_value_separator and flamingo_csv_quotation filter hooks to enable customizing CSV output.