@@ -4,7 +4,9 @@ discard block |
||
4 | 4 | //set_site_transient( 'update_plugins', null ); |
5 | 5 | |
6 | 6 | // Exit if accessed directly |
7 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
7 | +if ( ! defined( 'ABSPATH' ) ) { |
|
8 | + exit; |
|
9 | +} |
|
8 | 10 | |
9 | 11 | /** |
10 | 12 | * Allows plugins to use their own update API. |
@@ -273,11 +275,13 @@ discard block |
||
273 | 275 | |
274 | 276 | $data = array_merge( $this->api_data, $_data ); |
275 | 277 | |
276 | - if ( $data['slug'] != $this->slug ) |
|
277 | - return; |
|
278 | + if ( $data['slug'] != $this->slug ) { |
|
279 | + return; |
|
280 | + } |
|
278 | 281 | |
279 | - if ( empty( $data['license'] ) ) |
|
280 | - return; |
|
282 | + if ( empty( $data['license'] ) ) { |
|
283 | + return; |
|
284 | + } |
|
281 | 285 | |
282 | 286 | if( $this->api_url == home_url() ) { |
283 | 287 | return false; // Don't allow a plugin to ping itself |
@@ -10,7 +10,9 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
13 | +if ( ! defined( 'ABSPATH' ) ) { |
|
14 | + exit; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | /** |
16 | 18 | * Payment History Page |
@@ -63,11 +65,13 @@ discard block |
||
63 | 65 | */ |
64 | 66 | function give_view_order_details_title( $admin_title, $title ) { |
65 | 67 | |
66 | - if ( 'give_forms_page_give-payment-history' != get_current_screen()->base ) |
|
67 | - return $admin_title; |
|
68 | + if ( 'give_forms_page_give-payment-history' != get_current_screen()->base ) { |
|
69 | + return $admin_title; |
|
70 | + } |
|
68 | 71 | |
69 | - if( ! isset( $_GET['give-action'] ) ) |
|
70 | - return $admin_title; |
|
72 | + if( ! isset( $_GET['give-action'] ) ) { |
|
73 | + return $admin_title; |
|
74 | + } |
|
71 | 75 | |
72 | 76 | switch( $_GET['give-action'] ) : |
73 | 77 | |
@@ -99,11 +103,13 @@ discard block |
||
99 | 103 | function give_override_edit_post_for_payment_link( $url, $post_id = 0, $context ) { |
100 | 104 | |
101 | 105 | $post = get_post( $post_id ); |
102 | - if( ! $post ) |
|
103 | - return $url; |
|
106 | + if( ! $post ) { |
|
107 | + return $url; |
|
108 | + } |
|
104 | 109 | |
105 | - if( 'give_payment' != $post->post_type ) |
|
106 | - return $url; |
|
110 | + if( 'give_payment' != $post->post_type ) { |
|
111 | + return $url; |
|
112 | + } |
|
107 | 113 | |
108 | 114 | $url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $post_id ); |
109 | 115 |
@@ -440,8 +440,10 @@ |
||
440 | 440 | echo give_get_payment_note_html( $note, $payment_id ); |
441 | 441 | |
442 | 442 | endforeach; |
443 | - else : |
|
443 | + else { |
|
444 | + : |
|
444 | 445 | $no_notes_display = ''; |
446 | + } |
|
445 | 447 | endif; |
446 | 448 | echo '<p class="give-no-payment-notes"' . $no_notes_display . '>' . __( 'No payment notes', 'give' ) . '</p>'; |
447 | 449 | ?> |
@@ -143,9 +143,11 @@ discard block |
||
143 | 143 | |
144 | 144 | endwhile; |
145 | 145 | |
146 | - else : |
|
146 | + else { |
|
147 | + : |
|
147 | 148 | |
148 | 149 | $sales = give_get_sales_by_date( null, $i, $y ); |
150 | + } |
|
149 | 151 | $sales_totals += $sales; |
150 | 152 | |
151 | 153 | $earnings = give_get_earnings_by_date( null, $i, $y ); |
@@ -393,9 +395,11 @@ discard block |
||
393 | 395 | |
394 | 396 | endwhile; |
395 | 397 | |
396 | - else : |
|
398 | + else { |
|
399 | + : |
|
397 | 400 | |
398 | 401 | $num_of_days = cal_days_in_month( CAL_GREGORIAN, $i, $y ); |
402 | + } |
|
399 | 403 | |
400 | 404 | $date = mktime( 0, 0, 0, $i, 1, $y ); |
401 | 405 | $end_date = mktime( 23, 59, 59, $i, $num_of_days, $y ); |
@@ -124,8 +124,10 @@ |
||
124 | 124 | |
125 | 125 | $pdf->Row( array( $title, $price, $categories, $tags, $sales, $earnings ) ); |
126 | 126 | endforeach; |
127 | - else: |
|
127 | + else { |
|
128 | + : |
|
128 | 129 | $pdf->SetWidths( array( 280 ) ); |
130 | + } |
|
129 | 131 | $title = utf8_decode( sprintf( __( 'No %s found.', 'give' ), give_get_forms_label_plural() ) ); |
130 | 132 | $pdf->Row( array( $title ) ); |
131 | 133 | endif; |
@@ -10,7 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
13 | +if ( ! defined( 'ABSPATH' ) ) { |
|
14 | + exit; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | /** |
16 | 18 | * Give_API_V1 Class |
@@ -142,8 +142,10 @@ |
||
142 | 142 | |
143 | 143 | if ( is_front_page() ) : |
144 | 144 | $page_url = home_url(); |
145 | - else : |
|
145 | + else { |
|
146 | + : |
|
146 | 147 | $page_url = 'http'; |
148 | + } |
|
147 | 149 | |
148 | 150 | if ( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] == "on" ) { |
149 | 151 | $page_url .= "s"; |
@@ -10,7 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
13 | +if ( ! defined( 'ABSPATH' ) ) { |
|
14 | + exit; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | /** |
16 | 18 | * Give_API_V1 Class |
@@ -781,8 +781,11 @@ |
||
781 | 781 | } |
782 | 782 | ?> |
783 | 783 | </select> |
784 | - <?php else : ?> |
|
785 | - <input type="text" size="6" name="card_state" id="card_state" class="card_state give-input" placeholder="<?php esc_attr_e( 'State / Province', 'give' ); ?>"/> |
|
784 | + <?php else { |
|
785 | + : ?> |
|
786 | + <input type="text" size="6" name="card_state" id="card_state" class="card_state give-input" placeholder="<?php esc_attr_e( 'State / Province', 'give' ); |
|
787 | +} |
|
788 | +?>"/> |
|
786 | 789 | <?php endif; ?> |
787 | 790 | </p> |
788 | 791 | <?php do_action( 'give_cc_billing_bottom' ); ?> |