@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | <?php |
24 | 24 | } |
25 | 25 | $main_field_data = $section_data['main_fields']; |
26 | - foreach( $main_field_data as $field ) { |
|
26 | + foreach( $main_field_data as $field ) { |
|
27 | 27 | if( $field['type'] == 'custom' ) { |
28 | 28 | // execute the custom callback |
29 | 29 | $field['callback'](); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | <?php |
54 | 54 | } |
55 | 55 | $sidebar_field_data = $section_data['sidebar_fields']; |
56 | - foreach( $sidebar_field_data as $field ) { |
|
56 | + foreach( $sidebar_field_data as $field ) { |
|
57 | 57 | if( $field['type'] == 'custom' ) { |
58 | 58 | // execute the custom callback |
59 | 59 | $field['callback'](); |
@@ -45,8 +45,9 @@ |
||
45 | 45 | // before and after widget arguments are defined by themes |
46 | 46 | echo $args['before_widget']; |
47 | 47 | |
48 | - if ( ! empty( $title ) ) |
|
49 | - echo $args['before_title'] . $title . $args['after_title']; |
|
48 | + if ( ! empty( $title ) ) { |
|
49 | + echo $args['before_title'] . $title . $args['after_title']; |
|
50 | + } |
|
50 | 51 | |
51 | 52 | // Custom action hooks to place content in the widget before the form |
52 | 53 | // See FAQ for examples on usage |
@@ -112,9 +112,11 @@ |
||
112 | 112 | |
113 | 113 | // update 'date_format' on 'birthday' and 'date' fields |
114 | 114 | if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'date', 'birthday' ) ) ) { |
115 | - if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { // date |
|
115 | + if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { |
|
116 | +// date |
|
116 | 117 | $mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD'; // mailchimp default (can be altered) |
117 | - } else { // birthday |
|
118 | + } else { |
|
119 | +// birthday |
|
118 | 120 | $mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD/YYYY'; // mailchimp default (can be altered) |
119 | 121 | } |
120 | 122 | } |
@@ -943,7 +943,8 @@ |
||
943 | 943 | |
944 | 944 | } |
945 | 945 | |
946 | - } else { // loop over interest groups |
|
946 | + } else { |
|
947 | +// loop over interest groups |
|
947 | 948 | |
948 | 949 | |
949 | 950 | // store default choice |
@@ -96,9 +96,11 @@ |
||
96 | 96 | $value = date( 'Y-m-d', strtotime( $value ) ); |
97 | 97 | } |
98 | 98 | } |
99 | - if( is_numeric( $merge_tag ) ) { // this is is an interest group! |
|
99 | + if( is_numeric( $merge_tag ) ) { |
|
100 | +// this is is an interest group! |
|
100 | 101 | $merge_variables['groupings'][] = array( 'id' => $merge_tag , 'groups' => ( is_array( $value ) ) ? $value : array( $value ) ); |
101 | - } else { // or else it's just a standard merge variable |
|
102 | + } else { |
|
103 | +// or else it's just a standard merge variable |
|
102 | 104 | $merge_variables[$merge_tag] = $value; |
103 | 105 | } |
104 | 106 | } |
@@ -92,9 +92,11 @@ |
||
92 | 92 | $value = ( '' != $value ) ? date( 'Y-m-d', strtotime( $value ) ) : ''; |
93 | 93 | } |
94 | 94 | } |
95 | - if( is_numeric( $merge_tag ) ) { // this is is an interest group! |
|
95 | + if( is_numeric( $merge_tag ) ) { |
|
96 | +// this is is an interest group! |
|
96 | 97 | $merge_variables['groupings'][] = array( 'id' => $merge_tag , 'groups' => ( is_array( $value ) ) ? $value : array( $value ) ); |
97 | - } else { // or else it's just a standard merge variable |
|
98 | + } else { |
|
99 | +// or else it's just a standard merge variable |
|
98 | 100 | $merge_variables[$merge_tag] = $value; |
99 | 101 | } |
100 | 102 | } |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | - class YIKES_Inc_Easy_MailChimp_Public_Ajax |
|
3 | - { |
|
2 | + class YIKES_Inc_Easy_MailChimp_Public_Ajax { |
|
4 | 3 | |
5 | 4 | /** |
6 | 5 | * Thetext domain of this plugin |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // declare our integration type |
14 | 14 | protected $type = 'comment_form'; |
15 | 15 | |
16 | - public function __construct() { |
|
16 | + public function __construct() { |
|
17 | 17 | // hooks for outputting the checkbox |
18 | 18 | add_action( 'thesis_hook_after_comment_box', array( $this, 'output_checkbox' ), 10 ); |
19 | 19 | add_action( 'comment_form_field_comment', array( $this, 'output_checkbox' ), 10 ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @since 6.0.0 |
43 | 43 | **/ |
44 | - public function subscribe_from_comment( $comment_id , $comment_approved ) { |
|
44 | + public function subscribe_from_comment( $comment_id , $comment_approved ) { |
|
45 | 45 | // was sign-up checkbox checked? |
46 | 46 | if ( $this->was_checkbox_checked( $this->type ) === false ) { |
47 | 47 | return false; |
@@ -39,9 +39,9 @@ |
||
39 | 39 | foreach ($results as $row) { |
40 | 40 | |
41 | 41 | // Add table headers |
42 | - if($first){ |
|
42 | + if($first) { |
|
43 | 43 | $titles = array(); |
44 | - foreach($row as $key=>$val){ |
|
44 | + foreach($row as $key=>$val) { |
|
45 | 45 | $titles[] = $key; |
46 | 46 | } |
47 | 47 | fputcsv($output_handle, $titles); |