@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | if($type=='a'){ |
| 50 | 50 | $new_window = !empty($args['new_window']) ? ' target="_blank" ' : ''; |
| 51 | 51 | $output .= '<a href="' . $args['href'] . '"'.$new_window; |
| 52 | - }elseif($type=='badge'){ |
|
| 52 | + } elseif($type=='badge'){ |
|
| 53 | 53 | $output .= '<span '; |
| 54 | - }else{ |
|
| 54 | + } else{ |
|
| 55 | 55 | $output .= '<button type="' . $type . '" '; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | // close |
| 119 | 119 | if($type=='a'){ |
| 120 | 120 | $output .= '</a>'; |
| 121 | - }elseif($type=='badge'){ |
|
| 121 | + } elseif($type=='badge'){ |
|
| 122 | 122 | $output .= '</span>'; |
| 123 | - }else{ |
|
| 123 | + } else{ |
|
| 124 | 124 | $output .= '</button>'; |
| 125 | 125 | } |
| 126 | 126 | |
@@ -42,10 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | // set default icon |
| 44 | 44 | if(!$icon && $args['icon']!==false && $type){ |
| 45 | - if($type=='danger'){$icon = '<i class="fas fa-exclamation-circle"></i>';} |
|
| 46 | - elseif($type=='warning'){$icon = '<i class="fas fa-exclamation-triangle"></i>';} |
|
| 47 | - elseif($type=='success'){$icon = '<i class="fas fa-check-circle"></i>';} |
|
| 48 | - elseif($type=='info'){$icon = '<i class="fas fa-info-circle"></i>';} |
|
| 45 | + if($type=='danger'){$icon = '<i class="fas fa-exclamation-circle"></i>';} elseif($type=='warning'){$icon = '<i class="fas fa-exclamation-triangle"></i>';} elseif($type=='success'){$icon = '<i class="fas fa-check-circle"></i>';} elseif($type=='info'){$icon = '<i class="fas fa-info-circle"></i>';} |
|
| 49 | 46 | } |
| 50 | 47 | |
| 51 | 48 | $data = ''; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | // dropdown-menu |
| 56 | 56 | if(!empty($args['dropdown_menu'])){ |
| 57 | 57 | $output .= $args['dropdown_menu']; |
| 58 | - }elseif(!empty($args['dropdown_items'])){ |
|
| 58 | + } elseif(!empty($args['dropdown_items'])){ |
|
| 59 | 59 | $output .= '<div class="dropdown-menu '.AUI_Component_Helper::esc_classes($args['dropdown_menu_class']).'" aria-labelledby="'.sanitize_html_class($args['id']).'">'; |
| 60 | 60 | $output .= aui()->render($args['dropdown_items']); |
| 61 | 61 | $output .= '</div>'; |
@@ -5,7 +5,9 @@ |
||
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | // Exit if accessed directly |
| 8 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 8 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 9 | + exit; |
|
| 10 | +} |
|
| 9 | 11 | |
| 10 | 12 | // Load WP_List_Table if not loaded |
| 11 | 13 | if ( ! class_exists( 'WP_List_Table' ) ) { |
@@ -124,8 +124,11 @@ |
||
| 124 | 124 | </select> |
| 125 | 125 | <?php elseif ( ! empty( $field['type'] ) && 'checkbox' === $field['type'] ) : ?> |
| 126 | 126 | <input type="checkbox" name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" value="1" class="<?php echo esc_attr( $field['class'] ); ?>" <?php checked( (int) get_user_meta( $user->ID, $key, true ), 1, true ); ?> /> |
| 127 | - <?php else : ?> |
|
| 128 | - <input type="text" name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $this->get_user_meta( $user->ID, $key ) ); ?>" class="<?php echo ( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>" /> |
|
| 127 | + <?php else { |
|
| 128 | + : ?> |
|
| 129 | + <input type="text" name="<?php echo esc_attr( $key ); |
|
| 130 | +} |
|
| 131 | +?>" id="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $this->get_user_meta( $user->ID, $key ) ); ?>" class="<?php echo ( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>" /> |
|
| 129 | 132 | <?php endif; ?> |
| 130 | 133 | <p class="description"><?php echo wp_kses_post( $field['description'] ); ?></p> |
| 131 | 134 | </td> |
@@ -3,7 +3,9 @@ |
||
| 3 | 3 | * Displays a list of all subscriptions rules |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 6 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 7 | + exit; |
|
| 8 | +} |
|
| 7 | 9 | |
| 8 | 10 | if ( ! class_exists( 'WP_List_Table' ) ) { |
| 9 | 11 | include_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
@@ -87,8 +87,9 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | if ( !empty( $args ) ) { |
| 89 | 89 | // Check for backward compatibility |
| 90 | - if ( is_string( $args ) ) |
|
| 91 | - $args = str_replace( '?', '', $args ); |
|
| 90 | + if ( is_string( $args ) ) { |
|
| 91 | + $args = str_replace( '?', '', $args ); |
|
| 92 | + } |
|
| 92 | 93 | |
| 93 | 94 | $args = wp_parse_args( $args ); |
| 94 | 95 | |
@@ -108,8 +109,9 @@ discard block |
||
| 108 | 109 | |
| 109 | 110 | if ( !empty( $args ) ) { |
| 110 | 111 | // Check for backward compatibility |
| 111 | - if ( is_string( $args ) ) |
|
| 112 | - $args = str_replace( '?', '', $args ); |
|
| 112 | + if ( is_string( $args ) ) { |
|
| 113 | + $args = str_replace( '?', '', $args ); |
|
| 114 | + } |
|
| 113 | 115 | |
| 114 | 116 | $args = wp_parse_args( $args ); |
| 115 | 117 | |
@@ -131,8 +133,9 @@ discard block |
||
| 131 | 133 | $success_page = wpinv_get_option( 'success_page', 0 ); |
| 132 | 134 | $success_page = get_permalink( $success_page ); |
| 133 | 135 | |
| 134 | - if ( $query_string ) |
|
| 135 | - $success_page .= $query_string; |
|
| 136 | + if ( $query_string ) { |
|
| 137 | + $success_page .= $query_string; |
|
| 138 | + } |
|
| 136 | 139 | |
| 137 | 140 | return apply_filters( 'wpinv_success_page_url', $success_page ); |
| 138 | 141 | } |
@@ -141,8 +144,9 @@ discard block |
||
| 141 | 144 | $uri = wpinv_get_option( 'failure_page', '' ); |
| 142 | 145 | $uri = ! empty( $uri ) ? trailingslashit( get_permalink( $uri ) ) : home_url(); |
| 143 | 146 | |
| 144 | - if ( $extras ) |
|
| 145 | - $uri .= $extras; |
|
| 147 | + if ( $extras ) { |
|
| 148 | + $uri .= $extras; |
|
| 149 | + } |
|
| 146 | 150 | |
| 147 | 151 | return apply_filters( 'wpinv_get_failed_transaction_uri', $uri ); |
| 148 | 152 | } |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | if ( ! $result && $option) { |
| 86 | 86 | if( $option == 'color_primary' ){ |
| 87 | 87 | $result = AUI_PRIMARY_COLOR; |
| 88 | - }elseif( $option == 'color_secondary' ){ |
|
| 88 | + } elseif( $option == 'color_secondary' ){ |
|
| 89 | 89 | $result = AUI_SECONDARY_COLOR; |
| 90 | 90 | } |
| 91 | 91 | } |
@@ -179,8 +179,9 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | // Setup possible parts |
| 181 | 181 | $templates = array(); |
| 182 | - if ( isset( $name ) ) |
|
| 183 | - $templates[] = $slug . '-' . $name . '.php'; |
|
| 182 | + if ( isset( $name ) ) { |
|
| 183 | + $templates[] = $slug . '-' . $name . '.php'; |
|
| 184 | + } |
|
| 184 | 185 | $templates[] = $slug . '.php'; |
| 185 | 186 | |
| 186 | 187 | // Allow template parts to be filtered |
@@ -198,8 +199,9 @@ discard block |
||
| 198 | 199 | foreach ( (array)$template_names as $template_name ) { |
| 199 | 200 | |
| 200 | 201 | // Continue if template is empty |
| 201 | - if ( empty( $template_name ) ) |
|
| 202 | - continue; |
|
| 202 | + if ( empty( $template_name ) ) { |
|
| 203 | + continue; |
|
| 204 | + } |
|
| 203 | 205 | |
| 204 | 206 | // Trim off any slashes from the template name |
| 205 | 207 | $template_name = ltrim( $template_name, '/' ); |
@@ -218,8 +220,9 @@ discard block |
||
| 218 | 220 | } |
| 219 | 221 | } |
| 220 | 222 | |
| 221 | - if ( ( true == $load ) && ! empty( $located ) ) |
|
| 222 | - load_template( $located, $require_once ); |
|
| 223 | + if ( ( true == $load ) && ! empty( $located ) ) { |
|
| 224 | + load_template( $located, $require_once ); |
|
| 225 | + } |
|
| 223 | 226 | |
| 224 | 227 | return $located; |
| 225 | 228 | } |