@@ -3,8 +3,8 @@ |
||
3 | 3 | /** @type string $sold_out_tickets_msg */ |
4 | 4 | ?> |
5 | 5 | |
6 | - <h4 ><b><?php _e('Sold Out', 'event_espresso');?></b></h4> |
|
7 | - <h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso');?></h6> |
|
6 | + <h4 ><b><?php _e('Sold Out', 'event_espresso'); ?></b></h4> |
|
7 | + <h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso'); ?></h6> |
|
8 | 8 | <p id="tickets-requiring-pre-approval-pg" class="small-text drk-grey-text"> |
9 | 9 | <?php echo $sold_out_tickets_msg; ?> |
10 | 10 | </p> |
@@ -1,39 +1,39 @@ discard block |
||
1 | 1 | <div id="ee-single-page-checkout-dv" class=""> |
2 | 2 | <?php |
3 | -if ( ! $empty_cart ) { |
|
4 | - if ( apply_filters( 'FHEE__registration_page_wrapper_template__display_time_limit', false ) ) { ?> |
|
3 | +if ( ! $empty_cart) { |
|
4 | + if (apply_filters('FHEE__registration_page_wrapper_template__display_time_limit', false)) { ?> |
|
5 | 5 | <p id="spco-registration-time-limit-pg" class="spco-steps-pg ee-attention important-notice" style="display: none;"> |
6 | 6 | <?php echo sprintf( |
7 | 7 | apply_filters( |
8 | 8 | 'FHEE__registration_page_wrapper_template___time_limit', |
9 | - __( 'You have %1$s to complete your registration.', 'event_espresso' ) |
|
9 | + __('You have %1$s to complete your registration.', 'event_espresso') |
|
10 | 10 | ), |
11 | - '<span id="spco-registration-time-limit-spn" class="spco-registration-time-limit-spn">' . $registration_time_limit . '</span>' |
|
11 | + '<span id="spco-registration-time-limit-spn" class="spco-registration-time-limit-spn">'.$registration_time_limit.'</span>' |
|
12 | 12 | ); |
13 | 13 | ?> |
14 | 14 | <span id="spco-registration-expiration-spn" class="" style="display:none;"></span> |
15 | 15 | </p> |
16 | 16 | <?php } |
17 | - if ( ! $revisit && apply_filters( 'FHEE__registration_page_wrapper_template__steps_display', TRUE )) { |
|
17 | + if ( ! $revisit && apply_filters('FHEE__registration_page_wrapper_template__steps_display', TRUE)) { |
|
18 | 18 | ?> |
19 | 19 | <h2 id="spco-steps-big-hdr" class="spco-steps-big-hdr"><?php _e(' Steps', 'event_espresso'); ?></h2> |
20 | 20 | |
21 | 21 | <div id="spco-steps-display-dv"> |
22 | 22 | <?php |
23 | 23 | $step_nmbr = 1; |
24 | - $total_steps = count( $reg_steps ) - 1; |
|
25 | - foreach ( $reg_steps as $reg_step ) { |
|
26 | - if ( $reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration' ) { |
|
24 | + $total_steps = count($reg_steps) - 1; |
|
25 | + foreach ($reg_steps as $reg_step) { |
|
26 | + if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') { |
|
27 | 27 | $slug = $reg_step->slug(); |
28 | 28 | $step_display_dv_class = $reg_step->is_current_step() ? 'active-step' : 'inactive-step'; |
29 | 29 | ?> |
30 | 30 | <div id="spco-step-<?php echo $slug; ?>-display-dv" class="spco-step-display-dv <?php echo $step_display_dv_class; ?> steps-<?php echo $total_steps; ?>"> |
31 | 31 | <h4 id="spco-step-<?php echo $slug; ?>-display-hdr" class="spco-steps-display-hdr"> |
32 | - <span class="spco-step-big-nmbr"><?php echo $step_nmbr; ?></span> <span class="spco-step-name"><?php echo str_replace( ' ', '<br/> ', $reg_step->name() ); ?></span> |
|
32 | + <span class="spco-step-big-nmbr"><?php echo $step_nmbr; ?></span> <span class="spco-step-name"><?php echo str_replace(' ', '<br/> ', $reg_step->name()); ?></span> |
|
33 | 33 | </h4> |
34 | 34 | </div> |
35 | 35 | |
36 | - <?php if ( $step_nmbr < $total_steps ) { ?> |
|
36 | + <?php if ($step_nmbr < $total_steps) { ?> |
|
37 | 37 | <div class="spco-step-arrow-dv">»</div> |
38 | 38 | <?php |
39 | 39 | } |
@@ -47,22 +47,22 @@ discard block |
||
47 | 47 | <?php |
48 | 48 | } |
49 | 49 | |
50 | - do_action( 'AHEE__SPCO__before_registration_steps' ); |
|
50 | + do_action('AHEE__SPCO__before_registration_steps'); |
|
51 | 51 | $step_nmbr = 1; |
52 | - foreach ( $reg_steps as $reg_step ) { |
|
53 | - if ( $reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration' ) { |
|
52 | + foreach ($reg_steps as $reg_step) { |
|
53 | + if ($reg_step instanceof EE_SPCO_Reg_Step && $reg_step->slug() != 'finalize_registration') { |
|
54 | 54 | $slug = $reg_step->slug(); |
55 | - do_action( 'AHEE__' . $slug . '__reg_step_start', $reg_step ); |
|
55 | + do_action('AHEE__'.$slug.'__reg_step_start', $reg_step); |
|
56 | 56 | // todo: deprecate hook AHEE__registration_page_attendee_information__start |
57 | 57 | ?> |
58 | 58 | <div id="spco-<?php echo $slug; ?>-dv" class="spco-step-dv <?php echo $reg_step->div_class(); ?>"> |
59 | 59 | <?php echo $reg_step->display_reg_form(); ?> |
60 | - <?php do_action( 'AHEE__SPCO_after_reg_step_form', $slug, $next_step ); ?> |
|
60 | + <?php do_action('AHEE__SPCO_after_reg_step_form', $slug, $next_step); ?> |
|
61 | 61 | </div> |
62 | 62 | <?php $step_nmbr++; |
63 | 63 | } |
64 | 64 | } |
65 | - do_action( 'AHEE__SPCO__after_registration_steps' ); |
|
65 | + do_action('AHEE__SPCO__after_registration_steps'); |
|
66 | 66 | |
67 | 67 | } else { |
68 | 68 | ?> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | <?php echo $cookies_not_set_msg; ?> |
72 | 72 | <?php |
73 | 73 | } |
74 | -do_action( 'AHEE__SPCO__reg_form_footer' ); |
|
74 | +do_action('AHEE__SPCO__reg_form_footer'); |
|
75 | 75 | ?> |
76 | 76 | |
77 | 77 | </div> |
@@ -21,22 +21,22 @@ discard block |
||
21 | 21 | * and/or use any of the template tags functions found in: |
22 | 22 | * \wp-content\plugins\event-espresso-core\public\template_tags.php |
23 | 23 | ************************** IMPORTANT **************************/ |
24 | -add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_false' ); |
|
24 | +add_filter('FHEE__content_espresso_events__template_loaded', '__return_false'); |
|
25 | 25 | |
26 | 26 | //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; |
27 | 27 | |
28 | 28 | global $post; |
29 | -$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : ''; |
|
30 | -$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class ); |
|
29 | +$event_class = has_excerpt($post->ID) ? ' has-excerpt' : ''; |
|
30 | +$event_class = apply_filters('FHEE__content_espresso_events__event_class', $event_class); |
|
31 | 31 | ?> |
32 | -<?php do_action( 'AHEE_event_details_before_post', $post ); ?> |
|
33 | -<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>> |
|
32 | +<?php do_action('AHEE_event_details_before_post', $post); ?> |
|
33 | +<article id="post-<?php the_ID(); ?>" <?php post_class($event_class); ?>> |
|
34 | 34 | |
35 | -<?php if ( is_single() ) : ?> |
|
35 | +<?php if (is_single()) : ?> |
|
36 | 36 | |
37 | - <div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv"> |
|
38 | - <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?> |
|
39 | - <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?> |
|
37 | + <div id="espresso-event-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv"> |
|
38 | + <?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?> |
|
39 | + <?php espresso_get_template_part('content', 'espresso_events-header'); ?> |
|
40 | 40 | </div> |
41 | 41 | |
42 | 42 | <div class="espresso-event-wrapper-dv"> |
@@ -46,16 +46,16 @@ discard block |
||
46 | 46 | <?php //espresso_get_template_part( 'content', 'espresso_events-details' ); ?> |
47 | 47 | <?php //espresso_get_template_part( 'content', 'espresso_events-venues' ); ?> |
48 | 48 | <footer class="event-meta"> |
49 | - <?php do_action( 'AHEE_event_details_footer_top', $post ); ?> |
|
50 | - <?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?> |
|
49 | + <?php do_action('AHEE_event_details_footer_top', $post); ?> |
|
50 | + <?php do_action('AHEE_event_details_footer_bottom', $post); ?> |
|
51 | 51 | </footer> |
52 | 52 | </div> |
53 | 53 | |
54 | -<?php elseif ( is_archive() ) : ?> |
|
54 | +<?php elseif (is_archive()) : ?> |
|
55 | 55 | |
56 | - <div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv"> |
|
57 | - <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?> |
|
58 | - <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?> |
|
56 | + <div id="espresso-event-list-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv"> |
|
57 | + <?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?> |
|
58 | + <?php espresso_get_template_part('content', 'espresso_events-header'); ?> |
|
59 | 59 | </div> |
60 | 60 | |
61 | 61 | <div class="espresso-event-list-wrapper-dv"> |
@@ -70,5 +70,5 @@ discard block |
||
70 | 70 | |
71 | 71 | </article> |
72 | 72 | <!-- #post --> |
73 | -<?php do_action( 'AHEE_event_details_after_post', $post ); |
|
73 | +<?php do_action('AHEE_event_details_after_post', $post); |
|
74 | 74 |
@@ -18,52 +18,52 @@ |
||
18 | 18 | * and/or use any of the template tags functions found in: |
19 | 19 | * \wp-content\plugins\event-espresso-core\public\template_tags.php |
20 | 20 | ************************** IMPORTANT **************************/ |
21 | -add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_true' ); |
|
21 | +add_filter('FHEE__content_espresso_events__template_loaded', '__return_true'); |
|
22 | 22 | |
23 | 23 | //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; |
24 | 24 | |
25 | 25 | global $post; |
26 | -$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : ''; |
|
27 | -$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class ); |
|
26 | +$event_class = has_excerpt($post->ID) ? ' has-excerpt' : ''; |
|
27 | +$event_class = apply_filters('FHEE__content_espresso_events__event_class', $event_class); |
|
28 | 28 | ?> |
29 | -<?php do_action( 'AHEE_event_details_before_post', $post ); ?> |
|
30 | -<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>> |
|
29 | +<?php do_action('AHEE_event_details_before_post', $post); ?> |
|
30 | +<article id="post-<?php the_ID(); ?>" <?php post_class($event_class); ?>> |
|
31 | 31 | |
32 | -<?php if ( is_single() ) : ?> |
|
32 | +<?php if (is_single()) : ?> |
|
33 | 33 | |
34 | - <div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv"> |
|
35 | - <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?> |
|
36 | - <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?> |
|
34 | + <div id="espresso-event-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv"> |
|
35 | + <?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?> |
|
36 | + <?php espresso_get_template_part('content', 'espresso_events-header'); ?> |
|
37 | 37 | </div> |
38 | 38 | |
39 | 39 | <div class="espresso-event-wrapper-dv"> |
40 | - <?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?> |
|
41 | - <?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?> |
|
42 | - <?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?> |
|
43 | - <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?> |
|
40 | + <?php espresso_get_template_part('content', 'espresso_events-tickets'); ?> |
|
41 | + <?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?> |
|
42 | + <?php espresso_get_template_part('content', 'espresso_events-details'); ?> |
|
43 | + <?php espresso_get_template_part('content', 'espresso_events-venues'); ?> |
|
44 | 44 | <footer class="event-meta"> |
45 | - <?php do_action( 'AHEE_event_details_footer_top', $post ); ?> |
|
46 | - <?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?> |
|
45 | + <?php do_action('AHEE_event_details_footer_top', $post); ?> |
|
46 | + <?php do_action('AHEE_event_details_footer_bottom', $post); ?> |
|
47 | 47 | </footer> |
48 | 48 | </div> |
49 | 49 | |
50 | -<?php elseif ( is_archive() ) : ?> |
|
50 | +<?php elseif (is_archive()) : ?> |
|
51 | 51 | |
52 | - <div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv"> |
|
53 | - <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?> |
|
54 | - <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?> |
|
52 | + <div id="espresso-event-list-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv"> |
|
53 | + <?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?> |
|
54 | + <?php espresso_get_template_part('content', 'espresso_events-header'); ?> |
|
55 | 55 | </div> |
56 | 56 | |
57 | 57 | <div class="espresso-event-list-wrapper-dv"> |
58 | - <?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?> |
|
59 | - <?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?> |
|
60 | - <?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?> |
|
61 | - <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?> |
|
58 | + <?php espresso_get_template_part('content', 'espresso_events-tickets'); ?> |
|
59 | + <?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?> |
|
60 | + <?php espresso_get_template_part('content', 'espresso_events-details'); ?> |
|
61 | + <?php espresso_get_template_part('content', 'espresso_events-venues'); ?> |
|
62 | 62 | </div> |
63 | 63 | |
64 | 64 | <?php endif; ?> |
65 | 65 | |
66 | 66 | </article> |
67 | 67 | <!-- #post --> |
68 | -<?php do_action( 'AHEE_event_details_after_post', $post ); |
|
68 | +<?php do_action('AHEE_event_details_after_post', $post); |
|
69 | 69 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | |
33 | 33 | public function __construct() { |
34 | 34 | //define some help/support page related constants |
35 | - define( 'EE_SUPPORT_PG_SLUG', 'espresso_support' ); |
|
36 | - define( 'EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG )); |
|
37 | - define( 'EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/'); |
|
38 | - define( 'EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/' ); |
|
39 | - define( 'EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/' ); |
|
35 | + define('EE_SUPPORT_PG_SLUG', 'espresso_support'); |
|
36 | + define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page='.EE_SUPPORT_PG_SLUG)); |
|
37 | + define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'support/templates/'); |
|
38 | + define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES.'support/'); |
|
39 | + define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL.'support/assets/'); |
|
40 | 40 | parent::__construct(); |
41 | 41 | } |
42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | protected function _set_menu_map() { |
48 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
48 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
49 | 49 | 'menu_group' => 'extras', |
50 | 50 | 'menu_order' => 30, |
51 | 51 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN, |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'route' => 'contact_list_report', |
37 | 37 | 'extra_request' => |
38 | 38 | array( |
39 | - 'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) ) |
|
39 | + 'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") ) |
|
40 | 40 | ), |
41 | 41 | // 'contact_list_export'=> array( |
42 | 42 | // 'route' => 'contact_list_export' |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -77,7 +79,7 @@ discard block |
||
77 | 79 | $new_file_contents .= EEH_Export::get_csv_row( $data_row); |
78 | 80 | } |
79 | 81 | return EEH_File::write_to_file( $filepath, EEH_File::get_file_contents( $filepath ) . $new_file_contents ); |
80 | - }else{ |
|
82 | + } else{ |
|
81 | 83 | //no data TO write... so we can assume that's a success |
82 | 84 | return true; |
83 | 85 | } |
@@ -138,9 +140,9 @@ discard block |
||
138 | 140 | } |
139 | 141 | if( $pretty_schema === true){ |
140 | 142 | return $field_obj->prepare_for_pretty_echoing( $value_on_model_obj ); |
141 | - }elseif( is_string( $pretty_schema ) ) { |
|
143 | + } elseif( is_string( $pretty_schema ) ) { |
|
142 | 144 | return $field_obj->prepare_for_pretty_echoing($value_on_model_obj, $pretty_schema ); |
143 | - }else{ |
|
145 | + } else{ |
|
144 | 146 | return $field_obj->prepare_for_get( $value_on_model_obj ); |
145 | 147 | } |
146 | 148 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | * @return string |
32 | 32 | */ |
33 | 33 | public static function get_column_name_for_field(EE_Model_Field_Base $field){ |
34 | - return wp_specialchars_decode($field->get_nicename(), ENT_QUOTES) |
|
35 | - . "[" . wp_specialchars_decode($field->get_name(), ENT_QUOTES) |
|
36 | - . "]"; |
|
34 | + return wp_specialchars_decode($field->get_nicename(), ENT_QUOTES) |
|
35 | + . "[" . wp_specialchars_decode($field->get_name(), ENT_QUOTES) |
|
36 | + . "]"; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | |
89 | 89 | /** |
90 | 90 | * |
91 | - * Writes a row to the csv file |
|
92 | - * @param array $row - individual row of csv data |
|
93 | - * @param string $delimiter - csv delimiter |
|
94 | - * @param string $enclosure - csv enclosure |
|
95 | - * @param bool $mysql_null - allows php NULL to be overridden with MySQl's insertable NULL value |
|
96 | - * @return string of text for teh csv file |
|
97 | - */ |
|
91 | + * Writes a row to the csv file |
|
92 | + * @param array $row - individual row of csv data |
|
93 | + * @param string $delimiter - csv delimiter |
|
94 | + * @param string $enclosure - csv enclosure |
|
95 | + * @param bool $mysql_null - allows php NULL to be overridden with MySQl's insertable NULL value |
|
96 | + * @return string of text for teh csv file |
|
97 | + */ |
|
98 | 98 | public static function get_csv_row ( array $row, $delimiter = ',', $enclosure = '"', $mysql_null = false ) { |
99 | 99 | //Allow user to filter the csv delimiter and enclosure for other countries csv standards |
100 | 100 | $delimiter = apply_filters( 'FHEE__EE_CSV__fputcsv2__delimiter', $delimiter ); |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | * @param EE_Model_Field_Base $field |
31 | 31 | * @return string |
32 | 32 | */ |
33 | - public static function get_column_name_for_field(EE_Model_Field_Base $field){ |
|
33 | + public static function get_column_name_for_field(EE_Model_Field_Base $field) { |
|
34 | 34 | return wp_specialchars_decode($field->get_nicename(), ENT_QUOTES) |
35 | - . "[" . wp_specialchars_decode($field->get_name(), ENT_QUOTES) |
|
35 | + . "[".wp_specialchars_decode($field->get_name(), ENT_QUOTES) |
|
36 | 36 | . "]"; |
37 | 37 | } |
38 | 38 | |
@@ -54,31 +54,31 @@ discard block |
||
54 | 54 | * we consider that a success (because we wrote everything there was...nothing) |
55 | 55 | * @throws EE_Error |
56 | 56 | */ |
57 | - public static function write_data_array_to_csv( $filepath, $data, $write_column_headers = true ){ |
|
57 | + public static function write_data_array_to_csv($filepath, $data, $write_column_headers = true) { |
|
58 | 58 | |
59 | 59 | $new_file_contents = ''; |
60 | 60 | //determine if $data is actually a 2d array |
61 | - if ( $data && is_array($data) && is_array(EEH_Array::get_one_item_from_array($data))){ |
|
61 | + if ($data && is_array($data) && is_array(EEH_Array::get_one_item_from_array($data))) { |
|
62 | 62 | //make sure top level is numerically indexed, |
63 | 63 | |
64 | - if( EEH_Array::is_associative_array($data)){ |
|
65 | - throw new EE_Error(sprintf(__("top-level array must be numerically indexed. Does these look like numbers to you? %s","event_espresso"),implode(",",array_keys($data)))); |
|
64 | + if (EEH_Array::is_associative_array($data)) { |
|
65 | + throw new EE_Error(sprintf(__("top-level array must be numerically indexed. Does these look like numbers to you? %s", "event_espresso"), implode(",", array_keys($data)))); |
|
66 | 66 | } |
67 | 67 | $item_in_top_level_array = EEH_Array::get_one_item_from_array($data); |
68 | 68 | //now, is the last item in the top-level array of $data an associative or numeric array? |
69 | - if( $write_column_headers && |
|
70 | - EEH_Array::is_associative_array($item_in_top_level_array)){ |
|
69 | + if ($write_column_headers && |
|
70 | + EEH_Array::is_associative_array($item_in_top_level_array)) { |
|
71 | 71 | //its associative, so we want to output its keys as column headers |
72 | 72 | $keys = array_keys($item_in_top_level_array); |
73 | - $new_file_contents .= EEH_Export::get_csv_row( $keys ); |
|
73 | + $new_file_contents .= EEH_Export::get_csv_row($keys); |
|
74 | 74 | |
75 | 75 | } |
76 | 76 | //start writing data |
77 | - foreach($data as $data_row){ |
|
78 | - $new_file_contents .= EEH_Export::get_csv_row( $data_row); |
|
77 | + foreach ($data as $data_row) { |
|
78 | + $new_file_contents .= EEH_Export::get_csv_row($data_row); |
|
79 | 79 | } |
80 | - return EEH_File::write_to_file( $filepath, EEH_File::get_file_contents( $filepath ) . $new_file_contents ); |
|
81 | - }else{ |
|
80 | + return EEH_File::write_to_file($filepath, EEH_File::get_file_contents($filepath).$new_file_contents); |
|
81 | + } else { |
|
82 | 82 | //no data TO write... so we can assume that's a success |
83 | 83 | return true; |
84 | 84 | } |
@@ -95,29 +95,29 @@ discard block |
||
95 | 95 | * @param bool $mysql_null - allows php NULL to be overridden with MySQl's insertable NULL value |
96 | 96 | * @return string of text for teh csv file |
97 | 97 | */ |
98 | - public static function get_csv_row ( array $row, $delimiter = ',', $enclosure = '"', $mysql_null = false ) { |
|
98 | + public static function get_csv_row(array $row, $delimiter = ',', $enclosure = '"', $mysql_null = false) { |
|
99 | 99 | //Allow user to filter the csv delimiter and enclosure for other countries csv standards |
100 | - $delimiter = apply_filters( 'FHEE__EE_CSV__fputcsv2__delimiter', $delimiter ); |
|
101 | - $enclosure = apply_filters( 'FHEE__EE_CSV__fputcsv2__enclosure', $enclosure ); |
|
100 | + $delimiter = apply_filters('FHEE__EE_CSV__fputcsv2__delimiter', $delimiter); |
|
101 | + $enclosure = apply_filters('FHEE__EE_CSV__fputcsv2__enclosure', $enclosure); |
|
102 | 102 | |
103 | 103 | $delimiter_esc = preg_quote($delimiter, '/'); |
104 | 104 | $enclosure_esc = preg_quote($enclosure, '/'); |
105 | 105 | |
106 | 106 | $output = array(); |
107 | 107 | foreach ($row as $field_value) { |
108 | - if(is_object($field_value) || is_array($field_value)){ |
|
108 | + if (is_object($field_value) || is_array($field_value)) { |
|
109 | 109 | $field_value = serialize($field_value); |
110 | 110 | } |
111 | - if ($field_value === null && $mysql_null ) { |
|
111 | + if ($field_value === null && $mysql_null) { |
|
112 | 112 | $output[] = 'NULL'; |
113 | 113 | continue; |
114 | 114 | } |
115 | 115 | |
116 | 116 | $output[] = preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field_value) ? |
117 | - ( $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field_value) . $enclosure ) : $field_value; |
|
117 | + ($enclosure.str_replace($enclosure, $enclosure.$enclosure, $field_value).$enclosure) : $field_value; |
|
118 | 118 | } |
119 | 119 | |
120 | - return implode($delimiter, $output) . PHP_EOL; |
|
120 | + return implode($delimiter, $output).PHP_EOL; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | |
@@ -130,19 +130,19 @@ discard block |
||
130 | 130 | * @param boolean|string $pretty_schema true to display pretty, a string to use a specific "Schema", or false to NOT display pretty |
131 | 131 | * @return string |
132 | 132 | */ |
133 | - public static function prepare_value_from_db_for_display( $model, $field_name, $raw_db_value, $pretty_schema = true ) { |
|
134 | - $field_obj = $model->field_settings_for( $field_name ); |
|
135 | - $value_on_model_obj = $field_obj->prepare_for_set_from_db( $raw_db_value ); |
|
136 | - if( $field_obj instanceof EE_Datetime_Field ) { |
|
137 | - $field_obj->set_date_format( EEH_Export::get_date_format_for_export( $field_obj->get_date_format( $pretty_schema ) ), $pretty_schema ); |
|
138 | - $field_obj->set_time_format( EEH_Export::get_time_format_for_export( $field_obj->get_time_format( $pretty_schema ) ), $pretty_schema ); |
|
133 | + public static function prepare_value_from_db_for_display($model, $field_name, $raw_db_value, $pretty_schema = true) { |
|
134 | + $field_obj = $model->field_settings_for($field_name); |
|
135 | + $value_on_model_obj = $field_obj->prepare_for_set_from_db($raw_db_value); |
|
136 | + if ($field_obj instanceof EE_Datetime_Field) { |
|
137 | + $field_obj->set_date_format(EEH_Export::get_date_format_for_export($field_obj->get_date_format($pretty_schema)), $pretty_schema); |
|
138 | + $field_obj->set_time_format(EEH_Export::get_time_format_for_export($field_obj->get_time_format($pretty_schema)), $pretty_schema); |
|
139 | 139 | } |
140 | - if( $pretty_schema === true){ |
|
141 | - return $field_obj->prepare_for_pretty_echoing( $value_on_model_obj ); |
|
142 | - }elseif( is_string( $pretty_schema ) ) { |
|
143 | - return $field_obj->prepare_for_pretty_echoing($value_on_model_obj, $pretty_schema ); |
|
144 | - }else{ |
|
145 | - return $field_obj->prepare_for_get( $value_on_model_obj ); |
|
140 | + if ($pretty_schema === true) { |
|
141 | + return $field_obj->prepare_for_pretty_echoing($value_on_model_obj); |
|
142 | + }elseif (is_string($pretty_schema)) { |
|
143 | + return $field_obj->prepare_for_pretty_echoing($value_on_model_obj, $pretty_schema); |
|
144 | + } else { |
|
145 | + return $field_obj->prepare_for_get($value_on_model_obj); |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | * @param string $current_format |
154 | 154 | * @return string |
155 | 155 | */ |
156 | - public static function get_date_format_for_export( $current_format = null ) { |
|
157 | - return apply_filters( 'FHEE__EE_CSV__get_date_format_for_csv__format', 'Y-m-d', $current_format ); |
|
156 | + public static function get_date_format_for_export($current_format = null) { |
|
157 | + return apply_filters('FHEE__EE_CSV__get_date_format_for_csv__format', 'Y-m-d', $current_format); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | * @param string $current_format |
165 | 165 | * @return string |
166 | 166 | */ |
167 | - public static function get_time_format_for_export( $current_format = null ) { |
|
168 | - return apply_filters( 'FHEE__EE_CSV__get_time_format_for_csv__format', 'H:i:s', $current_format ); |
|
167 | + public static function get_time_format_for_export($current_format = null) { |
|
168 | + return apply_filters('FHEE__EE_CSV__get_time_format_for_csv__format', 'H:i:s', $current_format); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | use EventEspressoBatchRequest\Helpers\JobParameters; |
21 | 21 | use EventEspressoBatchRequest\Helpers\JobStepResponse; |
22 | 22 | |
23 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
24 | - exit( 'No direct script access allowed' ); |
|
23 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
24 | + exit('No direct script access allowed'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @throws BatchRequestException |
36 | 36 | * @return JobStepResponse |
37 | 37 | */ |
38 | - public function create_job( JobParameters $job_parameters ); |
|
38 | + public function create_job(JobParameters $job_parameters); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Performs another step of the job |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @return JobStepResponse |
45 | 45 | * @throws BatchRequestException |
46 | 46 | */ |
47 | - public function continue_job( JobParameters $job_parameters, $batch_size = 50 ); |
|
47 | + public function continue_job(JobParameters $job_parameters, $batch_size = 50); |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Performs any clean-up logic when we know the job is completed |
@@ -52,5 +52,5 @@ discard block |
||
52 | 52 | * @return JobStepResponse |
53 | 53 | * @throws BatchRequestException |
54 | 54 | */ |
55 | - public function cleanup_job( JobParameters $job_parameters ); |
|
55 | + public function cleanup_job(JobParameters $job_parameters); |
|
56 | 56 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | 4 | |
5 | 5 | /** |
@@ -46,22 +46,22 @@ discard block |
||
46 | 46 | * @return string the assembled html string containing the tabbed content for display. |
47 | 47 | * @throws \EE_Error |
48 | 48 | */ |
49 | - public static function display($tabs_contents, $tabs_names = array(), $small_tabs = true, $tabs_content = TRUE ) { |
|
49 | + public static function display($tabs_contents, $tabs_names = array(), $small_tabs = true, $tabs_content = TRUE) { |
|
50 | 50 | |
51 | 51 | //first check if $tabs_names is not empty then the count must match the count of $tabs_content otherwise we've got a problem houston |
52 | - if ( !empty( $tabs_names) && ( count( (array) $tabs_names) != count( (array) $tabs_content) ) ) { |
|
53 | - throw new EE_Error( __('The count for $tabs_names and $tabs_content does not match.', 'event_espresso') ); |
|
52 | + if ( ! empty($tabs_names) && (count((array) $tabs_names) != count((array) $tabs_content))) { |
|
53 | + throw new EE_Error(__('The count for $tabs_names and $tabs_content does not match.', 'event_espresso')); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | //make sure we've got incoming data setup properly |
57 | - $tabs = !empty( $tabs_names ) ? (array) $tabs_names : array_keys( (array) $tabs_contents ); |
|
58 | - $tabs_content = !empty( $tabs_names ) ? array_combine( (array) $tabs_names, (array) $tabs_content ) : $tabs_contents; |
|
57 | + $tabs = ! empty($tabs_names) ? (array) $tabs_names : array_keys((array) $tabs_contents); |
|
58 | + $tabs_content = ! empty($tabs_names) ? array_combine((array) $tabs_names, (array) $tabs_content) : $tabs_contents; |
|
59 | 59 | |
60 | - $all_tabs = '<h2 class="nav-tab-wrapper">' . "\n"; |
|
60 | + $all_tabs = '<h2 class="nav-tab-wrapper">'."\n"; |
|
61 | 61 | $all_tabs_content = ''; |
62 | 62 | |
63 | 63 | $index = 0; |
64 | - foreach ( $tabs as $tab ) { |
|
64 | + foreach ($tabs as $tab) { |
|
65 | 65 | $active = $index === 0 ? true : false; |
66 | 66 | $all_tabs .= self::tab($tab, $active); |
67 | 67 | $all_tabs_content .= self::tab_content($tab, $tabs_content[$tab], $active); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $tab_container_class = $small_tabs ? 'ee-nav-tabs ee-nav-tabs-small' : 'ee-nav-tabs'; |
80 | 80 | |
81 | - return '<div class="'. $tab_container_class . '">' . "\n\t" . $all_tabs . $all_tabs_content . "\n" . '</div>'; |
|
81 | + return '<div class="'.$tab_container_class.'">'."\n\t".$all_tabs.$all_tabs_content."\n".'</div>'; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | * @throws \EE_Error |
103 | 103 | */ |
104 | 104 | public static function display_admin_nav_tabs($nav_tabs = array()) { |
105 | - if ( empty($nav_tabs) ) |
|
106 | - throw new EE_Error( __('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso' ) ); |
|
105 | + if (empty($nav_tabs)) |
|
106 | + throw new EE_Error(__('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso')); |
|
107 | 107 | |
108 | - $all_tabs = '<h2 class="nav-tab-wrapper">' . "\n"; |
|
109 | - foreach ( $nav_tabs as $slug => $tab ) { |
|
108 | + $all_tabs = '<h2 class="nav-tab-wrapper">'."\n"; |
|
109 | + foreach ($nav_tabs as $slug => $tab) { |
|
110 | 110 | $all_tabs .= self::tab($slug, false, $tab['link_text'], $tab['url'], $tab['css_class']); |
111 | 111 | } |
112 | 112 | $all_tabs .= '</h2>'; |
@@ -122,13 +122,13 @@ discard block |
||
122 | 122 | * @param bool|string $css If string given then the generated tab will include that as the class. |
123 | 123 | * @return string html for tab |
124 | 124 | */ |
125 | - private static function tab($name, $active = false, $nice_name = FALSE, $url = FALSE, $css = FALSE ) { |
|
125 | + private static function tab($name, $active = false, $nice_name = FALSE, $url = FALSE, $css = FALSE) { |
|
126 | 126 | $name = str_replace(' ', '-', $name); |
127 | 127 | $class = $active ? 'nav-tab nav-tab-active' : 'nav-tab'; |
128 | - $class = $css ? $class . ' ' . $css : $class; |
|
129 | - $nice_name = $nice_name ? $nice_name : ucwords( preg_replace('/(-|_)/', ' ', $name) ); |
|
130 | - $url = $url ? $url : '#' . $name; |
|
131 | - $tab = '<a class="' . $class . '" rel="ee-tab-' . $name . '" href="' . $url . '">' . $nice_name . '</a>' . "\n\t"; |
|
128 | + $class = $css ? $class.' '.$css : $class; |
|
129 | + $nice_name = $nice_name ? $nice_name : ucwords(preg_replace('/(-|_)/', ' ', $name)); |
|
130 | + $url = $url ? $url : '#'.$name; |
|
131 | + $tab = '<a class="'.$class.'" rel="ee-tab-'.$name.'" href="'.$url.'">'.$nice_name.'</a>'."\n\t"; |
|
132 | 132 | return $tab; |
133 | 133 | } |
134 | 134 | |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | */ |
145 | 145 | private static function tab_content($name, $tab_content, $active = false) { |
146 | 146 | $class = $active ? 'nav-tab-content' : 'nav-tab-content hidden'; |
147 | - $name = str_replace( ' ', '-', $name); |
|
148 | - $content = "\t" . '<div class="'. $class . '" id="ee-tab-' . $name . '">' . "\n"; |
|
149 | - $content .= "\t" . $tab_content . "\n"; |
|
147 | + $name = str_replace(' ', '-', $name); |
|
148 | + $content = "\t".'<div class="'.$class.'" id="ee-tab-'.$name.'">'."\n"; |
|
149 | + $content .= "\t".$tab_content."\n"; |
|
150 | 150 | $content .= '<div style="clear:both"></div></div>'; |
151 | 151 | return $content; |
152 | 152 | } |
@@ -172,9 +172,9 @@ discard block |
||
172 | 172 | * @param string $default You can include a string for the item that will receive the "item_display" class for the js. |
173 | 173 | * @return string a html snippet of of all the formatted link elements. |
174 | 174 | */ |
175 | - public static function tab_text_links( $item_array, $container_class = '', $sep = '|', $default = '' ) { |
|
176 | - $item_array = apply_filters( 'FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class ); |
|
177 | - if ( !is_array($item_array) || empty( $item_array ) ) |
|
175 | + public static function tab_text_links($item_array, $container_class = '', $sep = '|', $default = '') { |
|
176 | + $item_array = apply_filters('FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class); |
|
177 | + if ( ! is_array($item_array) || empty($item_array)) |
|
178 | 178 | return false; //get out we don't have even the basic thing we need! |
179 | 179 | |
180 | 180 | |
@@ -185,15 +185,15 @@ discard block |
||
185 | 185 | 'title' => esc_attr__('Link for Item', 'event_espresso'), |
186 | 186 | 'slug' => 'item_slug' |
187 | 187 | ); |
188 | - $container_class = !empty($container_class) ? 'ee-text-links ' . $container_class : 'ee-text-links'; |
|
189 | - $list = '<ul class="' . $container_class . '">'; |
|
188 | + $container_class = ! empty($container_class) ? 'ee-text-links '.$container_class : 'ee-text-links'; |
|
189 | + $list = '<ul class="'.$container_class.'">'; |
|
190 | 190 | |
191 | 191 | $ci = 1; |
192 | - foreach ( $item_array as $item ) { |
|
193 | - $item = wp_parse_args( $item, $defaults ); |
|
194 | - $item['class'] = !empty($default) && $default == $item['slug'] ? 'item_display ' . $item['class'] : $item['class']; |
|
192 | + foreach ($item_array as $item) { |
|
193 | + $item = wp_parse_args($item, $defaults); |
|
194 | + $item['class'] = ! empty($default) && $default == $item['slug'] ? 'item_display '.$item['class'] : $item['class']; |
|
195 | 195 | $list .= self::_text_link_item($item); |
196 | - if ( !empty($sep) && $ci != count($item_array) ) |
|
196 | + if ( ! empty($sep) && $ci != count($item_array)) |
|
197 | 197 | $list .= self::_text_link_item($sep); |
198 | 198 | $ci++; |
199 | 199 | } |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | |
205 | 205 | |
206 | 206 | |
207 | - private static function _text_link_item( $item ) { |
|
207 | + private static function _text_link_item($item) { |
|
208 | 208 | //if this isn't an array then we're doing a separator |
209 | - if ( !is_array( $item ) ) { |
|
209 | + if ( ! is_array($item)) { |
|
210 | 210 | $label = $item; |
211 | 211 | $class = 'ee-text-link-sep'; |
212 | 212 | $href = ''; |
@@ -215,12 +215,12 @@ discard block |
||
215 | 215 | extract($item); |
216 | 216 | } |
217 | 217 | |
218 | - $class = $class != 'ee-text-link-sep' ? 'class="ee-text-link-li ' . $class . '"' : 'class="ee-text-link-sep"'; |
|
218 | + $class = $class != 'ee-text-link-sep' ? 'class="ee-text-link-li '.$class.'"' : 'class="ee-text-link-sep"'; |
|
219 | 219 | |
220 | - $content = '<li ' . $class . '>'; |
|
221 | - $content .= !empty($href) ? '<a class="ee-text-link" href="#' . $href . '" title="' . $title . '">' : ''; |
|
220 | + $content = '<li '.$class.'>'; |
|
221 | + $content .= ! empty($href) ? '<a class="ee-text-link" href="#'.$href.'" title="'.$title.'">' : ''; |
|
222 | 222 | $content .= $label; |
223 | - $content .= !empty($href) ? '</a>' : ''; |
|
223 | + $content .= ! empty($href) ? '</a>' : ''; |
|
224 | 224 | $content .= '</li>'; |
225 | 225 | return $content; |
226 | 226 | } |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -102,8 +103,9 @@ discard block |
||
102 | 103 | * @throws \EE_Error |
103 | 104 | */ |
104 | 105 | public static function display_admin_nav_tabs($nav_tabs = array()) { |
105 | - if ( empty($nav_tabs) ) |
|
106 | - throw new EE_Error( __('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso' ) ); |
|
106 | + if ( empty($nav_tabs) ) { |
|
107 | + throw new EE_Error( __('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso' ) ); |
|
108 | + } |
|
107 | 109 | |
108 | 110 | $all_tabs = '<h2 class="nav-tab-wrapper">' . "\n"; |
109 | 111 | foreach ( $nav_tabs as $slug => $tab ) { |
@@ -174,8 +176,10 @@ discard block |
||
174 | 176 | */ |
175 | 177 | public static function tab_text_links( $item_array, $container_class = '', $sep = '|', $default = '' ) { |
176 | 178 | $item_array = apply_filters( 'FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class ); |
177 | - if ( !is_array($item_array) || empty( $item_array ) ) |
|
178 | - return false; //get out we don't have even the basic thing we need! |
|
179 | + if ( !is_array($item_array) || empty( $item_array ) ) { |
|
180 | + return false; |
|
181 | + } |
|
182 | + //get out we don't have even the basic thing we need! |
|
179 | 183 | |
180 | 184 | |
181 | 185 | $defaults = array( |
@@ -193,8 +197,9 @@ discard block |
||
193 | 197 | $item = wp_parse_args( $item, $defaults ); |
194 | 198 | $item['class'] = !empty($default) && $default == $item['slug'] ? 'item_display ' . $item['class'] : $item['class']; |
195 | 199 | $list .= self::_text_link_item($item); |
196 | - if ( !empty($sep) && $ci != count($item_array) ) |
|
197 | - $list .= self::_text_link_item($sep); |
|
200 | + if ( !empty($sep) && $ci != count($item_array) ) { |
|
201 | + $list .= self::_text_link_item($sep); |
|
202 | + } |
|
198 | 203 | $ci++; |
199 | 204 | } |
200 | 205 |