@@ -1,28 +1,28 @@ discard block |
||
1 | 1 | <div class="uix-field-wrapper"> |
2 | 2 | |
3 | 3 | <ul class="ui-tab-nav"> |
4 | - <li><a href="#ui-general" class="active"><?php esc_html_e('General','to-specials'); ?></a></li> |
|
5 | - <?php if(class_exists('LSX_TO_Search')) { ?> |
|
6 | - <li><a href="#ui-search"><?php esc_html_e('Search','to-specials'); ?></a></li> |
|
4 | + <li><a href="#ui-general" class="active"><?php esc_html_e('General', 'to-specials'); ?></a></li> |
|
5 | + <?php if (class_exists('LSX_TO_Search')) { ?> |
|
6 | + <li><a href="#ui-search"><?php esc_html_e('Search', 'to-specials'); ?></a></li> |
|
7 | 7 | <?php } ?> |
8 | - <li><a href="#ui-placeholders"><?php esc_html_e('Placeholders','to-specials'); ?></a></li> |
|
9 | - <li><a href="#ui-archives"><?php esc_html_e('Archives','to-specials'); ?></a></li> |
|
10 | - <li><a href="#ui-single"><?php esc_html_e('Single','to-specials'); ?></a></li> |
|
8 | + <li><a href="#ui-placeholders"><?php esc_html_e('Placeholders', 'to-specials'); ?></a></li> |
|
9 | + <li><a href="#ui-archives"><?php esc_html_e('Archives', 'to-specials'); ?></a></li> |
|
10 | + <li><a href="#ui-single"><?php esc_html_e('Single', 'to-specials'); ?></a></li> |
|
11 | 11 | </ul> |
12 | 12 | |
13 | 13 | <div id="ui-general" class="ui-tab active"> |
14 | 14 | <table class="form-table"> |
15 | 15 | <tbody> |
16 | - <?php do_action('lsx_to_framework_special_tab_content','special','general'); ?> |
|
16 | + <?php do_action('lsx_to_framework_special_tab_content', 'special', 'general'); ?> |
|
17 | 17 | </tbody> |
18 | 18 | </table> |
19 | 19 | </div> |
20 | 20 | |
21 | - <?php if(class_exists('LSX_TO_Search')) { ?> |
|
21 | + <?php if (class_exists('LSX_TO_Search')) { ?> |
|
22 | 22 | <div id="ui-search" class="ui-tab"> |
23 | 23 | <table class="form-table"> |
24 | 24 | <tbody> |
25 | - <?php do_action('lsx_to_framework_special_tab_content','special','search'); ?> |
|
25 | + <?php do_action('lsx_to_framework_special_tab_content', 'special', 'search'); ?> |
|
26 | 26 | </tbody> |
27 | 27 | </table> |
28 | 28 | </div> |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | <div id="ui-placeholders" class="ui-tab"> |
32 | 32 | <table class="form-table"> |
33 | 33 | <tbody> |
34 | - <?php do_action('lsx_to_framework_special_tab_content','special','placeholders'); ?> |
|
34 | + <?php do_action('lsx_to_framework_special_tab_content', 'special', 'placeholders'); ?> |
|
35 | 35 | </tbody> |
36 | 36 | </table> |
37 | 37 | </div> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <div id="ui-archives" class="ui-tab"> |
40 | 40 | <table class="form-table"> |
41 | 41 | <tbody> |
42 | - <?php do_action('lsx_to_framework_special_tab_content','special','archives'); ?> |
|
42 | + <?php do_action('lsx_to_framework_special_tab_content', 'special', 'archives'); ?> |
|
43 | 43 | </tbody> |
44 | 44 | </table> |
45 | 45 | </div> |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | <div id="ui-single" class="ui-tab"> |
48 | 48 | <table class="form-table"> |
49 | 49 | <tbody> |
50 | - <?php do_action('lsx_to_framework_special_tab_content','special','single'); ?> |
|
50 | + <?php do_action('lsx_to_framework_special_tab_content', 'special', 'single'); ?> |
|
51 | 51 | </tbody> |
52 | 52 | </table> |
53 | 53 | </div> |
54 | - <?php do_action('lsx_to_framework_special_tab_bottom','special'); ?> |
|
54 | + <?php do_action('lsx_to_framework_special_tab_bottom', 'special'); ?> |
|
55 | 55 | </div> |
@@ -13,19 +13,19 @@ |
||
13 | 13 | 'class' => 'LSX_TO_Specials', |
14 | 14 | 'menu_icon' => 'dashicons-star-filled', |
15 | 15 | 'labels' => array( |
16 | - 'name' => esc_html__( 'Specials', 'to-specials' ), |
|
17 | - 'singular_name' => esc_html__( 'Activity', 'to-specials' ), |
|
18 | - 'add_new' => esc_html__( 'Add New', 'to-specials' ), |
|
19 | - 'add_new_item' => esc_html__( 'Add New Special', 'to-specials' ), |
|
20 | - 'edit_item' => esc_html__( 'Edit Special', 'to-specials' ), |
|
21 | - 'new_item' => esc_html__( 'New Specials', 'to-specials' ), |
|
22 | - 'all_items' => esc_html__( 'Specials', 'to-specials' ), |
|
23 | - 'view_item' => esc_html__( 'View Special', 'to-specials' ), |
|
24 | - 'search_items' => esc_html__( 'Search Specials', 'to-specials' ), |
|
25 | - 'not_found' => esc_html__( 'No specials found', 'to-specials' ), |
|
26 | - 'not_found_in_trash' => esc_html__( 'No specials found in Trash', 'to-specials' ), |
|
16 | + 'name' => esc_html__('Specials', 'to-specials'), |
|
17 | + 'singular_name' => esc_html__('Activity', 'to-specials'), |
|
18 | + 'add_new' => esc_html__('Add New', 'to-specials'), |
|
19 | + 'add_new_item' => esc_html__('Add New Special', 'to-specials'), |
|
20 | + 'edit_item' => esc_html__('Edit Special', 'to-specials'), |
|
21 | + 'new_item' => esc_html__('New Specials', 'to-specials'), |
|
22 | + 'all_items' => esc_html__('Specials', 'to-specials'), |
|
23 | + 'view_item' => esc_html__('View Special', 'to-specials'), |
|
24 | + 'search_items' => esc_html__('Search Specials', 'to-specials'), |
|
25 | + 'not_found' => esc_html__('No specials found', 'to-specials'), |
|
26 | + 'not_found_in_trash' => esc_html__('No specials found in Trash', 'to-specials'), |
|
27 | 27 | 'parent_item_colon' => '', |
28 | - 'menu_name' => esc_html__( 'Specials', 'to-specials' ), |
|
28 | + 'menu_name' => esc_html__('Specials', 'to-specials'), |
|
29 | 29 | ), |
30 | 30 | 'public' => true, |
31 | 31 | 'publicly_queryable' => true, |
@@ -10,46 +10,46 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | $post_type = array( |
13 | - 'class' => 'LSX_TO_Specials', |
|
14 | - 'menu_icon' => 'dashicons-star-filled', |
|
15 | - 'labels' => array( |
|
16 | - 'name' => esc_html__( 'Specials', 'to-specials' ), |
|
17 | - 'singular_name' => esc_html__( 'Activity', 'to-specials' ), |
|
18 | - 'add_new' => esc_html__( 'Add New', 'to-specials' ), |
|
19 | - 'add_new_item' => esc_html__( 'Add New Special', 'to-specials' ), |
|
20 | - 'edit_item' => esc_html__( 'Edit Special', 'to-specials' ), |
|
21 | - 'new_item' => esc_html__( 'New Specials', 'to-specials' ), |
|
22 | - 'all_items' => esc_html__( 'Specials', 'to-specials' ), |
|
23 | - 'view_item' => esc_html__( 'View Special', 'to-specials' ), |
|
24 | - 'search_items' => esc_html__( 'Search Specials', 'to-specials' ), |
|
25 | - 'not_found' => esc_html__( 'No specials found', 'to-specials' ), |
|
26 | - 'not_found_in_trash' => esc_html__( 'No specials found in Trash', 'to-specials' ), |
|
27 | - 'parent_item_colon' => '', |
|
28 | - 'menu_name' => esc_html__( 'Specials', 'to-specials' ), |
|
29 | - ), |
|
30 | - 'public' => true, |
|
31 | - 'publicly_queryable' => true, |
|
32 | - 'show_ui' => true, |
|
33 | - 'show_in_menu' => 'tour-operator', |
|
34 | - 'menu_position' => 70, |
|
35 | - 'query_var' => true, |
|
36 | - 'rewrite' => array( |
|
37 | - 'slug' => 'special', |
|
38 | - 'with_front' => false, |
|
39 | - ), |
|
40 | - 'exclude_from_search' => false, |
|
41 | - 'capability_type' => 'post', |
|
42 | - 'has_archive' => 'specials', |
|
43 | - 'hierarchical' => false, |
|
44 | - 'show_in_rest' => true, |
|
45 | - 'supports' => array( |
|
46 | - 'title', |
|
47 | - 'slug', |
|
48 | - 'editor', |
|
49 | - 'thumbnail', |
|
50 | - 'excerpt', |
|
51 | - 'custom-fields', |
|
52 | - ), |
|
13 | + 'class' => 'LSX_TO_Specials', |
|
14 | + 'menu_icon' => 'dashicons-star-filled', |
|
15 | + 'labels' => array( |
|
16 | + 'name' => esc_html__( 'Specials', 'to-specials' ), |
|
17 | + 'singular_name' => esc_html__( 'Activity', 'to-specials' ), |
|
18 | + 'add_new' => esc_html__( 'Add New', 'to-specials' ), |
|
19 | + 'add_new_item' => esc_html__( 'Add New Special', 'to-specials' ), |
|
20 | + 'edit_item' => esc_html__( 'Edit Special', 'to-specials' ), |
|
21 | + 'new_item' => esc_html__( 'New Specials', 'to-specials' ), |
|
22 | + 'all_items' => esc_html__( 'Specials', 'to-specials' ), |
|
23 | + 'view_item' => esc_html__( 'View Special', 'to-specials' ), |
|
24 | + 'search_items' => esc_html__( 'Search Specials', 'to-specials' ), |
|
25 | + 'not_found' => esc_html__( 'No specials found', 'to-specials' ), |
|
26 | + 'not_found_in_trash' => esc_html__( 'No specials found in Trash', 'to-specials' ), |
|
27 | + 'parent_item_colon' => '', |
|
28 | + 'menu_name' => esc_html__( 'Specials', 'to-specials' ), |
|
29 | + ), |
|
30 | + 'public' => true, |
|
31 | + 'publicly_queryable' => true, |
|
32 | + 'show_ui' => true, |
|
33 | + 'show_in_menu' => 'tour-operator', |
|
34 | + 'menu_position' => 70, |
|
35 | + 'query_var' => true, |
|
36 | + 'rewrite' => array( |
|
37 | + 'slug' => 'special', |
|
38 | + 'with_front' => false, |
|
39 | + ), |
|
40 | + 'exclude_from_search' => false, |
|
41 | + 'capability_type' => 'post', |
|
42 | + 'has_archive' => 'specials', |
|
43 | + 'hierarchical' => false, |
|
44 | + 'show_in_rest' => true, |
|
45 | + 'supports' => array( |
|
46 | + 'title', |
|
47 | + 'slug', |
|
48 | + 'editor', |
|
49 | + 'thumbnail', |
|
50 | + 'excerpt', |
|
51 | + 'custom-fields', |
|
52 | + ), |
|
53 | 53 | ); |
54 | 54 | |
55 | 55 | return $post_type; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * @subpackage template-tags |
14 | 14 | * @category special |
15 | 15 | */ |
16 | -if ( ! function_exists( 'lsx_to_special_posts' ) ) { |
|
16 | +if ( ! function_exists('lsx_to_special_posts')) { |
|
17 | 17 | function lsx_to_special_posts() { |
18 | 18 | global $lsx_to_archive; |
19 | 19 | |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | 'from' => 'post', |
22 | 22 | 'to' => 'special', |
23 | 23 | 'column' => '3', |
24 | - 'before' => '<section id="posts" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-posts">' . esc_html__( 'Featured Posts', 'to-specials' ) . '</h2><div id="collapse-posts" class="collapse in"><div class="collapse-inner">', |
|
24 | + 'before' => '<section id="posts" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-posts">' . esc_html__('Featured Posts', 'to-specials') . '</h2><div id="collapse-posts" class="collapse in"><div class="collapse-inner">', |
|
25 | 25 | 'after' => '</div></div></section>', |
26 | 26 | ); |
27 | 27 | |
28 | - lsx_to_connected_panel_query( $args ); |
|
28 | + lsx_to_connected_panel_query($args); |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | * @subpackage template-tag |
37 | 37 | * @category to-specials |
38 | 38 | */ |
39 | -function lsx_to_special_content( $slug, $name = null ) { |
|
40 | - do_action( 'lsx_special_content', $slug, $name ); |
|
39 | +function lsx_to_special_content($slug, $name = null) { |
|
40 | + do_action('lsx_special_content', $slug, $name); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | * @subpackage template-tag |
53 | 53 | * @category to-specials |
54 | 54 | */ |
55 | -function lsx_to_specials_terms_conditions( $before = '', $after = '', $echo = true ) { |
|
56 | - lsx_to_custom_field_query( 'terms_conditions', $before, $after, $echo ); |
|
55 | +function lsx_to_specials_terms_conditions($before = '', $after = '', $echo = true) { |
|
56 | + lsx_to_custom_field_query('terms_conditions', $before, $after, $echo); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -68,57 +68,57 @@ discard block |
||
68 | 68 | * @subpackage template-tag |
69 | 69 | * @category to-specials |
70 | 70 | */ |
71 | -function lsx_to_travel_dates( $before = '', $after = '', $echo = true ) { |
|
71 | +function lsx_to_travel_dates($before = '', $after = '', $echo = true) { |
|
72 | 72 | // --- START: [legacy] migrate content from old fields to new repeatable fields (grouped fields) |
73 | 73 | |
74 | - $start = get_post_meta( get_the_ID(), 'travel_dates_start', true ); |
|
75 | - $end = get_post_meta( get_the_ID(), 'travel_dates_end', true ); |
|
74 | + $start = get_post_meta(get_the_ID(), 'travel_dates_start', true); |
|
75 | + $end = get_post_meta(get_the_ID(), 'travel_dates_end', true); |
|
76 | 76 | |
77 | - if ( ! empty( $start ) && ! empty( $end ) ) { |
|
78 | - $start = date( 'M j, Y', strtotime( $start ) ); |
|
79 | - $end = date( 'M j, Y', strtotime( $end ) ); |
|
77 | + if ( ! empty($start) && ! empty($end)) { |
|
78 | + $start = date('M j, Y', strtotime($start)); |
|
79 | + $end = date('M j, Y', strtotime($end)); |
|
80 | 80 | |
81 | 81 | $new_field = array( |
82 | 82 | 'travel_dates_start' => $start, |
83 | 83 | 'travel_dates_end' => $end, |
84 | 84 | ); |
85 | 85 | |
86 | - delete_post_meta( get_the_ID(), 'travel_dates' ); |
|
87 | - update_post_meta( get_the_ID(), 'travel_dates', $new_field ); |
|
86 | + delete_post_meta(get_the_ID(), 'travel_dates'); |
|
87 | + update_post_meta(get_the_ID(), 'travel_dates', $new_field); |
|
88 | 88 | |
89 | - delete_post_meta( get_the_ID(), 'travel_dates_start' ); |
|
90 | - delete_post_meta( get_the_ID(), 'travel_dates_end' ); |
|
89 | + delete_post_meta(get_the_ID(), 'travel_dates_start'); |
|
90 | + delete_post_meta(get_the_ID(), 'travel_dates_end'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | // --- END: [legacy] migrate content from old fields to new repeatable fields (grouped fields) |
94 | 94 | |
95 | 95 | $return = ''; |
96 | 96 | $multiple = false; |
97 | - $dates = get_post_meta( get_the_ID(), 'travel_dates', false ); |
|
97 | + $dates = get_post_meta(get_the_ID(), 'travel_dates', false); |
|
98 | 98 | |
99 | - if ( is_array( $dates ) && ! empty( $dates ) ) { |
|
100 | - foreach ( $dates as $key => $value ) { |
|
99 | + if (is_array($dates) && ! empty($dates)) { |
|
100 | + foreach ($dates as $key => $value) { |
|
101 | 101 | $start = false; |
102 | 102 | $end = false; |
103 | 103 | |
104 | - if ( isset( $value['travel_dates_start'] ) ) { |
|
104 | + if (isset($value['travel_dates_start'])) { |
|
105 | 105 | $start = $value['travel_dates_start']; |
106 | 106 | } |
107 | 107 | |
108 | - if ( isset( $value['travel_dates_end'] ) ) { |
|
108 | + if (isset($value['travel_dates_end'])) { |
|
109 | 109 | $end = $value['travel_dates_end']; |
110 | 110 | } |
111 | 111 | |
112 | - if ( ! empty( $start ) ) { |
|
113 | - $start = date( 'd M Y', strtotime( $start ) ); |
|
112 | + if ( ! empty($start)) { |
|
113 | + $start = date('d M Y', strtotime($start)); |
|
114 | 114 | } |
115 | 115 | |
116 | - if ( ! empty( $end ) ) { |
|
117 | - $start .= ' - ' . date( 'd M Y', strtotime( $end ) ); |
|
116 | + if ( ! empty($end)) { |
|
117 | + $start .= ' - ' . date('d M Y', strtotime($end)); |
|
118 | 118 | } |
119 | 119 | |
120 | - if ( ! empty( $start ) ) { |
|
121 | - if ( ! empty( $return ) ) { |
|
120 | + if ( ! empty($start)) { |
|
121 | + if ( ! empty($return)) { |
|
122 | 122 | $multiple = true; |
123 | 123 | $return .= '<br>'; |
124 | 124 | } |
@@ -128,15 +128,15 @@ discard block |
||
128 | 128 | } |
129 | 129 | } |
130 | 130 | |
131 | - if ( ! empty( $return ) ) { |
|
132 | - if ( true === $multiple ) { |
|
131 | + if ( ! empty($return)) { |
|
132 | + if (true === $multiple) { |
|
133 | 133 | $return = '<br>' . $return; |
134 | 134 | } |
135 | 135 | |
136 | 136 | $return = $before . $return . $after; |
137 | 137 | |
138 | - if ( $echo ) { |
|
139 | - echo wp_kses_post( $return ); |
|
138 | + if ($echo) { |
|
139 | + echo wp_kses_post($return); |
|
140 | 140 | } else { |
141 | 141 | return $return; |
142 | 142 | } |
@@ -155,26 +155,26 @@ discard block |
||
155 | 155 | * @subpackage template-tag |
156 | 156 | * @category to-specials |
157 | 157 | */ |
158 | -function lsx_to_specials_validity( $before = '', $after = '', $echo = true ) { |
|
158 | +function lsx_to_specials_validity($before = '', $after = '', $echo = true) { |
|
159 | 159 | // $valid_from = get_the_date( 'M j, Y', get_the_ID() ); |
160 | 160 | // $valid_to = get_post_meta( get_the_ID(), '_expiration-date', true ); |
161 | 161 | |
162 | - $valid_from = get_post_meta( get_the_ID(), 'booking_validity_start', true ); |
|
163 | - $valid_to = get_post_meta( get_the_ID(), 'booking_validity_end', true ); |
|
162 | + $valid_from = get_post_meta(get_the_ID(), 'booking_validity_start', true); |
|
163 | + $valid_to = get_post_meta(get_the_ID(), 'booking_validity_end', true); |
|
164 | 164 | |
165 | - if ( ! empty( $valid_from ) ) { |
|
166 | - $valid_from = date( 'd M Y', strtotime( $valid_from ) ); |
|
165 | + if ( ! empty($valid_from)) { |
|
166 | + $valid_from = date('d M Y', strtotime($valid_from)); |
|
167 | 167 | } |
168 | 168 | |
169 | - if ( ! empty( $valid_to ) ) { |
|
170 | - $valid_from .= ' - ' . date( 'd M Y', strtotime( $valid_to ) ); |
|
169 | + if ( ! empty($valid_to)) { |
|
170 | + $valid_from .= ' - ' . date('d M Y', strtotime($valid_to)); |
|
171 | 171 | } |
172 | 172 | |
173 | - if ( ! empty( $valid_from ) ) { |
|
173 | + if ( ! empty($valid_from)) { |
|
174 | 174 | $return = $before . $valid_from . $after; |
175 | 175 | |
176 | - if ( $echo ) { |
|
177 | - echo wp_kses_post( $return ); |
|
176 | + if ($echo) { |
|
177 | + echo wp_kses_post($return); |
|
178 | 178 | } else { |
179 | 179 | return $return; |
180 | 180 | } |
@@ -191,16 +191,16 @@ discard block |
||
191 | 191 | function lsx_to_accommodation_specials() { |
192 | 192 | global $lsx_archive; |
193 | 193 | |
194 | - if ( post_type_exists( 'special' ) && is_singular( 'accommodation' ) ) { |
|
194 | + if (post_type_exists('special') && is_singular('accommodation')) { |
|
195 | 195 | $args = array( |
196 | 196 | 'from' => 'special', |
197 | 197 | 'to' => 'accommodation', |
198 | 198 | 'column' => '3', |
199 | - 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
199 | + 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __(lsx_to_get_post_type_section_title('special', '', 'Featured Specials'), 'to-specials') . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
200 | 200 | 'after' => '</div></div></section>', |
201 | 201 | ); |
202 | 202 | |
203 | - lsx_to_connected_panel_query( $args ); |
|
203 | + lsx_to_connected_panel_query($args); |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
@@ -214,16 +214,16 @@ discard block |
||
214 | 214 | function lsx_to_tour_specials() { |
215 | 215 | global $lsx_archive; |
216 | 216 | |
217 | - if ( post_type_exists( 'special' ) && is_singular( 'tour' ) ) { |
|
217 | + if (post_type_exists('special') && is_singular('tour')) { |
|
218 | 218 | $args = array( |
219 | 219 | 'from' => 'special', |
220 | 220 | 'to' => 'tour', |
221 | 221 | 'column' => '3', |
222 | - 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
222 | + 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __(lsx_to_get_post_type_section_title('special', '', 'Featured Specials'), 'to-specials') . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
223 | 223 | 'after' => '</div></div></section>', |
224 | 224 | ); |
225 | 225 | |
226 | - lsx_to_connected_panel_query( $args ); |
|
226 | + lsx_to_connected_panel_query($args); |
|
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
@@ -237,15 +237,15 @@ discard block |
||
237 | 237 | function lsx_to_destination_specials() { |
238 | 238 | global $lsx_archive; |
239 | 239 | |
240 | - if ( post_type_exists( 'special' ) && is_singular( 'destination' ) ) { |
|
240 | + if (post_type_exists('special') && is_singular('destination')) { |
|
241 | 241 | $args = array( |
242 | 242 | 'from' => 'special', |
243 | 243 | 'to' => 'destination', |
244 | 244 | 'column' => '3', |
245 | - 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
245 | + 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __(lsx_to_get_post_type_section_title('special', '', 'Featured Specials'), 'to-specials') . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
246 | 246 | 'after' => '</div></div></section>', |
247 | 247 | ); |
248 | 248 | |
249 | - lsx_to_connected_panel_query( $args ); |
|
249 | + lsx_to_connected_panel_query($args); |
|
250 | 250 | } |
251 | 251 | } |
@@ -14,19 +14,19 @@ discard block |
||
14 | 14 | * @category special |
15 | 15 | */ |
16 | 16 | if ( ! function_exists( 'lsx_to_special_posts' ) ) { |
17 | - function lsx_to_special_posts() { |
|
18 | - global $lsx_to_archive; |
|
19 | - |
|
20 | - $args = array( |
|
21 | - 'from' => 'post', |
|
22 | - 'to' => 'special', |
|
23 | - 'column' => '3', |
|
24 | - 'before' => '<section id="posts" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-posts">' . esc_html__( 'Featured Posts', 'to-specials' ) . '</h2><div id="collapse-posts" class="collapse in"><div class="collapse-inner">', |
|
25 | - 'after' => '</div></div></section>', |
|
26 | - ); |
|
27 | - |
|
28 | - lsx_to_connected_panel_query( $args ); |
|
29 | - } |
|
17 | + function lsx_to_special_posts() { |
|
18 | + global $lsx_to_archive; |
|
19 | + |
|
20 | + $args = array( |
|
21 | + 'from' => 'post', |
|
22 | + 'to' => 'special', |
|
23 | + 'column' => '3', |
|
24 | + 'before' => '<section id="posts" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-posts">' . esc_html__( 'Featured Posts', 'to-specials' ) . '</h2><div id="collapse-posts" class="collapse in"><div class="collapse-inner">', |
|
25 | + 'after' => '</div></div></section>', |
|
26 | + ); |
|
27 | + |
|
28 | + lsx_to_connected_panel_query( $args ); |
|
29 | + } |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @category to-specials |
38 | 38 | */ |
39 | 39 | function lsx_to_special_content( $slug, $name = null ) { |
40 | - do_action( 'lsx_special_content', $slug, $name ); |
|
40 | + do_action( 'lsx_special_content', $slug, $name ); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @category to-specials |
54 | 54 | */ |
55 | 55 | function lsx_to_specials_terms_conditions( $before = '', $after = '', $echo = true ) { |
56 | - lsx_to_custom_field_query( 'terms_conditions', $before, $after, $echo ); |
|
56 | + lsx_to_custom_field_query( 'terms_conditions', $before, $after, $echo ); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -69,78 +69,78 @@ discard block |
||
69 | 69 | * @category to-specials |
70 | 70 | */ |
71 | 71 | function lsx_to_travel_dates( $before = '', $after = '', $echo = true ) { |
72 | - // --- START: [legacy] migrate content from old fields to new repeatable fields (grouped fields) |
|
73 | - |
|
74 | - $start = get_post_meta( get_the_ID(), 'travel_dates_start', true ); |
|
75 | - $end = get_post_meta( get_the_ID(), 'travel_dates_end', true ); |
|
76 | - |
|
77 | - if ( ! empty( $start ) && ! empty( $end ) ) { |
|
78 | - $start = date( 'M j, Y', strtotime( $start ) ); |
|
79 | - $end = date( 'M j, Y', strtotime( $end ) ); |
|
80 | - |
|
81 | - $new_field = array( |
|
82 | - 'travel_dates_start' => $start, |
|
83 | - 'travel_dates_end' => $end, |
|
84 | - ); |
|
85 | - |
|
86 | - delete_post_meta( get_the_ID(), 'travel_dates' ); |
|
87 | - update_post_meta( get_the_ID(), 'travel_dates', $new_field ); |
|
88 | - |
|
89 | - delete_post_meta( get_the_ID(), 'travel_dates_start' ); |
|
90 | - delete_post_meta( get_the_ID(), 'travel_dates_end' ); |
|
91 | - } |
|
92 | - |
|
93 | - // --- END: [legacy] migrate content from old fields to new repeatable fields (grouped fields) |
|
94 | - |
|
95 | - $return = ''; |
|
96 | - $multiple = false; |
|
97 | - $dates = get_post_meta( get_the_ID(), 'travel_dates', false ); |
|
98 | - |
|
99 | - if ( is_array( $dates ) && ! empty( $dates ) ) { |
|
100 | - foreach ( $dates as $key => $value ) { |
|
101 | - $start = false; |
|
102 | - $end = false; |
|
103 | - |
|
104 | - if ( isset( $value['travel_dates_start'] ) ) { |
|
105 | - $start = $value['travel_dates_start']; |
|
106 | - } |
|
107 | - |
|
108 | - if ( isset( $value['travel_dates_end'] ) ) { |
|
109 | - $end = $value['travel_dates_end']; |
|
110 | - } |
|
111 | - |
|
112 | - if ( ! empty( $start ) ) { |
|
113 | - $start = date( 'd M Y', strtotime( $start ) ); |
|
114 | - } |
|
115 | - |
|
116 | - if ( ! empty( $end ) ) { |
|
117 | - $start .= ' - ' . date( 'd M Y', strtotime( $end ) ); |
|
118 | - } |
|
119 | - |
|
120 | - if ( ! empty( $start ) ) { |
|
121 | - if ( ! empty( $return ) ) { |
|
122 | - $multiple = true; |
|
123 | - $return .= '<br>'; |
|
124 | - } |
|
125 | - |
|
126 | - $return .= $start; |
|
127 | - } |
|
128 | - } |
|
129 | - } |
|
130 | - |
|
131 | - if ( ! empty( $return ) ) { |
|
132 | - if ( true === $multiple ) { |
|
133 | - $return = '<br>' . $return; |
|
134 | - } |
|
135 | - |
|
136 | - $return = $before . $return . $after; |
|
137 | - |
|
138 | - if ( $echo ) { |
|
139 | - echo wp_kses_post( $return ); |
|
140 | - } else { |
|
141 | - return $return; |
|
142 | - } |
|
143 | - } |
|
72 | + // --- START: [legacy] migrate content from old fields to new repeatable fields (grouped fields) |
|
73 | + |
|
74 | + $start = get_post_meta( get_the_ID(), 'travel_dates_start', true ); |
|
75 | + $end = get_post_meta( get_the_ID(), 'travel_dates_end', true ); |
|
76 | + |
|
77 | + if ( ! empty( $start ) && ! empty( $end ) ) { |
|
78 | + $start = date( 'M j, Y', strtotime( $start ) ); |
|
79 | + $end = date( 'M j, Y', strtotime( $end ) ); |
|
80 | + |
|
81 | + $new_field = array( |
|
82 | + 'travel_dates_start' => $start, |
|
83 | + 'travel_dates_end' => $end, |
|
84 | + ); |
|
85 | + |
|
86 | + delete_post_meta( get_the_ID(), 'travel_dates' ); |
|
87 | + update_post_meta( get_the_ID(), 'travel_dates', $new_field ); |
|
88 | + |
|
89 | + delete_post_meta( get_the_ID(), 'travel_dates_start' ); |
|
90 | + delete_post_meta( get_the_ID(), 'travel_dates_end' ); |
|
91 | + } |
|
92 | + |
|
93 | + // --- END: [legacy] migrate content from old fields to new repeatable fields (grouped fields) |
|
94 | + |
|
95 | + $return = ''; |
|
96 | + $multiple = false; |
|
97 | + $dates = get_post_meta( get_the_ID(), 'travel_dates', false ); |
|
98 | + |
|
99 | + if ( is_array( $dates ) && ! empty( $dates ) ) { |
|
100 | + foreach ( $dates as $key => $value ) { |
|
101 | + $start = false; |
|
102 | + $end = false; |
|
103 | + |
|
104 | + if ( isset( $value['travel_dates_start'] ) ) { |
|
105 | + $start = $value['travel_dates_start']; |
|
106 | + } |
|
107 | + |
|
108 | + if ( isset( $value['travel_dates_end'] ) ) { |
|
109 | + $end = $value['travel_dates_end']; |
|
110 | + } |
|
111 | + |
|
112 | + if ( ! empty( $start ) ) { |
|
113 | + $start = date( 'd M Y', strtotime( $start ) ); |
|
114 | + } |
|
115 | + |
|
116 | + if ( ! empty( $end ) ) { |
|
117 | + $start .= ' - ' . date( 'd M Y', strtotime( $end ) ); |
|
118 | + } |
|
119 | + |
|
120 | + if ( ! empty( $start ) ) { |
|
121 | + if ( ! empty( $return ) ) { |
|
122 | + $multiple = true; |
|
123 | + $return .= '<br>'; |
|
124 | + } |
|
125 | + |
|
126 | + $return .= $start; |
|
127 | + } |
|
128 | + } |
|
129 | + } |
|
130 | + |
|
131 | + if ( ! empty( $return ) ) { |
|
132 | + if ( true === $multiple ) { |
|
133 | + $return = '<br>' . $return; |
|
134 | + } |
|
135 | + |
|
136 | + $return = $before . $return . $after; |
|
137 | + |
|
138 | + if ( $echo ) { |
|
139 | + echo wp_kses_post( $return ); |
|
140 | + } else { |
|
141 | + return $return; |
|
142 | + } |
|
143 | + } |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -156,29 +156,29 @@ discard block |
||
156 | 156 | * @category to-specials |
157 | 157 | */ |
158 | 158 | function lsx_to_specials_validity( $before = '', $after = '', $echo = true ) { |
159 | - // $valid_from = get_the_date( 'M j, Y', get_the_ID() ); |
|
160 | - // $valid_to = get_post_meta( get_the_ID(), '_expiration-date', true ); |
|
159 | + // $valid_from = get_the_date( 'M j, Y', get_the_ID() ); |
|
160 | + // $valid_to = get_post_meta( get_the_ID(), '_expiration-date', true ); |
|
161 | 161 | |
162 | - $valid_from = get_post_meta( get_the_ID(), 'booking_validity_start', true ); |
|
163 | - $valid_to = get_post_meta( get_the_ID(), 'booking_validity_end', true ); |
|
162 | + $valid_from = get_post_meta( get_the_ID(), 'booking_validity_start', true ); |
|
163 | + $valid_to = get_post_meta( get_the_ID(), 'booking_validity_end', true ); |
|
164 | 164 | |
165 | - if ( ! empty( $valid_from ) ) { |
|
166 | - $valid_from = date( 'd M Y', strtotime( $valid_from ) ); |
|
167 | - } |
|
165 | + if ( ! empty( $valid_from ) ) { |
|
166 | + $valid_from = date( 'd M Y', strtotime( $valid_from ) ); |
|
167 | + } |
|
168 | 168 | |
169 | - if ( ! empty( $valid_to ) ) { |
|
170 | - $valid_from .= ' - ' . date( 'd M Y', strtotime( $valid_to ) ); |
|
171 | - } |
|
169 | + if ( ! empty( $valid_to ) ) { |
|
170 | + $valid_from .= ' - ' . date( 'd M Y', strtotime( $valid_to ) ); |
|
171 | + } |
|
172 | 172 | |
173 | - if ( ! empty( $valid_from ) ) { |
|
174 | - $return = $before . $valid_from . $after; |
|
173 | + if ( ! empty( $valid_from ) ) { |
|
174 | + $return = $before . $valid_from . $after; |
|
175 | 175 | |
176 | - if ( $echo ) { |
|
177 | - echo wp_kses_post( $return ); |
|
178 | - } else { |
|
179 | - return $return; |
|
180 | - } |
|
181 | - } |
|
176 | + if ( $echo ) { |
|
177 | + echo wp_kses_post( $return ); |
|
178 | + } else { |
|
179 | + return $return; |
|
180 | + } |
|
181 | + } |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -189,19 +189,19 @@ discard block |
||
189 | 189 | * @category special |
190 | 190 | */ |
191 | 191 | function lsx_to_accommodation_specials() { |
192 | - global $lsx_archive; |
|
193 | - |
|
194 | - if ( post_type_exists( 'special' ) && is_singular( 'accommodation' ) ) { |
|
195 | - $args = array( |
|
196 | - 'from' => 'special', |
|
197 | - 'to' => 'accommodation', |
|
198 | - 'column' => '3', |
|
199 | - 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
200 | - 'after' => '</div></div></section>', |
|
201 | - ); |
|
202 | - |
|
203 | - lsx_to_connected_panel_query( $args ); |
|
204 | - } |
|
192 | + global $lsx_archive; |
|
193 | + |
|
194 | + if ( post_type_exists( 'special' ) && is_singular( 'accommodation' ) ) { |
|
195 | + $args = array( |
|
196 | + 'from' => 'special', |
|
197 | + 'to' => 'accommodation', |
|
198 | + 'column' => '3', |
|
199 | + 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
200 | + 'after' => '</div></div></section>', |
|
201 | + ); |
|
202 | + |
|
203 | + lsx_to_connected_panel_query( $args ); |
|
204 | + } |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
@@ -212,19 +212,19 @@ discard block |
||
212 | 212 | * @category special |
213 | 213 | */ |
214 | 214 | function lsx_to_tour_specials() { |
215 | - global $lsx_archive; |
|
216 | - |
|
217 | - if ( post_type_exists( 'special' ) && is_singular( 'tour' ) ) { |
|
218 | - $args = array( |
|
219 | - 'from' => 'special', |
|
220 | - 'to' => 'tour', |
|
221 | - 'column' => '3', |
|
222 | - 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
223 | - 'after' => '</div></div></section>', |
|
224 | - ); |
|
225 | - |
|
226 | - lsx_to_connected_panel_query( $args ); |
|
227 | - } |
|
215 | + global $lsx_archive; |
|
216 | + |
|
217 | + if ( post_type_exists( 'special' ) && is_singular( 'tour' ) ) { |
|
218 | + $args = array( |
|
219 | + 'from' => 'special', |
|
220 | + 'to' => 'tour', |
|
221 | + 'column' => '3', |
|
222 | + 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
223 | + 'after' => '</div></div></section>', |
|
224 | + ); |
|
225 | + |
|
226 | + lsx_to_connected_panel_query( $args ); |
|
227 | + } |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
@@ -235,17 +235,17 @@ discard block |
||
235 | 235 | * @category special |
236 | 236 | */ |
237 | 237 | function lsx_to_destination_specials() { |
238 | - global $lsx_archive; |
|
239 | - |
|
240 | - if ( post_type_exists( 'special' ) && is_singular( 'destination' ) ) { |
|
241 | - $args = array( |
|
242 | - 'from' => 'special', |
|
243 | - 'to' => 'destination', |
|
244 | - 'column' => '3', |
|
245 | - 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
246 | - 'after' => '</div></div></section>', |
|
247 | - ); |
|
248 | - |
|
249 | - lsx_to_connected_panel_query( $args ); |
|
250 | - } |
|
238 | + global $lsx_archive; |
|
239 | + |
|
240 | + if ( post_type_exists( 'special' ) && is_singular( 'destination' ) ) { |
|
241 | + $args = array( |
|
242 | + 'from' => 'special', |
|
243 | + 'to' => 'destination', |
|
244 | + 'column' => '3', |
|
245 | + 'before' => '<section id="special" class="lsx-to-section lsx-to-collapse-section"><h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title" data-toggle="collapse" data-target="#collapse-special">' . __( lsx_to_get_post_type_section_title( 'special', '', 'Featured Specials' ), 'to-specials' ) . '</h2><div id="collapse-special" class="collapse in"><div class="collapse-inner">', |
|
246 | + 'after' => '</div></div></section>', |
|
247 | + ); |
|
248 | + |
|
249 | + lsx_to_connected_panel_query( $args ); |
|
250 | + } |
|
251 | 251 | } |
@@ -10,44 +10,44 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | $metabox = array( |
13 | - 'title' => esc_html__( 'Tour Operator Plugin', 'to-specials' ), |
|
13 | + 'title' => esc_html__('Tour Operator Plugin', 'to-specials'), |
|
14 | 14 | 'pages' => 'special', |
15 | 15 | 'fields' => array(), |
16 | 16 | ); |
17 | 17 | |
18 | 18 | $metabox['fields'][] = array( |
19 | 19 | 'id' => 'featured', |
20 | - 'name' => esc_html__( 'Featured', 'to-specials' ), |
|
20 | + 'name' => esc_html__('Featured', 'to-specials'), |
|
21 | 21 | 'type' => 'checkbox', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | $metabox['fields'][] = array( |
25 | 25 | 'id' => 'disable_single', |
26 | - 'name' => esc_html__( 'Disable Single', 'to-specials' ), |
|
26 | + 'name' => esc_html__('Disable Single', 'to-specials'), |
|
27 | 27 | 'type' => 'checkbox', |
28 | 28 | ); |
29 | 29 | |
30 | -if ( ! class_exists( 'LSX_Banners' ) ) { |
|
30 | +if ( ! class_exists('LSX_Banners')) { |
|
31 | 31 | $metabox['fields'][] = array( |
32 | 32 | 'id' => 'tagline', |
33 | - 'name' => esc_html__( 'Tagline', 'to-specials' ), |
|
33 | + 'name' => esc_html__('Tagline', 'to-specials'), |
|
34 | 34 | 'type' => 'text', |
35 | 35 | ); |
36 | 36 | } |
37 | 37 | |
38 | 38 | $metabox['fields'][] = array( |
39 | 39 | 'id' => 'terms_conditions', |
40 | - 'name' => esc_html__( 'Terms & Conditions','to-specials' ), |
|
40 | + 'name' => esc_html__('Terms & Conditions', 'to-specials'), |
|
41 | 41 | 'type' => 'wysiwyg', |
42 | 42 | 'options' => array( |
43 | 43 | 'editor_height' => '100', |
44 | 44 | ), |
45 | 45 | ); |
46 | 46 | |
47 | -if ( class_exists( 'LSX_TO_Team' ) ) { |
|
47 | +if (class_exists('LSX_TO_Team')) { |
|
48 | 48 | $metabox['fields'][] = array( |
49 | 49 | 'id' => 'team_to_special', |
50 | - 'name' => esc_html__( 'Team Member', 'to-specials' ), |
|
50 | + 'name' => esc_html__('Team Member', 'to-specials'), |
|
51 | 51 | 'type' => 'post_select', |
52 | 52 | 'use_ajax' => false, |
53 | 53 | 'allow_none' => true, |
@@ -63,92 +63,92 @@ discard block |
||
63 | 63 | |
64 | 64 | $metabox['fields'][] = array( |
65 | 65 | 'id' => 'booking_title', |
66 | - 'name' => esc_html__( 'Booking','to-specials' ), |
|
66 | + 'name' => esc_html__('Booking', 'to-specials'), |
|
67 | 67 | 'type' => 'title', |
68 | 68 | ); |
69 | 69 | |
70 | 70 | $metabox['fields'][] = array( |
71 | 71 | 'id' => 'price', |
72 | - 'name' => esc_html__( 'Price','to-specials' ), |
|
72 | + 'name' => esc_html__('Price', 'to-specials'), |
|
73 | 73 | 'type' => 'text', |
74 | 74 | ); |
75 | 75 | |
76 | 76 | $metabox['fields'][] = array( |
77 | 77 | 'id' => 'price_type', |
78 | - 'name' => esc_html__( 'Price Type','to-specials' ), |
|
78 | + 'name' => esc_html__('Price Type', 'to-specials'), |
|
79 | 79 | 'type' => 'select', |
80 | 80 | 'options' => array( |
81 | - 'none' => esc_html__( 'Select a type','to-specials' ), |
|
82 | - 'per_person' => esc_html__( 'Per Person','to-specials' ), |
|
83 | - 'per_person_per_night' => esc_html__( 'Per Person Per Night','to-specials' ), |
|
84 | - 'per_person_sharing' => esc_html__( 'Per Person Sharing','to-specials' ), |
|
85 | - 'per_person_sharing_per_night' => esc_html__( 'Per Person Sharing Per Night','to-specials' ), |
|
86 | - 'total_percentage' => esc_html__( 'Percentage Off Your Price.','to-specials' ), |
|
81 | + 'none' => esc_html__('Select a type', 'to-specials'), |
|
82 | + 'per_person' => esc_html__('Per Person', 'to-specials'), |
|
83 | + 'per_person_per_night' => esc_html__('Per Person Per Night', 'to-specials'), |
|
84 | + 'per_person_sharing' => esc_html__('Per Person Sharing', 'to-specials'), |
|
85 | + 'per_person_sharing_per_night' => esc_html__('Per Person Sharing Per Night', 'to-specials'), |
|
86 | + 'total_percentage' => esc_html__('Percentage Off Your Price.', 'to-specials'), |
|
87 | 87 | ), |
88 | 88 | ); |
89 | 89 | |
90 | 90 | $metabox['fields'][] = array( |
91 | 91 | 'id' => 'duration', |
92 | - 'name' => esc_html__( 'Duration','to-specials' ), |
|
92 | + 'name' => esc_html__('Duration', 'to-specials'), |
|
93 | 93 | 'type' => 'text', |
94 | 94 | ); |
95 | 95 | |
96 | 96 | $metabox['fields'][] = array( |
97 | 97 | 'id' => 'booking_validity_start', |
98 | - 'name' => esc_html__( 'Booking Validity (start)','to-specials' ), |
|
98 | + 'name' => esc_html__('Booking Validity (start)', 'to-specials'), |
|
99 | 99 | 'type' => 'date', |
100 | 100 | ); |
101 | 101 | |
102 | 102 | $metabox['fields'][] = array( |
103 | 103 | 'id' => 'booking_validity_end', |
104 | - 'name' => esc_html__( 'Booking Validity (end)','to-specials' ), |
|
104 | + 'name' => esc_html__('Booking Validity (end)', 'to-specials'), |
|
105 | 105 | 'type' => 'date', |
106 | 106 | ); |
107 | 107 | |
108 | 108 | $metabox['fields'][] = array( |
109 | 109 | 'id' => 'expire_post', |
110 | - 'name' => esc_html__( 'Expire this special automatically', 'to-specials' ), |
|
110 | + 'name' => esc_html__('Expire this special automatically', 'to-specials'), |
|
111 | 111 | 'type' => 'checkbox', |
112 | 112 | ); |
113 | 113 | |
114 | 114 | $metabox['fields'][] = array( |
115 | 115 | 'id' => 'travel_dates', |
116 | 116 | 'name' => '', |
117 | - 'single_name' => esc_html__( 'Travel Dates','to-specials' ), |
|
117 | + 'single_name' => esc_html__('Travel Dates', 'to-specials'), |
|
118 | 118 | 'type' => 'group', |
119 | 119 | 'repeatable' => true, |
120 | 120 | 'sortable' => true, |
121 | 121 | 'fields' => array( |
122 | 122 | array( |
123 | 123 | 'id' => 'travel_dates_start', |
124 | - 'name' => esc_html__( 'Start','to-specials' ), |
|
124 | + 'name' => esc_html__('Start', 'to-specials'), |
|
125 | 125 | 'type' => 'date', |
126 | 126 | ), |
127 | 127 | array( |
128 | 128 | 'id' => 'travel_dates_end', |
129 | - 'name' => esc_html__( 'End','to-specials' ), |
|
129 | + 'name' => esc_html__('End', 'to-specials'), |
|
130 | 130 | 'type' => 'date', |
131 | 131 | ), |
132 | 132 | ), |
133 | 133 | ); |
134 | 134 | |
135 | -if ( class_exists( 'LSX_TO_Maps' ) ) { |
|
135 | +if (class_exists('LSX_TO_Maps')) { |
|
136 | 136 | $tour_operator = tour_operator(); |
137 | 137 | $api_key = false; |
138 | 138 | |
139 | - if ( isset( $tour_operator->options['api']['googlemaps_key'] ) ) { |
|
139 | + if (isset($tour_operator->options['api']['googlemaps_key'])) { |
|
140 | 140 | $api_key = $tour_operator->options['api']['googlemaps_key']; |
141 | 141 | } |
142 | 142 | |
143 | 143 | $metabox['fields'][] = array( |
144 | 144 | 'id' => 'location_title', |
145 | - 'name' => esc_html__( 'Location', 'to-specials' ), |
|
145 | + 'name' => esc_html__('Location', 'to-specials'), |
|
146 | 146 | 'type' => 'title', |
147 | 147 | ); |
148 | 148 | |
149 | 149 | $metabox['fields'][] = array( |
150 | 150 | 'id' => 'location', |
151 | - 'name' => esc_html__( 'Location', 'to-specials' ), |
|
151 | + 'name' => esc_html__('Location', 'to-specials'), |
|
152 | 152 | 'type' => 'gmap', |
153 | 153 | 'google_api_key' => $api_key, |
154 | 154 | ); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | $metabox['fields'][] = array( |
158 | 158 | 'id' => 'gallery_title', |
159 | - 'name' => esc_html__( 'Gallery', 'to-specials' ), |
|
159 | + 'name' => esc_html__('Gallery', 'to-specials'), |
|
160 | 160 | 'type' => 'title', |
161 | 161 | ); |
162 | 162 | |
@@ -167,19 +167,19 @@ discard block |
||
167 | 167 | 'repeatable' => true, |
168 | 168 | 'show_size' => false, |
169 | 169 | 'sortable' => true, |
170 | - 'string-repeat-field' => esc_html__( 'Add new image', 'tour-operator' ), |
|
170 | + 'string-repeat-field' => esc_html__('Add new image', 'tour-operator'), |
|
171 | 171 | ); |
172 | 172 | |
173 | -if ( class_exists( 'Envira_Gallery' ) ) { |
|
173 | +if (class_exists('Envira_Gallery')) { |
|
174 | 174 | $metabox['fields'][] = array( |
175 | 175 | 'id' => 'envira_title', |
176 | - 'name' => esc_html__( 'Envira Gallery', 'to-specials' ), |
|
176 | + 'name' => esc_html__('Envira Gallery', 'to-specials'), |
|
177 | 177 | 'type' => 'title', |
178 | 178 | ); |
179 | 179 | |
180 | 180 | $metabox['fields'][] = array( |
181 | 181 | 'id' => 'envira_gallery', |
182 | - 'name' => esc_html__( 'Envira Gallery', 'to-specials' ), |
|
182 | + 'name' => esc_html__('Envira Gallery', 'to-specials'), |
|
183 | 183 | 'type' => 'post_select', |
184 | 184 | 'use_ajax' => false, |
185 | 185 | 'allow_none' => true, |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | ), |
193 | 193 | ); |
194 | 194 | |
195 | - if ( class_exists( 'Envira_Videos' ) ) { |
|
195 | + if (class_exists('Envira_Videos')) { |
|
196 | 196 | $metabox['fields'][] = array( |
197 | 197 | 'id' => 'envira_video', |
198 | - 'name' => esc_html__( 'Envira Video Gallery', 'to-specials' ), |
|
198 | + 'name' => esc_html__('Envira Video Gallery', 'to-specials'), |
|
199 | 199 | 'type' => 'post_select', |
200 | 200 | 'use_ajax' => false, |
201 | 201 | 'allow_none' => true, |
@@ -211,13 +211,13 @@ discard block |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | $post_types = array( |
214 | - 'post' => esc_html__( 'Posts', 'to-specials' ), |
|
215 | - 'accommodation' => esc_html__( 'Accommodation', 'to-specials' ), |
|
216 | - 'destination' => esc_html__( 'Destinations', 'to-specials' ), |
|
217 | - 'tour' => esc_html__( 'Tours', 'to-specials' ), |
|
214 | + 'post' => esc_html__('Posts', 'to-specials'), |
|
215 | + 'accommodation' => esc_html__('Accommodation', 'to-specials'), |
|
216 | + 'destination' => esc_html__('Destinations', 'to-specials'), |
|
217 | + 'tour' => esc_html__('Tours', 'to-specials'), |
|
218 | 218 | ); |
219 | 219 | |
220 | -foreach ( $post_types as $slug => $label ) { |
|
220 | +foreach ($post_types as $slug => $label) { |
|
221 | 221 | $metabox['fields'][] = array( |
222 | 222 | 'id' => $slug . '_title', |
223 | 223 | 'name' => $label, |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | $metabox['fields'][] = array( |
228 | 228 | 'id' => $slug . '_to_special', |
229 | - 'name' => $label . esc_html__( ' related with this special', 'to-specials' ), |
|
229 | + 'name' => $label . esc_html__(' related with this special', 'to-specials'), |
|
230 | 230 | 'type' => 'post_select', |
231 | 231 | 'use_ajax' => false, |
232 | 232 | 'repeatable' => true, |
@@ -241,6 +241,6 @@ discard block |
||
241 | 241 | ); |
242 | 242 | } |
243 | 243 | |
244 | -$metabox['fields'] = apply_filters( 'lsx_to_special_custom_fields', $metabox['fields'] ); |
|
244 | +$metabox['fields'] = apply_filters('lsx_to_special_custom_fields', $metabox['fields']); |
|
245 | 245 | |
246 | 246 | return $metabox; |
@@ -10,235 +10,235 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | $metabox = array( |
13 | - 'title' => esc_html__( 'Tour Operator Plugin', 'to-specials' ), |
|
14 | - 'pages' => 'special', |
|
15 | - 'fields' => array(), |
|
13 | + 'title' => esc_html__( 'Tour Operator Plugin', 'to-specials' ), |
|
14 | + 'pages' => 'special', |
|
15 | + 'fields' => array(), |
|
16 | 16 | ); |
17 | 17 | |
18 | 18 | $metabox['fields'][] = array( |
19 | - 'id' => 'featured', |
|
20 | - 'name' => esc_html__( 'Featured', 'to-specials' ), |
|
21 | - 'type' => 'checkbox', |
|
19 | + 'id' => 'featured', |
|
20 | + 'name' => esc_html__( 'Featured', 'to-specials' ), |
|
21 | + 'type' => 'checkbox', |
|
22 | 22 | ); |
23 | 23 | |
24 | 24 | $metabox['fields'][] = array( |
25 | - 'id' => 'disable_single', |
|
26 | - 'name' => esc_html__( 'Disable Single', 'to-specials' ), |
|
27 | - 'type' => 'checkbox', |
|
25 | + 'id' => 'disable_single', |
|
26 | + 'name' => esc_html__( 'Disable Single', 'to-specials' ), |
|
27 | + 'type' => 'checkbox', |
|
28 | 28 | ); |
29 | 29 | |
30 | 30 | if ( ! class_exists( 'LSX_Banners' ) ) { |
31 | - $metabox['fields'][] = array( |
|
32 | - 'id' => 'tagline', |
|
33 | - 'name' => esc_html__( 'Tagline', 'to-specials' ), |
|
34 | - 'type' => 'text', |
|
35 | - ); |
|
31 | + $metabox['fields'][] = array( |
|
32 | + 'id' => 'tagline', |
|
33 | + 'name' => esc_html__( 'Tagline', 'to-specials' ), |
|
34 | + 'type' => 'text', |
|
35 | + ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $metabox['fields'][] = array( |
39 | - 'id' => 'terms_conditions', |
|
40 | - 'name' => esc_html__( 'Terms & Conditions','to-specials' ), |
|
41 | - 'type' => 'wysiwyg', |
|
42 | - 'options' => array( |
|
43 | - 'editor_height' => '100', |
|
44 | - ), |
|
39 | + 'id' => 'terms_conditions', |
|
40 | + 'name' => esc_html__( 'Terms & Conditions','to-specials' ), |
|
41 | + 'type' => 'wysiwyg', |
|
42 | + 'options' => array( |
|
43 | + 'editor_height' => '100', |
|
44 | + ), |
|
45 | 45 | ); |
46 | 46 | |
47 | 47 | if ( class_exists( 'LSX_TO_Team' ) ) { |
48 | - $metabox['fields'][] = array( |
|
49 | - 'id' => 'team_to_special', |
|
50 | - 'name' => esc_html__( 'Team Member', 'to-specials' ), |
|
51 | - 'type' => 'post_select', |
|
52 | - 'use_ajax' => false, |
|
53 | - 'allow_none' => true, |
|
54 | - 'query' => array( |
|
55 | - 'post_type' => 'team', |
|
56 | - 'nopagin' => true, |
|
57 | - 'posts_per_page' => 1000, |
|
58 | - 'orderby' => 'title', |
|
59 | - 'order' => 'ASC', |
|
60 | - ), |
|
61 | - ); |
|
48 | + $metabox['fields'][] = array( |
|
49 | + 'id' => 'team_to_special', |
|
50 | + 'name' => esc_html__( 'Team Member', 'to-specials' ), |
|
51 | + 'type' => 'post_select', |
|
52 | + 'use_ajax' => false, |
|
53 | + 'allow_none' => true, |
|
54 | + 'query' => array( |
|
55 | + 'post_type' => 'team', |
|
56 | + 'nopagin' => true, |
|
57 | + 'posts_per_page' => 1000, |
|
58 | + 'orderby' => 'title', |
|
59 | + 'order' => 'ASC', |
|
60 | + ), |
|
61 | + ); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $metabox['fields'][] = array( |
65 | - 'id' => 'booking_title', |
|
66 | - 'name' => esc_html__( 'Booking','to-specials' ), |
|
67 | - 'type' => 'title', |
|
65 | + 'id' => 'booking_title', |
|
66 | + 'name' => esc_html__( 'Booking','to-specials' ), |
|
67 | + 'type' => 'title', |
|
68 | 68 | ); |
69 | 69 | |
70 | 70 | $metabox['fields'][] = array( |
71 | - 'id' => 'price', |
|
72 | - 'name' => esc_html__( 'Price','to-specials' ), |
|
73 | - 'type' => 'text', |
|
71 | + 'id' => 'price', |
|
72 | + 'name' => esc_html__( 'Price','to-specials' ), |
|
73 | + 'type' => 'text', |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | $metabox['fields'][] = array( |
77 | - 'id' => 'price_type', |
|
78 | - 'name' => esc_html__( 'Price Type','to-specials' ), |
|
79 | - 'type' => 'select', |
|
80 | - 'options' => array( |
|
81 | - 'none' => esc_html__( 'Select a type','to-specials' ), |
|
82 | - 'per_person' => esc_html__( 'Per Person','to-specials' ), |
|
83 | - 'per_person_per_night' => esc_html__( 'Per Person Per Night','to-specials' ), |
|
84 | - 'per_person_sharing' => esc_html__( 'Per Person Sharing','to-specials' ), |
|
85 | - 'per_person_sharing_per_night' => esc_html__( 'Per Person Sharing Per Night','to-specials' ), |
|
86 | - 'total_percentage' => esc_html__( 'Percentage Off Your Price.','to-specials' ), |
|
87 | - ), |
|
77 | + 'id' => 'price_type', |
|
78 | + 'name' => esc_html__( 'Price Type','to-specials' ), |
|
79 | + 'type' => 'select', |
|
80 | + 'options' => array( |
|
81 | + 'none' => esc_html__( 'Select a type','to-specials' ), |
|
82 | + 'per_person' => esc_html__( 'Per Person','to-specials' ), |
|
83 | + 'per_person_per_night' => esc_html__( 'Per Person Per Night','to-specials' ), |
|
84 | + 'per_person_sharing' => esc_html__( 'Per Person Sharing','to-specials' ), |
|
85 | + 'per_person_sharing_per_night' => esc_html__( 'Per Person Sharing Per Night','to-specials' ), |
|
86 | + 'total_percentage' => esc_html__( 'Percentage Off Your Price.','to-specials' ), |
|
87 | + ), |
|
88 | 88 | ); |
89 | 89 | |
90 | 90 | $metabox['fields'][] = array( |
91 | - 'id' => 'duration', |
|
92 | - 'name' => esc_html__( 'Duration','to-specials' ), |
|
93 | - 'type' => 'text', |
|
91 | + 'id' => 'duration', |
|
92 | + 'name' => esc_html__( 'Duration','to-specials' ), |
|
93 | + 'type' => 'text', |
|
94 | 94 | ); |
95 | 95 | |
96 | 96 | $metabox['fields'][] = array( |
97 | - 'id' => 'booking_validity_start', |
|
98 | - 'name' => esc_html__( 'Booking Validity (start)','to-specials' ), |
|
99 | - 'type' => 'date', |
|
97 | + 'id' => 'booking_validity_start', |
|
98 | + 'name' => esc_html__( 'Booking Validity (start)','to-specials' ), |
|
99 | + 'type' => 'date', |
|
100 | 100 | ); |
101 | 101 | |
102 | 102 | $metabox['fields'][] = array( |
103 | - 'id' => 'booking_validity_end', |
|
104 | - 'name' => esc_html__( 'Booking Validity (end)','to-specials' ), |
|
105 | - 'type' => 'date', |
|
103 | + 'id' => 'booking_validity_end', |
|
104 | + 'name' => esc_html__( 'Booking Validity (end)','to-specials' ), |
|
105 | + 'type' => 'date', |
|
106 | 106 | ); |
107 | 107 | |
108 | 108 | $metabox['fields'][] = array( |
109 | - 'id' => 'expire_post', |
|
110 | - 'name' => esc_html__( 'Expire this special automatically', 'to-specials' ), |
|
111 | - 'type' => 'checkbox', |
|
109 | + 'id' => 'expire_post', |
|
110 | + 'name' => esc_html__( 'Expire this special automatically', 'to-specials' ), |
|
111 | + 'type' => 'checkbox', |
|
112 | 112 | ); |
113 | 113 | |
114 | 114 | $metabox['fields'][] = array( |
115 | - 'id' => 'travel_dates', |
|
116 | - 'name' => '', |
|
117 | - 'single_name' => esc_html__( 'Travel Dates','to-specials' ), |
|
118 | - 'type' => 'group', |
|
119 | - 'repeatable' => true, |
|
120 | - 'sortable' => true, |
|
121 | - 'fields' => array( |
|
122 | - array( |
|
123 | - 'id' => 'travel_dates_start', |
|
124 | - 'name' => esc_html__( 'Start','to-specials' ), |
|
125 | - 'type' => 'date', |
|
126 | - ), |
|
127 | - array( |
|
128 | - 'id' => 'travel_dates_end', |
|
129 | - 'name' => esc_html__( 'End','to-specials' ), |
|
130 | - 'type' => 'date', |
|
131 | - ), |
|
132 | - ), |
|
115 | + 'id' => 'travel_dates', |
|
116 | + 'name' => '', |
|
117 | + 'single_name' => esc_html__( 'Travel Dates','to-specials' ), |
|
118 | + 'type' => 'group', |
|
119 | + 'repeatable' => true, |
|
120 | + 'sortable' => true, |
|
121 | + 'fields' => array( |
|
122 | + array( |
|
123 | + 'id' => 'travel_dates_start', |
|
124 | + 'name' => esc_html__( 'Start','to-specials' ), |
|
125 | + 'type' => 'date', |
|
126 | + ), |
|
127 | + array( |
|
128 | + 'id' => 'travel_dates_end', |
|
129 | + 'name' => esc_html__( 'End','to-specials' ), |
|
130 | + 'type' => 'date', |
|
131 | + ), |
|
132 | + ), |
|
133 | 133 | ); |
134 | 134 | |
135 | 135 | if ( class_exists( 'LSX_TO_Maps' ) ) { |
136 | - $tour_operator = tour_operator(); |
|
137 | - $api_key = false; |
|
138 | - |
|
139 | - if ( isset( $tour_operator->options['api']['googlemaps_key'] ) ) { |
|
140 | - $api_key = $tour_operator->options['api']['googlemaps_key']; |
|
141 | - } |
|
142 | - |
|
143 | - $metabox['fields'][] = array( |
|
144 | - 'id' => 'location_title', |
|
145 | - 'name' => esc_html__( 'Location', 'to-specials' ), |
|
146 | - 'type' => 'title', |
|
147 | - ); |
|
148 | - |
|
149 | - $metabox['fields'][] = array( |
|
150 | - 'id' => 'location', |
|
151 | - 'name' => esc_html__( 'Location', 'to-specials' ), |
|
152 | - 'type' => 'gmap', |
|
153 | - 'google_api_key' => $api_key, |
|
154 | - ); |
|
136 | + $tour_operator = tour_operator(); |
|
137 | + $api_key = false; |
|
138 | + |
|
139 | + if ( isset( $tour_operator->options['api']['googlemaps_key'] ) ) { |
|
140 | + $api_key = $tour_operator->options['api']['googlemaps_key']; |
|
141 | + } |
|
142 | + |
|
143 | + $metabox['fields'][] = array( |
|
144 | + 'id' => 'location_title', |
|
145 | + 'name' => esc_html__( 'Location', 'to-specials' ), |
|
146 | + 'type' => 'title', |
|
147 | + ); |
|
148 | + |
|
149 | + $metabox['fields'][] = array( |
|
150 | + 'id' => 'location', |
|
151 | + 'name' => esc_html__( 'Location', 'to-specials' ), |
|
152 | + 'type' => 'gmap', |
|
153 | + 'google_api_key' => $api_key, |
|
154 | + ); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | $metabox['fields'][] = array( |
158 | - 'id' => 'gallery_title', |
|
159 | - 'name' => esc_html__( 'Gallery', 'to-specials' ), |
|
160 | - 'type' => 'title', |
|
158 | + 'id' => 'gallery_title', |
|
159 | + 'name' => esc_html__( 'Gallery', 'to-specials' ), |
|
160 | + 'type' => 'title', |
|
161 | 161 | ); |
162 | 162 | |
163 | 163 | $metabox['fields'][] = array( |
164 | - 'id' => 'gallery', |
|
165 | - 'name' => '', |
|
166 | - 'type' => 'image', |
|
167 | - 'repeatable' => true, |
|
168 | - 'show_size' => false, |
|
169 | - 'sortable' => true, |
|
170 | - 'string-repeat-field' => esc_html__( 'Add new image', 'tour-operator' ), |
|
164 | + 'id' => 'gallery', |
|
165 | + 'name' => '', |
|
166 | + 'type' => 'image', |
|
167 | + 'repeatable' => true, |
|
168 | + 'show_size' => false, |
|
169 | + 'sortable' => true, |
|
170 | + 'string-repeat-field' => esc_html__( 'Add new image', 'tour-operator' ), |
|
171 | 171 | ); |
172 | 172 | |
173 | 173 | if ( class_exists( 'Envira_Gallery' ) ) { |
174 | - $metabox['fields'][] = array( |
|
175 | - 'id' => 'envira_title', |
|
176 | - 'name' => esc_html__( 'Envira Gallery', 'to-specials' ), |
|
177 | - 'type' => 'title', |
|
178 | - ); |
|
179 | - |
|
180 | - $metabox['fields'][] = array( |
|
181 | - 'id' => 'envira_gallery', |
|
182 | - 'name' => esc_html__( 'Envira Gallery', 'to-specials' ), |
|
183 | - 'type' => 'post_select', |
|
184 | - 'use_ajax' => false, |
|
185 | - 'allow_none' => true, |
|
186 | - 'query' => array( |
|
187 | - 'post_type' => 'envira', |
|
188 | - 'nopagin' => true, |
|
189 | - 'posts_per_page' => '-1', |
|
190 | - 'orderby' => 'title', |
|
191 | - 'order' => 'ASC', |
|
192 | - ), |
|
193 | - ); |
|
194 | - |
|
195 | - if ( class_exists( 'Envira_Videos' ) ) { |
|
196 | - $metabox['fields'][] = array( |
|
197 | - 'id' => 'envira_video', |
|
198 | - 'name' => esc_html__( 'Envira Video Gallery', 'to-specials' ), |
|
199 | - 'type' => 'post_select', |
|
200 | - 'use_ajax' => false, |
|
201 | - 'allow_none' => true, |
|
202 | - 'query' => array( |
|
203 | - 'post_type' => 'envira', |
|
204 | - 'nopagin' => true, |
|
205 | - 'posts_per_page' => '-1', |
|
206 | - 'orderby' => 'title', |
|
207 | - 'order' => 'ASC', |
|
208 | - ), |
|
209 | - ); |
|
210 | - } |
|
174 | + $metabox['fields'][] = array( |
|
175 | + 'id' => 'envira_title', |
|
176 | + 'name' => esc_html__( 'Envira Gallery', 'to-specials' ), |
|
177 | + 'type' => 'title', |
|
178 | + ); |
|
179 | + |
|
180 | + $metabox['fields'][] = array( |
|
181 | + 'id' => 'envira_gallery', |
|
182 | + 'name' => esc_html__( 'Envira Gallery', 'to-specials' ), |
|
183 | + 'type' => 'post_select', |
|
184 | + 'use_ajax' => false, |
|
185 | + 'allow_none' => true, |
|
186 | + 'query' => array( |
|
187 | + 'post_type' => 'envira', |
|
188 | + 'nopagin' => true, |
|
189 | + 'posts_per_page' => '-1', |
|
190 | + 'orderby' => 'title', |
|
191 | + 'order' => 'ASC', |
|
192 | + ), |
|
193 | + ); |
|
194 | + |
|
195 | + if ( class_exists( 'Envira_Videos' ) ) { |
|
196 | + $metabox['fields'][] = array( |
|
197 | + 'id' => 'envira_video', |
|
198 | + 'name' => esc_html__( 'Envira Video Gallery', 'to-specials' ), |
|
199 | + 'type' => 'post_select', |
|
200 | + 'use_ajax' => false, |
|
201 | + 'allow_none' => true, |
|
202 | + 'query' => array( |
|
203 | + 'post_type' => 'envira', |
|
204 | + 'nopagin' => true, |
|
205 | + 'posts_per_page' => '-1', |
|
206 | + 'orderby' => 'title', |
|
207 | + 'order' => 'ASC', |
|
208 | + ), |
|
209 | + ); |
|
210 | + } |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | $post_types = array( |
214 | - 'post' => esc_html__( 'Posts', 'to-specials' ), |
|
215 | - 'accommodation' => esc_html__( 'Accommodation', 'to-specials' ), |
|
216 | - 'destination' => esc_html__( 'Destinations', 'to-specials' ), |
|
217 | - 'tour' => esc_html__( 'Tours', 'to-specials' ), |
|
214 | + 'post' => esc_html__( 'Posts', 'to-specials' ), |
|
215 | + 'accommodation' => esc_html__( 'Accommodation', 'to-specials' ), |
|
216 | + 'destination' => esc_html__( 'Destinations', 'to-specials' ), |
|
217 | + 'tour' => esc_html__( 'Tours', 'to-specials' ), |
|
218 | 218 | ); |
219 | 219 | |
220 | 220 | foreach ( $post_types as $slug => $label ) { |
221 | - $metabox['fields'][] = array( |
|
222 | - 'id' => $slug . '_title', |
|
223 | - 'name' => $label, |
|
224 | - 'type' => 'title', |
|
225 | - ); |
|
226 | - |
|
227 | - $metabox['fields'][] = array( |
|
228 | - 'id' => $slug . '_to_special', |
|
229 | - 'name' => $label . esc_html__( ' related with this special', 'to-specials' ), |
|
230 | - 'type' => 'post_select', |
|
231 | - 'use_ajax' => false, |
|
232 | - 'repeatable' => true, |
|
233 | - 'allow_none' => true, |
|
234 | - 'query' => array( |
|
235 | - 'post_type' => $slug, |
|
236 | - 'nopagin' => true, |
|
237 | - 'posts_per_page' => '-1', |
|
238 | - 'orderby' => 'title', |
|
239 | - 'order' => 'ASC', |
|
240 | - ), |
|
241 | - ); |
|
221 | + $metabox['fields'][] = array( |
|
222 | + 'id' => $slug . '_title', |
|
223 | + 'name' => $label, |
|
224 | + 'type' => 'title', |
|
225 | + ); |
|
226 | + |
|
227 | + $metabox['fields'][] = array( |
|
228 | + 'id' => $slug . '_to_special', |
|
229 | + 'name' => $label . esc_html__( ' related with this special', 'to-specials' ), |
|
230 | + 'type' => 'post_select', |
|
231 | + 'use_ajax' => false, |
|
232 | + 'repeatable' => true, |
|
233 | + 'allow_none' => true, |
|
234 | + 'query' => array( |
|
235 | + 'post_type' => $slug, |
|
236 | + 'nopagin' => true, |
|
237 | + 'posts_per_page' => '-1', |
|
238 | + 'orderby' => 'title', |
|
239 | + 'order' => 'ASC', |
|
240 | + ), |
|
241 | + ); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | $metabox['fields'] = apply_filters( 'lsx_to_special_custom_fields', $metabox['fields'] ); |
@@ -15,17 +15,17 @@ discard block |
||
15 | 15 | 'args' => array( |
16 | 16 | 'hierarchical' => true, |
17 | 17 | 'labels' => array( |
18 | - 'name' => esc_html__( 'Special Type', 'to-special' ), |
|
19 | - 'singular_name' => esc_html__( 'Special Type', 'to-special' ), |
|
20 | - 'search_items' => esc_html__( 'Search Types', 'to-special' ), |
|
21 | - 'all_items' => esc_html__( 'Special Types', 'to-special' ), |
|
22 | - 'parent_item' => esc_html__( 'Parent', 'to-special' ), |
|
23 | - 'parent_item_colon' => esc_html__( 'Parent:', 'to-special' ), |
|
24 | - 'edit_item' => esc_html__( 'Edit Special Type', 'to-special' ), |
|
25 | - 'update_item' => esc_html__( 'Update Special Type', 'to-special' ), |
|
26 | - 'add_new_item' => esc_html__( 'Add New Special Type', 'to-special' ), |
|
27 | - 'new_item_name' => esc_html__( 'New Role', 'to-special' ), |
|
28 | - 'menu_name' => esc_html__( 'Roles', 'to-special' ), |
|
18 | + 'name' => esc_html__('Special Type', 'to-special'), |
|
19 | + 'singular_name' => esc_html__('Special Type', 'to-special'), |
|
20 | + 'search_items' => esc_html__('Search Types', 'to-special'), |
|
21 | + 'all_items' => esc_html__('Special Types', 'to-special'), |
|
22 | + 'parent_item' => esc_html__('Parent', 'to-special'), |
|
23 | + 'parent_item_colon' => esc_html__('Parent:', 'to-special'), |
|
24 | + 'edit_item' => esc_html__('Edit Special Type', 'to-special'), |
|
25 | + 'update_item' => esc_html__('Update Special Type', 'to-special'), |
|
26 | + 'add_new_item' => esc_html__('Add New Special Type', 'to-special'), |
|
27 | + 'new_item_name' => esc_html__('New Role', 'to-special'), |
|
28 | + 'menu_name' => esc_html__('Roles', 'to-special'), |
|
29 | 29 | ), |
30 | 30 | 'show_ui' => true, |
31 | 31 | 'public' => true, |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'exclude_from_search' => true, |
34 | 34 | 'show_admin_column' => true, |
35 | 35 | 'query_var' => true, |
36 | - 'rewrite' => array( 'special-type' ), |
|
36 | + 'rewrite' => array('special-type'), |
|
37 | 37 | ), |
38 | 38 | ); |
39 | 39 |
@@ -10,31 +10,31 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | $taxonomy = array( |
13 | - 'object_types' => 'special', |
|
14 | - 'menu_position' => 73, |
|
15 | - 'args' => array( |
|
16 | - 'hierarchical' => true, |
|
17 | - 'labels' => array( |
|
18 | - 'name' => esc_html__( 'Special Type', 'to-special' ), |
|
19 | - 'singular_name' => esc_html__( 'Special Type', 'to-special' ), |
|
20 | - 'search_items' => esc_html__( 'Search Types', 'to-special' ), |
|
21 | - 'all_items' => esc_html__( 'Special Types', 'to-special' ), |
|
22 | - 'parent_item' => esc_html__( 'Parent', 'to-special' ), |
|
23 | - 'parent_item_colon' => esc_html__( 'Parent:', 'to-special' ), |
|
24 | - 'edit_item' => esc_html__( 'Edit Special Type', 'to-special' ), |
|
25 | - 'update_item' => esc_html__( 'Update Special Type', 'to-special' ), |
|
26 | - 'add_new_item' => esc_html__( 'Add New Special Type', 'to-special' ), |
|
27 | - 'new_item_name' => esc_html__( 'New Role', 'to-special' ), |
|
28 | - 'menu_name' => esc_html__( 'Roles', 'to-special' ), |
|
29 | - ), |
|
30 | - 'show_ui' => true, |
|
31 | - 'public' => true, |
|
32 | - 'show_tagcloud' => false, |
|
33 | - 'exclude_from_search' => true, |
|
34 | - 'show_admin_column' => true, |
|
35 | - 'query_var' => true, |
|
36 | - 'rewrite' => array( 'special-type' ), |
|
37 | - ), |
|
13 | + 'object_types' => 'special', |
|
14 | + 'menu_position' => 73, |
|
15 | + 'args' => array( |
|
16 | + 'hierarchical' => true, |
|
17 | + 'labels' => array( |
|
18 | + 'name' => esc_html__( 'Special Type', 'to-special' ), |
|
19 | + 'singular_name' => esc_html__( 'Special Type', 'to-special' ), |
|
20 | + 'search_items' => esc_html__( 'Search Types', 'to-special' ), |
|
21 | + 'all_items' => esc_html__( 'Special Types', 'to-special' ), |
|
22 | + 'parent_item' => esc_html__( 'Parent', 'to-special' ), |
|
23 | + 'parent_item_colon' => esc_html__( 'Parent:', 'to-special' ), |
|
24 | + 'edit_item' => esc_html__( 'Edit Special Type', 'to-special' ), |
|
25 | + 'update_item' => esc_html__( 'Update Special Type', 'to-special' ), |
|
26 | + 'add_new_item' => esc_html__( 'Add New Special Type', 'to-special' ), |
|
27 | + 'new_item_name' => esc_html__( 'New Role', 'to-special' ), |
|
28 | + 'menu_name' => esc_html__( 'Roles', 'to-special' ), |
|
29 | + ), |
|
30 | + 'show_ui' => true, |
|
31 | + 'public' => true, |
|
32 | + 'show_tagcloud' => false, |
|
33 | + 'exclude_from_search' => true, |
|
34 | + 'show_admin_column' => true, |
|
35 | + 'query_var' => true, |
|
36 | + 'rewrite' => array( 'special-type' ), |
|
37 | + ), |
|
38 | 38 | ); |
39 | 39 | |
40 | 40 | return $taxonomy; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | <?php lsx_content_wrap_before(); ?> |
12 | 12 | |
13 | - <div id="primary" class="content-area col-sm-12 <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
13 | + <div id="primary" class="content-area col-sm-12 <?php echo esc_attr(lsx_main_class()); ?>"> |
|
14 | 14 | |
15 | 15 | <?php lsx_content_before(); ?> |
16 | 16 | |
@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | |
19 | 19 | <?php lsx_content_top(); ?> |
20 | 20 | |
21 | - <?php if ( have_posts() ) : ?> |
|
21 | + <?php if (have_posts()) : ?> |
|
22 | 22 | |
23 | - <div class="row lsx-to-archive-items lsx-to-archive-template-<?php echo esc_attr( tour_operator()->archive_layout ); ?> lsx-to-archive-template-image-<?php echo esc_attr( tour_operator()->archive_list_layout_image_style ); ?>"> |
|
23 | + <div class="row lsx-to-archive-items lsx-to-archive-template-<?php echo esc_attr(tour_operator()->archive_layout); ?> lsx-to-archive-template-image-<?php echo esc_attr(tour_operator()->archive_list_layout_image_style); ?>"> |
|
24 | 24 | |
25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
25 | + <?php while (have_posts()) : the_post(); ?> |
|
26 | 26 | |
27 | - <div class="<?php echo esc_attr( lsx_to_archive_class( 'lsx-to-archive-item' ) ); ?>"> |
|
28 | - <?php lsx_to_special_content( 'content', 'special' ); ?> |
|
27 | + <div class="<?php echo esc_attr(lsx_to_archive_class('lsx-to-archive-item')); ?>"> |
|
28 | + <?php lsx_to_special_content('content', 'special'); ?> |
|
29 | 29 | </div> |
30 | 30 | |
31 | 31 | <?php endwhile; ?> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | <?php else : ?> |
36 | 36 | |
37 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
37 | + <?php get_template_part('partials/content', 'none'); ?> |
|
38 | 38 | |
39 | 39 | <?php endif; ?> |
40 | 40 |
@@ -32,9 +32,12 @@ |
||
32 | 32 | |
33 | 33 | </div> |
34 | 34 | |
35 | - <?php else : ?> |
|
35 | + <?php else { |
|
36 | + : ?> |
|
36 | 37 | |
37 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
38 | + <?php get_template_part( 'partials/content', 'none' ); |
|
39 | +} |
|
40 | +?> |
|
38 | 41 | |
39 | 42 | <?php endif; ?> |
40 | 43 |
@@ -13,27 +13,27 @@ discard block |
||
13 | 13 | $permalink = ''; |
14 | 14 | $tour_operator = tour_operator(); |
15 | 15 | |
16 | -if ( $has_single ) { |
|
16 | +if ($has_single) { |
|
17 | 17 | $permalink = get_the_permalink(); |
18 | -} elseif ( ! is_post_type_archive( 'special' ) ) { |
|
18 | +} elseif ( ! is_post_type_archive('special')) { |
|
19 | 19 | $has_single = true; |
20 | - $permalink = get_post_type_archive_link( 'special' ) . '#special-' . $post->post_name; |
|
20 | + $permalink = get_post_type_archive_link('special') . '#special-' . $post->post_name; |
|
21 | 21 | } |
22 | 22 | ?> |
23 | 23 | <article <?php post_class(); ?>> |
24 | - <?php if ( empty( $disable_placeholder ) ) { ?> |
|
24 | + <?php if (empty($disable_placeholder)) { ?> |
|
25 | 25 | <div class="lsx-to-widget-thumb"> |
26 | - <?php if ( $has_single ) { ?><a href="<?php echo esc_url( $permalink ); ?>"><?php } ?> |
|
27 | - <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?> |
|
28 | - <?php if ( $has_single ) { ?></a><?php } ?> |
|
26 | + <?php if ($has_single) { ?><a href="<?php echo esc_url($permalink); ?>"><?php } ?> |
|
27 | + <?php lsx_thumbnail('lsx-thumbnail-single'); ?> |
|
28 | + <?php if ($has_single) { ?></a><?php } ?> |
|
29 | 29 | </div> |
30 | 30 | <?php } ?> |
31 | 31 | |
32 | 32 | <div class="lsx-to-widget-content"> |
33 | 33 | <h4 class="lsx-to-widget-title text-center"> |
34 | - <?php if ( $has_single ) { ?><a href="<?php echo esc_url( $permalink ); ?>"><?php } ?> |
|
34 | + <?php if ($has_single) { ?><a href="<?php echo esc_url($permalink); ?>"><?php } ?> |
|
35 | 35 | <?php the_title(); ?> |
36 | - <?php if ( $has_single ) { ?></a><?php } ?> |
|
36 | + <?php if ($has_single) { ?></a><?php } ?> |
|
37 | 37 | </h4> |
38 | 38 | |
39 | 39 | <?php |
@@ -46,16 +46,16 @@ discard block |
||
46 | 46 | <?php |
47 | 47 | $meta_class = 'lsx-to-meta-data lsx-to-meta-data-'; |
48 | 48 | |
49 | - lsx_to_price( '<span class="' . $meta_class . 'price"><span class="lsx-to-meta-data-key">' . esc_html__( 'From price', 'to-specials' ) . ':</span> ', '</span>' ); |
|
50 | - lsx_to_connected_tours( '<span class="' . $meta_class . 'tours"><span class="lsx-to-meta-data-key">' . __( 'Tours', 'to-specials' ) . ':</span> ', '</span>' ); |
|
51 | - lsx_to_connected_accommodation( '<span class="' . $meta_class . 'accommodations"><span class="lsx-to-meta-data-key">' . __( 'Accommodation', 'to-specials' ) . ':</span> ', '</span>' ); |
|
52 | - the_terms( get_the_ID(), 'travel-style', '<span class="' . $meta_class . 'style"><span class="lsx-to-meta-data-key">' . __( 'Travel Style', 'to-specials' ) . ':</span> ', ', ', '</span>' ); |
|
53 | - the_terms( get_the_ID(), 'special-type', '<span class="' . $meta_class . 'special"><span class="lsx-to-meta-data-key">' . __( 'Type', 'to-specials' ) . ':</span> ', ', ', '</span>' ); |
|
54 | - lsx_to_connected_destinations( '<span class="' . $meta_class . 'destinations"><span class="lsx-to-meta-data-key">' . __( 'Destinations', 'to-specials' ) . ':</span> ', '</span>' ); |
|
55 | - lsx_to_specials_validity( '<span class="' . $meta_class . 'valid-from"><span class="lsx-to-meta-data-key">' . __( 'Booking Validity', 'to-specials' ) . ':</span> ', '</span>' ); |
|
49 | + lsx_to_price('<span class="' . $meta_class . 'price"><span class="lsx-to-meta-data-key">' . esc_html__('From price', 'to-specials') . ':</span> ', '</span>'); |
|
50 | + lsx_to_connected_tours('<span class="' . $meta_class . 'tours"><span class="lsx-to-meta-data-key">' . __('Tours', 'to-specials') . ':</span> ', '</span>'); |
|
51 | + lsx_to_connected_accommodation('<span class="' . $meta_class . 'accommodations"><span class="lsx-to-meta-data-key">' . __('Accommodation', 'to-specials') . ':</span> ', '</span>'); |
|
52 | + the_terms(get_the_ID(), 'travel-style', '<span class="' . $meta_class . 'style"><span class="lsx-to-meta-data-key">' . __('Travel Style', 'to-specials') . ':</span> ', ', ', '</span>'); |
|
53 | + the_terms(get_the_ID(), 'special-type', '<span class="' . $meta_class . 'special"><span class="lsx-to-meta-data-key">' . __('Type', 'to-specials') . ':</span> ', ', ', '</span>'); |
|
54 | + lsx_to_connected_destinations('<span class="' . $meta_class . 'destinations"><span class="lsx-to-meta-data-key">' . __('Destinations', 'to-specials') . ':</span> ', '</span>'); |
|
55 | + lsx_to_specials_validity('<span class="' . $meta_class . 'valid-from"><span class="lsx-to-meta-data-key">' . __('Booking Validity', 'to-specials') . ':</span> ', '</span>'); |
|
56 | 56 | |
57 | - if ( function_exists( 'lsx_to_connected_activities' ) ) { |
|
58 | - lsx_to_connected_activities( '<span class="' . $meta_class . 'activities"><span class="lsx-to-meta-data-key">' . __( 'Activites', 'to-specials' ) . ':</span> ', '</span>' ); |
|
57 | + if (function_exists('lsx_to_connected_activities')) { |
|
58 | + lsx_to_connected_activities('<span class="' . $meta_class . 'activities"><span class="lsx-to-meta-data-key">' . __('Activites', 'to-specials') . ':</span> ', '</span>'); |
|
59 | 59 | } |
60 | 60 | ?> |
61 | 61 | </div> |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | lsx_to_widget_entry_content_bottom(); |
68 | 68 | $excerpt = ob_get_clean(); |
69 | 69 | |
70 | - if ( empty( $disable_text ) && ! empty( $excerpt ) ) { |
|
71 | - echo wp_kses_post( $excerpt ); |
|
72 | - } elseif ( $has_single && true !== $disable_view_more && '1' !== $disable_view_more ) { |
|
70 | + if (empty($disable_text) && ! empty($excerpt)) { |
|
71 | + echo wp_kses_post($excerpt); |
|
72 | + } elseif ($has_single && true !== $disable_view_more && '1' !== $disable_view_more) { |
|
73 | 73 | ?> |
74 | - <p class="moretag-wrapper"><a href="<?php echo esc_url( $permalink ); ?>" class="moretag"><?php esc_html_e( 'View more', 'tour-operator' ); ?></a></p> |
|
74 | + <p class="moretag-wrapper"><a href="<?php echo esc_url($permalink); ?>" class="moretag"><?php esc_html_e('View more', 'tour-operator'); ?></a></p> |
|
75 | 75 | <?php |
76 | 76 | } |
77 | 77 | ?> |
@@ -14,10 +14,10 @@ discard block |
||
14 | 14 | $tour_operator = tour_operator(); |
15 | 15 | |
16 | 16 | if ( $has_single ) { |
17 | - $permalink = get_the_permalink(); |
|
17 | + $permalink = get_the_permalink(); |
|
18 | 18 | } elseif ( ! is_post_type_archive( 'special' ) ) { |
19 | - $has_single = true; |
|
20 | - $permalink = get_post_type_archive_link( 'special' ) . '#special-' . $post->post_name; |
|
19 | + $has_single = true; |
|
20 | + $permalink = get_post_type_archive_link( 'special' ) . '#special-' . $post->post_name; |
|
21 | 21 | } |
22 | 22 | ?> |
23 | 23 | <article <?php post_class(); ?>> |
@@ -37,43 +37,43 @@ discard block |
||
37 | 37 | </h4> |
38 | 38 | |
39 | 39 | <?php |
40 | - // if ( empty( $disable_text ) ) { |
|
41 | - // lsx_to_tagline( '<p class="lsx-to-widget-tagline text-center">', '</p>' ); |
|
42 | - // } |
|
43 | - ?> |
|
40 | + // if ( empty( $disable_text ) ) { |
|
41 | + // lsx_to_tagline( '<p class="lsx-to-widget-tagline text-center">', '</p>' ); |
|
42 | + // } |
|
43 | + ?> |
|
44 | 44 | |
45 | 45 | <div class="lsx-to-widget-meta-data"> |
46 | 46 | <?php |
47 | - $meta_class = 'lsx-to-meta-data lsx-to-meta-data-'; |
|
47 | + $meta_class = 'lsx-to-meta-data lsx-to-meta-data-'; |
|
48 | 48 | |
49 | - lsx_to_price( '<span class="' . $meta_class . 'price"><span class="lsx-to-meta-data-key">' . esc_html__( 'From price', 'to-specials' ) . ':</span> ', '</span>' ); |
|
50 | - lsx_to_connected_tours( '<span class="' . $meta_class . 'tours"><span class="lsx-to-meta-data-key">' . __( 'Tours', 'to-specials' ) . ':</span> ', '</span>' ); |
|
51 | - lsx_to_connected_accommodation( '<span class="' . $meta_class . 'accommodations"><span class="lsx-to-meta-data-key">' . __( 'Accommodation', 'to-specials' ) . ':</span> ', '</span>' ); |
|
52 | - the_terms( get_the_ID(), 'travel-style', '<span class="' . $meta_class . 'style"><span class="lsx-to-meta-data-key">' . __( 'Travel Style', 'to-specials' ) . ':</span> ', ', ', '</span>' ); |
|
53 | - the_terms( get_the_ID(), 'special-type', '<span class="' . $meta_class . 'special"><span class="lsx-to-meta-data-key">' . __( 'Type', 'to-specials' ) . ':</span> ', ', ', '</span>' ); |
|
54 | - lsx_to_connected_destinations( '<span class="' . $meta_class . 'destinations"><span class="lsx-to-meta-data-key">' . __( 'Destinations', 'to-specials' ) . ':</span> ', '</span>' ); |
|
55 | - lsx_to_specials_validity( '<span class="' . $meta_class . 'valid-from"><span class="lsx-to-meta-data-key">' . __( 'Booking Validity', 'to-specials' ) . ':</span> ', '</span>' ); |
|
49 | + lsx_to_price( '<span class="' . $meta_class . 'price"><span class="lsx-to-meta-data-key">' . esc_html__( 'From price', 'to-specials' ) . ':</span> ', '</span>' ); |
|
50 | + lsx_to_connected_tours( '<span class="' . $meta_class . 'tours"><span class="lsx-to-meta-data-key">' . __( 'Tours', 'to-specials' ) . ':</span> ', '</span>' ); |
|
51 | + lsx_to_connected_accommodation( '<span class="' . $meta_class . 'accommodations"><span class="lsx-to-meta-data-key">' . __( 'Accommodation', 'to-specials' ) . ':</span> ', '</span>' ); |
|
52 | + the_terms( get_the_ID(), 'travel-style', '<span class="' . $meta_class . 'style"><span class="lsx-to-meta-data-key">' . __( 'Travel Style', 'to-specials' ) . ':</span> ', ', ', '</span>' ); |
|
53 | + the_terms( get_the_ID(), 'special-type', '<span class="' . $meta_class . 'special"><span class="lsx-to-meta-data-key">' . __( 'Type', 'to-specials' ) . ':</span> ', ', ', '</span>' ); |
|
54 | + lsx_to_connected_destinations( '<span class="' . $meta_class . 'destinations"><span class="lsx-to-meta-data-key">' . __( 'Destinations', 'to-specials' ) . ':</span> ', '</span>' ); |
|
55 | + lsx_to_specials_validity( '<span class="' . $meta_class . 'valid-from"><span class="lsx-to-meta-data-key">' . __( 'Booking Validity', 'to-specials' ) . ':</span> ', '</span>' ); |
|
56 | 56 | |
57 | - if ( function_exists( 'lsx_to_connected_activities' ) ) { |
|
58 | - lsx_to_connected_activities( '<span class="' . $meta_class . 'activities"><span class="lsx-to-meta-data-key">' . __( 'Activites', 'to-specials' ) . ':</span> ', '</span>' ); |
|
59 | - } |
|
60 | - ?> |
|
57 | + if ( function_exists( 'lsx_to_connected_activities' ) ) { |
|
58 | + lsx_to_connected_activities( '<span class="' . $meta_class . 'activities"><span class="lsx-to-meta-data-key">' . __( 'Activites', 'to-specials' ) . ':</span> ', '</span>' ); |
|
59 | + } |
|
60 | + ?> |
|
61 | 61 | </div> |
62 | 62 | |
63 | 63 | <?php |
64 | - ob_start(); |
|
65 | - lsx_to_widget_entry_content_top(); |
|
66 | - the_excerpt(); |
|
67 | - lsx_to_widget_entry_content_bottom(); |
|
68 | - $excerpt = ob_get_clean(); |
|
64 | + ob_start(); |
|
65 | + lsx_to_widget_entry_content_top(); |
|
66 | + the_excerpt(); |
|
67 | + lsx_to_widget_entry_content_bottom(); |
|
68 | + $excerpt = ob_get_clean(); |
|
69 | 69 | |
70 | - if ( empty( $disable_text ) && ! empty( $excerpt ) ) { |
|
71 | - echo wp_kses_post( $excerpt ); |
|
72 | - } elseif ( $has_single && true !== $disable_view_more && '1' !== $disable_view_more ) { |
|
73 | - ?> |
|
70 | + if ( empty( $disable_text ) && ! empty( $excerpt ) ) { |
|
71 | + echo wp_kses_post( $excerpt ); |
|
72 | + } elseif ( $has_single && true !== $disable_view_more && '1' !== $disable_view_more ) { |
|
73 | + ?> |
|
74 | 74 | <p class="moretag-wrapper"><a href="<?php echo esc_url( $permalink ); ?>" class="moretag"><?php esc_html_e( 'View more', 'tour-operator' ); ?></a></p> |
75 | 75 | <?php |
76 | - } |
|
77 | - ?> |
|
76 | + } |
|
77 | + ?> |
|
78 | 78 | </div> |
79 | 79 | </article> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | <?php lsx_content_wrap_before(); ?> |
12 | 12 | |
13 | - <div id="primary" class="content-area col-sm-12 <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
13 | + <div id="primary" class="content-area col-sm-12 <?php echo esc_attr(lsx_main_class()); ?>"> |
|
14 | 14 | |
15 | 15 | <?php lsx_content_before(); ?> |
16 | 16 | |
@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | |
19 | 19 | <?php lsx_content_top(); ?> |
20 | 20 | |
21 | - <?php if ( have_posts() ) : ?> |
|
21 | + <?php if (have_posts()) : ?> |
|
22 | 22 | |
23 | - <div class="row lsx-to-archive-items lsx-to-archive-template-<?php echo esc_attr( tour_operator()->archive_layout ); ?> lsx-to-archive-template-image-<?php echo esc_attr( tour_operator()->archive_list_layout_image_style ); ?>"> |
|
23 | + <div class="row lsx-to-archive-items lsx-to-archive-template-<?php echo esc_attr(tour_operator()->archive_layout); ?> lsx-to-archive-template-image-<?php echo esc_attr(tour_operator()->archive_list_layout_image_style); ?>"> |
|
24 | 24 | |
25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
25 | + <?php while (have_posts()) : the_post(); ?> |
|
26 | 26 | |
27 | - <div class="<?php echo esc_attr( lsx_to_archive_class( 'lsx-to-archive-item' ) ); ?>"> |
|
28 | - <?php lsx_to_content( 'content', get_post_type() ); ?> |
|
27 | + <div class="<?php echo esc_attr(lsx_to_archive_class('lsx-to-archive-item')); ?>"> |
|
28 | + <?php lsx_to_content('content', get_post_type()); ?> |
|
29 | 29 | </div> |
30 | 30 | |
31 | 31 | <?php endwhile; ?> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | <?php else : ?> |
36 | 36 | |
37 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
37 | + <?php get_template_part('partials/content', 'none'); ?> |
|
38 | 38 | |
39 | 39 | <?php endif; ?> |
40 | 40 |
@@ -32,9 +32,12 @@ |
||
32 | 32 | |
33 | 33 | </div> |
34 | 34 | |
35 | - <?php else : ?> |
|
35 | + <?php else { |
|
36 | + : ?> |
|
36 | 37 | |
37 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
38 | + <?php get_template_part( 'partials/content', 'none' ); |
|
39 | +} |
|
40 | +?> |
|
38 | 41 | |
39 | 42 | <?php endif; ?> |
40 | 43 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | <?php lsx_content_wrap_before(); ?> |
12 | 12 | |
13 | - <div id="primary" class="content-area col-sm-12 <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
13 | + <div id="primary" class="content-area col-sm-12 <?php echo esc_attr(lsx_main_class()); ?>"> |
|
14 | 14 | |
15 | 15 | <?php lsx_content_before(); ?> |
16 | 16 | |
@@ -18,15 +18,15 @@ discard block |
||
18 | 18 | |
19 | 19 | <?php lsx_content_top(); ?> |
20 | 20 | |
21 | - <?php while ( have_posts() ) : the_post(); ?> |
|
21 | + <?php while (have_posts()) : the_post(); ?> |
|
22 | 22 | |
23 | 23 | <section id="summary" class="lsx-to-section lsx-to-collapse-section"> |
24 | - <h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title hidden-lg" data-toggle="collapse" data-target="#collapse-summary"><?php esc_html_e( 'Summary', 'to-specials' ); ?></h2> |
|
24 | + <h2 class="lsx-to-section-title lsx-to-collapse-title lsx-title hidden-lg" data-toggle="collapse" data-target="#collapse-summary"><?php esc_html_e('Summary', 'to-specials'); ?></h2> |
|
25 | 25 | |
26 | 26 | <div id="collapse-summary" class="collapse in"> |
27 | 27 | <div class="collapse-inner"> |
28 | 28 | <div class="row"> |
29 | - <?php lsx_to_content( 'content', 'special' ); ?> |
|
29 | + <?php lsx_to_content('content', 'special'); ?> |
|
30 | 30 | </div> |
31 | 31 | </div> |
32 | 32 | </div> |