@@ -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-reviews'); ?></a></li> |
|
| 5 | - <?php if(class_exists('LSX_TO_Search')) { ?> |
|
| 6 | - <li><a href="#ui-search"><?php esc_html_e('Search','to-reviews'); ?></a></li> |
|
| 4 | + <li><a href="#ui-general" class="active"><?php esc_html_e('General', 'to-reviews'); ?></a></li> |
|
| 5 | + <?php if (class_exists('LSX_TO_Search')) { ?> |
|
| 6 | + <li><a href="#ui-search"><?php esc_html_e('Search', 'to-reviews'); ?></a></li> |
|
| 7 | 7 | <?php } ?> |
| 8 | - <li><a href="#ui-placeholders"><?php esc_html_e('Placeholders','to-reviews'); ?></a></li> |
|
| 9 | - <li><a href="#ui-archives"><?php esc_html_e('Archives','to-reviews'); ?></a></li> |
|
| 10 | - <li><a href="#ui-single"><?php esc_html_e('Single','to-reviews'); ?></a></li> |
|
| 8 | + <li><a href="#ui-placeholders"><?php esc_html_e('Placeholders', 'to-reviews'); ?></a></li> |
|
| 9 | + <li><a href="#ui-archives"><?php esc_html_e('Archives', 'to-reviews'); ?></a></li> |
|
| 10 | + <li><a href="#ui-single"><?php esc_html_e('Single', 'to-reviews'); ?></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_review_tab_content','review','general'); ?> |
|
| 16 | + <?php do_action('lsx_to_framework_review_tab_content', 'review', '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_review_tab_content','review','search'); ?> |
|
| 25 | + <?php do_action('lsx_to_framework_review_tab_content', 'review', '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_review_tab_content','review','placeholders'); ?> |
|
| 34 | + <?php do_action('lsx_to_framework_review_tab_content', 'review', '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_review_tab_content','review','archives'); ?> |
|
| 42 | + <?php do_action('lsx_to_framework_review_tab_content', 'review', '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_review_tab_content','review','single'); ?> |
|
| 50 | + <?php do_action('lsx_to_framework_review_tab_content', 'review', 'single'); ?> |
|
| 51 | 51 | </tbody> |
| 52 | 52 | </table> |
| 53 | 53 | </div> |
| 54 | - <?php do_action('lsx_to_framework_review_tab_bottom','review'); ?> |
|
| 54 | + <?php do_action('lsx_to_framework_review_tab_bottom', 'review'); ?> |
|
| 55 | 55 | </div> |
@@ -13,19 +13,19 @@ |
||
| 13 | 13 | 'class' => 'LSX_TO_Reviews', |
| 14 | 14 | 'menu_icon' => 'dashicons-editor-ul', |
| 15 | 15 | 'labels' => array( |
| 16 | - 'name' => esc_html__( 'Reviews', 'to-reviews' ), |
|
| 17 | - 'singular_name' => esc_html__( 'Review', 'to-reviews' ), |
|
| 18 | - 'add_new' => esc_html__( 'Add New', 'to-reviews' ), |
|
| 19 | - 'add_new_item' => esc_html__( 'Add New Review', 'to-reviews' ), |
|
| 20 | - 'edit_item' => esc_html__( 'Edit Review', 'to-reviews' ), |
|
| 21 | - 'new_item' => esc_html__( 'New Reviews', 'to-reviews' ), |
|
| 22 | - 'all_items' => esc_html__( 'Reviews', 'to-reviews' ), |
|
| 23 | - 'view_item' => esc_html__( 'View Review', 'to-reviews' ), |
|
| 24 | - 'search_items' => esc_html__( 'Search Reviews', 'to-reviews' ), |
|
| 25 | - 'not_found' => esc_html__( 'No reviews found', 'to-reviews' ), |
|
| 26 | - 'not_found_in_trash' => esc_html__( 'No reviews found in Trash', 'to-reviews' ), |
|
| 16 | + 'name' => esc_html__('Reviews', 'to-reviews'), |
|
| 17 | + 'singular_name' => esc_html__('Review', 'to-reviews'), |
|
| 18 | + 'add_new' => esc_html__('Add New', 'to-reviews'), |
|
| 19 | + 'add_new_item' => esc_html__('Add New Review', 'to-reviews'), |
|
| 20 | + 'edit_item' => esc_html__('Edit Review', 'to-reviews'), |
|
| 21 | + 'new_item' => esc_html__('New Reviews', 'to-reviews'), |
|
| 22 | + 'all_items' => esc_html__('Reviews', 'to-reviews'), |
|
| 23 | + 'view_item' => esc_html__('View Review', 'to-reviews'), |
|
| 24 | + 'search_items' => esc_html__('Search Reviews', 'to-reviews'), |
|
| 25 | + 'not_found' => esc_html__('No reviews found', 'to-reviews'), |
|
| 26 | + 'not_found_in_trash' => esc_html__('No reviews found in Trash', 'to-reviews'), |
|
| 27 | 27 | 'parent_item_colon' => '', |
| 28 | - 'menu_name' => esc_html__( 'Activities', 'to-reviews' ), |
|
| 28 | + 'menu_name' => esc_html__('Activities', 'to-reviews'), |
|
| 29 | 29 | ), |
| 30 | 30 | 'public' => true, |
| 31 | 31 | 'publicly_queryable' => true, |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * @subpackage template-tags |
| 14 | 14 | * @category review |
| 15 | 15 | */ |
| 16 | -if ( ! function_exists( 'lsx_to_review_posts' ) ) { |
|
| 16 | +if ( ! function_exists('lsx_to_review_posts')) { |
|
| 17 | 17 | function lsx_to_review_posts() { |
| 18 | 18 | global $lsx_to_archive; |
| 19 | 19 | |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | 'from' => 'post', |
| 22 | 22 | 'to' => 'review', |
| 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-reviews' ) . '</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-reviews') . '</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 content |
| 38 | 38 | */ |
| 39 | -function lsx_to_review_content( $slug, $name = null ) { |
|
| 40 | - do_action( 'lsx_to_review_content', $slug, $name ); |
|
| 39 | +function lsx_to_review_content($slug, $name = null) { |
|
| 40 | + do_action('lsx_to_review_content', $slug, $name); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /* ================ REVIEWS =========================== */ |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | * @subpackage template-tags |
| 54 | 54 | * @category review |
| 55 | 55 | */ |
| 56 | -function lsx_to_review_rating( $before = '', $after = '', $echo = true ) { |
|
| 57 | - lsx_to_custom_field_query( 'rating', $before, $after, $echo ); |
|
| 56 | +function lsx_to_review_rating($before = '', $after = '', $echo = true) { |
|
| 57 | + lsx_to_custom_field_query('rating', $before, $after, $echo); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -69,24 +69,24 @@ discard block |
||
| 69 | 69 | * @subpackage template-tags |
| 70 | 70 | * @category review |
| 71 | 71 | */ |
| 72 | -function lsx_to_review_dates( $before = '', $after = '', $echo = true ) { |
|
| 73 | - $valid_from = get_post_meta( get_the_ID(), 'date_of_visit_start', true ); |
|
| 74 | - $valid_to = get_post_meta( get_the_ID(), 'date_of_visit_end', true ); |
|
| 72 | +function lsx_to_review_dates($before = '', $after = '', $echo = true) { |
|
| 73 | + $valid_from = get_post_meta(get_the_ID(), 'date_of_visit_start', true); |
|
| 74 | + $valid_to = get_post_meta(get_the_ID(), 'date_of_visit_end', true); |
|
| 75 | 75 | |
| 76 | - if ( false !== $valid_from && '' !== $valid_from ) { |
|
| 77 | - $valid_from = date( 'd M Y', strtotime( $valid_from ) ); |
|
| 76 | + if (false !== $valid_from && '' !== $valid_from) { |
|
| 77 | + $valid_from = date('d M Y', strtotime($valid_from)); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if ( false !== $valid_to && '' !== $valid_to ) { |
|
| 81 | - $valid_from .= ' - ' . date( 'd M Y', strtotime( $valid_to ) ); |
|
| 80 | + if (false !== $valid_to && '' !== $valid_to) { |
|
| 81 | + $valid_from .= ' - ' . date('d M Y', strtotime($valid_to)); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if ( false !== $valid_from && '' !== $valid_from ) { |
|
| 84 | + if (false !== $valid_from && '' !== $valid_from) { |
|
| 85 | 85 | $return = $before . $valid_from . $after; |
| 86 | 86 | |
| 87 | - if ( $echo ) { |
|
| 87 | + if ($echo) { |
|
| 88 | 88 | echo $return; |
| 89 | - } else { |
|
| 89 | + }else { |
|
| 90 | 90 | return $return; |
| 91 | 91 | } |
| 92 | 92 | } |
@@ -101,16 +101,16 @@ discard block |
||
| 101 | 101 | function lsx_to_review_accommodation() { |
| 102 | 102 | global $lsx_archive; |
| 103 | 103 | |
| 104 | - if ( post_type_exists( 'accommodation' ) && is_singular( 'review' ) ) { |
|
| 104 | + if (post_type_exists('accommodation') && is_singular('review')) { |
|
| 105 | 105 | $args = array( |
| 106 | 106 | 'from' => 'accommodation', |
| 107 | 107 | 'to' => 'review', |
| 108 | 108 | 'column' => '3', |
| 109 | - 'before' => '<section id="accommodation" 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-accommodation">' . __( lsx_to_get_post_type_section_title( 'accommodation', '', 'Featured Accommodations' ), 'to-reviews' ) . '</h2><div id="collapse-accommodation" class="collapse in"><div class="collapse-inner">', |
|
| 109 | + 'before' => '<section id="accommodation" 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-accommodation">' . __(lsx_to_get_post_type_section_title('accommodation', '', 'Featured Accommodations'), 'to-reviews') . '</h2><div id="collapse-accommodation" class="collapse in"><div class="collapse-inner">', |
|
| 110 | 110 | 'after' => '</div></div></section>', |
| 111 | 111 | ); |
| 112 | 112 | |
| 113 | - lsx_to_connected_panel_query( $args ); |
|
| 113 | + lsx_to_connected_panel_query($args); |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
@@ -124,16 +124,16 @@ discard block |
||
| 124 | 124 | function lsx_to_review_tour() { |
| 125 | 125 | global $lsx_archive; |
| 126 | 126 | |
| 127 | - if ( post_type_exists( 'tour' ) && is_singular( 'review' ) ) { |
|
| 127 | + if (post_type_exists('tour') && is_singular('review')) { |
|
| 128 | 128 | $args = array( |
| 129 | 129 | 'from' => 'tour', |
| 130 | 130 | 'to' => 'review', |
| 131 | 131 | 'column' => '3', |
| 132 | - 'before' => '<section id="tours" 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-tours">' . __( lsx_to_get_post_type_section_title( 'tour', '', 'Featured Tours' ), 'to-reviews' ) . '</h2><div id="collapse-tours" class="collapse in"><div class="collapse-inner">', |
|
| 132 | + 'before' => '<section id="tours" 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-tours">' . __(lsx_to_get_post_type_section_title('tour', '', 'Featured Tours'), 'to-reviews') . '</h2><div id="collapse-tours" class="collapse in"><div class="collapse-inner">', |
|
| 133 | 133 | 'after' => '</div></div></section>', |
| 134 | 134 | ); |
| 135 | 135 | |
| 136 | - lsx_to_connected_panel_query( $args ); |
|
| 136 | + lsx_to_connected_panel_query($args); |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
@@ -147,16 +147,16 @@ discard block |
||
| 147 | 147 | function lsx_to_review_destination() { |
| 148 | 148 | global $lsx_archive; |
| 149 | 149 | |
| 150 | - if ( post_type_exists( 'destination' ) && is_singular( 'review' ) ) { |
|
| 150 | + if (post_type_exists('destination') && is_singular('review')) { |
|
| 151 | 151 | $args = array( |
| 152 | 152 | 'from' => 'destination', |
| 153 | 153 | 'to' => 'review', |
| 154 | 154 | 'column' => '3', |
| 155 | - 'before' => '<section id="destinations" 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-destinations">' . __( lsx_to_get_post_type_section_title( 'destination', '', 'Featured Destinations' ), 'to-reviews' ) . '</h2><div id="collapse-destinations" class="collapse in"><div class="collapse-inner">', |
|
| 155 | + 'before' => '<section id="destinations" 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-destinations">' . __(lsx_to_get_post_type_section_title('destination', '', 'Featured Destinations'), 'to-reviews') . '</h2><div id="collapse-destinations" class="collapse in"><div class="collapse-inner">', |
|
| 156 | 156 | 'after' => '</div></div></section>', |
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | - lsx_to_connected_panel_query( $args ); |
|
| 159 | + lsx_to_connected_panel_query($args); |
|
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | |
@@ -170,16 +170,16 @@ discard block |
||
| 170 | 170 | function lsx_to_accommodation_reviews() { |
| 171 | 171 | global $lsx_archive; |
| 172 | 172 | |
| 173 | - if ( post_type_exists( 'review' ) && is_singular( 'accommodation' ) ) { |
|
| 173 | + if (post_type_exists('review') && is_singular('accommodation')) { |
|
| 174 | 174 | $args = array( |
| 175 | 175 | 'from' => 'review', |
| 176 | 176 | 'to' => 'accommodation', |
| 177 | 177 | 'column' => '2', |
| 178 | - 'before' => '<section id="review" 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-review">' . __( lsx_to_get_post_type_section_title( 'review', '', 'Reviews' ), 'to-reviews' ) . '</h2><div id="collapse-review" class="collapse in"><div class="collapse-inner">', |
|
| 178 | + 'before' => '<section id="review" 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-review">' . __(lsx_to_get_post_type_section_title('review', '', 'Reviews'), 'to-reviews') . '</h2><div id="collapse-review" class="collapse in"><div class="collapse-inner">', |
|
| 179 | 179 | 'after' => '</div></div></section>', |
| 180 | 180 | ); |
| 181 | 181 | |
| 182 | - lsx_to_connected_panel_query( $args ); |
|
| 182 | + lsx_to_connected_panel_query($args); |
|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
@@ -193,16 +193,16 @@ discard block |
||
| 193 | 193 | function lsx_to_tour_reviews() { |
| 194 | 194 | global $lsx_archive; |
| 195 | 195 | |
| 196 | - if ( post_type_exists( 'review' ) && is_singular( 'tour' ) ) { |
|
| 196 | + if (post_type_exists('review') && is_singular('tour')) { |
|
| 197 | 197 | $args = array( |
| 198 | 198 | 'from' => 'review', |
| 199 | 199 | 'to' => 'tour', |
| 200 | 200 | 'column' => '2', |
| 201 | - 'before' => '<section id="review" 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-review">' . __( lsx_to_get_post_type_section_title( 'review', '', 'Reviews' ), 'to-reviews' ) . '</h2><div id="collapse-review" class="collapse in"><div class="collapse-inner">', |
|
| 201 | + 'before' => '<section id="review" 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-review">' . __(lsx_to_get_post_type_section_title('review', '', 'Reviews'), 'to-reviews') . '</h2><div id="collapse-review" class="collapse in"><div class="collapse-inner">', |
|
| 202 | 202 | 'after' => '</div></div></section>', |
| 203 | 203 | ); |
| 204 | 204 | |
| 205 | - lsx_to_connected_panel_query( $args ); |
|
| 205 | + lsx_to_connected_panel_query($args); |
|
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | |
@@ -216,16 +216,16 @@ discard block |
||
| 216 | 216 | function lsx_to_destination_reviews() { |
| 217 | 217 | global $lsx_archive; |
| 218 | 218 | |
| 219 | - if ( post_type_exists( 'review' ) && is_singular( 'destination' ) ) { |
|
| 219 | + if (post_type_exists('review') && is_singular('destination')) { |
|
| 220 | 220 | $args = array( |
| 221 | 221 | 'from' => 'review', |
| 222 | 222 | 'to' => 'destination', |
| 223 | 223 | 'column' => '2', |
| 224 | - 'before' => '<section id="review" 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-review">' . __( lsx_to_get_post_type_section_title( 'review', '', 'Reviews' ), 'to-reviews' ) . '</h2><div id="collapse-review" class="collapse in"><div class="collapse-inner">', |
|
| 224 | + 'before' => '<section id="review" 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-review">' . __(lsx_to_get_post_type_section_title('review', '', 'Reviews'), 'to-reviews') . '</h2><div id="collapse-review" class="collapse in"><div class="collapse-inner">', |
|
| 225 | 225 | 'after' => '</div></div></section>', |
| 226 | 226 | ); |
| 227 | 227 | |
| 228 | - lsx_to_connected_panel_query( $args ); |
|
| 228 | + lsx_to_connected_panel_query($args); |
|
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | |
@@ -241,6 +241,6 @@ discard block |
||
| 241 | 241 | * @subpackage template-tags |
| 242 | 242 | * @category connections |
| 243 | 243 | */ |
| 244 | -function lsx_to_connected_reviews( $before = '', $after = '', $echo = true ) { |
|
| 245 | - lsx_to_connected_items_query( 'review', get_post_type(), $before, $after, $echo ); |
|
| 244 | +function lsx_to_connected_reviews($before = '', $after = '', $echo = true) { |
|
| 245 | + lsx_to_connected_items_query('review', get_post_type(), $before, $after, $echo); |
|
| 246 | 246 | } |
@@ -10,69 +10,69 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | $metabox = array( |
| 13 | - 'title' => esc_html__( 'Tour Operator Plugin', 'to-reviews' ), |
|
| 13 | + 'title' => esc_html__('Tour Operator Plugin', 'to-reviews'), |
|
| 14 | 14 | 'pages' => 'review', |
| 15 | 15 | 'fields' => array(), |
| 16 | 16 | ); |
| 17 | 17 | |
| 18 | 18 | $metabox['fields'][] = array( |
| 19 | 19 | 'id' => 'featured', |
| 20 | - 'name' => esc_html__( 'Featured', 'to-reviews' ), |
|
| 20 | + 'name' => esc_html__('Featured', 'to-reviews'), |
|
| 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-reviews' ), |
|
| 26 | + 'name' => esc_html__('Disable Single', 'to-reviews'), |
|
| 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-reviews' ), |
|
| 33 | + 'name' => esc_html__('Tagline', 'to-reviews'), |
|
| 34 | 34 | 'type' => 'text', |
| 35 | 35 | ); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $metabox['fields'][] = array( |
| 39 | 39 | 'id' => 'no_adults', |
| 40 | - 'name' => esc_html__( 'No of Adults', 'to-reviews' ), |
|
| 40 | + 'name' => esc_html__('No of Adults', 'to-reviews'), |
|
| 41 | 41 | 'type' => 'text', |
| 42 | 42 | 'cols' => 6, |
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | $metabox['fields'][] = array( |
| 46 | 46 | 'id' => 'no_children', |
| 47 | - 'name' => esc_html__( 'No of Children', 'to-reviews' ), |
|
| 47 | + 'name' => esc_html__('No of Children', 'to-reviews'), |
|
| 48 | 48 | 'type' => 'text', |
| 49 | 49 | 'cols' => 6, |
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | 52 | $metabox['fields'][] = array( |
| 53 | 53 | 'id' => 'reviewer_name', |
| 54 | - 'name' => esc_html__( 'Reviewer Name', 'to-reviews' ), |
|
| 54 | + 'name' => esc_html__('Reviewer Name', 'to-reviews'), |
|
| 55 | 55 | 'type' => 'text', |
| 56 | 56 | 'cols' => 6, |
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | 59 | $metabox['fields'][] = array( |
| 60 | 60 | 'id' => 'reviewer_email', |
| 61 | - 'name' => esc_html__( 'Reviewer Email', 'to-reviews' ), |
|
| 61 | + 'name' => esc_html__('Reviewer Email', 'to-reviews'), |
|
| 62 | 62 | 'type' => 'text', |
| 63 | 63 | 'cols' => 6, |
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | 66 | $metabox['fields'][] = array( |
| 67 | 67 | 'id' => 'rating', |
| 68 | - 'name' => esc_html__( 'Rating', 'to-reviews' ), |
|
| 68 | + 'name' => esc_html__('Rating', 'to-reviews'), |
|
| 69 | 69 | 'type' => 'radio', |
| 70 | - 'options' => array( '0', '1', '2', '3', '4', '5' ), |
|
| 70 | + 'options' => array('0', '1', '2', '3', '4', '5'), |
|
| 71 | 71 | 'allow_none' => true, |
| 72 | 72 | ); |
| 73 | 73 | $metabox['fields'][] = array( |
| 74 | 74 | 'id' => 'date_of_visit_start', |
| 75 | - 'name' => esc_html__( 'Date of visit', 'to-reviews' ), |
|
| 75 | + 'name' => esc_html__('Date of visit', 'to-reviews'), |
|
| 76 | 76 | 'type' => 'date', |
| 77 | 77 | 'cols' => 6, |
| 78 | 78 | ); |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | 'cols' => 6, |
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | -if ( class_exists( 'LSX_TO_Team' ) ) { |
|
| 87 | +if (class_exists('LSX_TO_Team')) { |
|
| 88 | 88 | $metabox['fields'][] = array( |
| 89 | 89 | 'id' => 'team_to_review', |
| 90 | - 'name' => esc_html__( 'Reviewed By', 'to-reviews' ), |
|
| 90 | + 'name' => esc_html__('Reviewed By', 'to-reviews'), |
|
| 91 | 91 | 'type' => 'post_select', |
| 92 | 92 | 'use_ajax' => false, |
| 93 | 93 | 'allow_none' => true, |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $metabox['fields'][] = array( |
| 105 | 105 | 'id' => 'gallery_title', |
| 106 | - 'name' => esc_html__( 'Gallery', 'to-reviews' ), |
|
| 106 | + 'name' => esc_html__('Gallery', 'to-reviews'), |
|
| 107 | 107 | 'type' => 'title', |
| 108 | 108 | ); |
| 109 | 109 | |
@@ -114,19 +114,19 @@ discard block |
||
| 114 | 114 | 'repeatable' => true, |
| 115 | 115 | 'show_size' => false, |
| 116 | 116 | 'sortable' => true, |
| 117 | - 'string-repeat-field' => esc_html__( 'Add new image', 'tour-operator' ), |
|
| 117 | + 'string-repeat-field' => esc_html__('Add new image', 'tour-operator'), |
|
| 118 | 118 | ); |
| 119 | 119 | |
| 120 | -if ( class_exists( 'Envira_Gallery' ) ) { |
|
| 120 | +if (class_exists('Envira_Gallery')) { |
|
| 121 | 121 | $metabox['fields'][] = array( |
| 122 | 122 | 'id' => 'envira_title', |
| 123 | - 'name' => esc_html__( 'Envira Gallery', 'to-reviews' ), |
|
| 123 | + 'name' => esc_html__('Envira Gallery', 'to-reviews'), |
|
| 124 | 124 | 'type' => 'title', |
| 125 | 125 | ); |
| 126 | 126 | |
| 127 | 127 | $metabox['fields'][] = array( |
| 128 | 128 | 'id' => 'envira_gallery', |
| 129 | - 'name' => esc_html__( 'Envira Gallery', 'to-reviews' ), |
|
| 129 | + 'name' => esc_html__('Envira Gallery', 'to-reviews'), |
|
| 130 | 130 | 'type' => 'post_select', |
| 131 | 131 | 'use_ajax' => false, |
| 132 | 132 | 'allow_none' => true, |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | ), |
| 140 | 140 | ); |
| 141 | 141 | |
| 142 | - if ( class_exists( 'Envira_Videos' ) ) { |
|
| 142 | + if (class_exists('Envira_Videos')) { |
|
| 143 | 143 | $metabox['fields'][] = array( |
| 144 | 144 | 'id' => 'envira_video', |
| 145 | - 'name' => esc_html__( 'Envira Video Gallery', 'to-reviews' ), |
|
| 145 | + 'name' => esc_html__('Envira Video Gallery', 'to-reviews'), |
|
| 146 | 146 | 'type' => 'post_select', |
| 147 | 147 | 'use_ajax' => false, |
| 148 | 148 | 'allow_none' => true, |
@@ -158,13 +158,13 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | $post_types = array( |
| 161 | - 'post' => esc_html__( 'Posts', 'to-reviews' ), |
|
| 162 | - 'accommodation' => esc_html__( 'Accommodation', 'to-reviews' ), |
|
| 163 | - 'destination' => esc_html__( 'Destinations', 'to-reviews' ), |
|
| 164 | - 'tour' => esc_html__( 'Tours', 'to-reviews' ), |
|
| 161 | + 'post' => esc_html__('Posts', 'to-reviews'), |
|
| 162 | + 'accommodation' => esc_html__('Accommodation', 'to-reviews'), |
|
| 163 | + 'destination' => esc_html__('Destinations', 'to-reviews'), |
|
| 164 | + 'tour' => esc_html__('Tours', 'to-reviews'), |
|
| 165 | 165 | ); |
| 166 | 166 | |
| 167 | -foreach ( $post_types as $slug => $label ) { |
|
| 167 | +foreach ($post_types as $slug => $label) { |
|
| 168 | 168 | $metabox['fields'][] = array( |
| 169 | 169 | 'id' => $slug . '_title', |
| 170 | 170 | 'name' => $label, |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | $metabox['fields'][] = array( |
| 175 | 175 | 'id' => $slug . '_to_review', |
| 176 | - 'name' => $label . esc_html__( ' related with this review', 'to-reviews' ), |
|
| 176 | + 'name' => $label . esc_html__(' related with this review', 'to-reviews'), |
|
| 177 | 177 | 'type' => 'post_select', |
| 178 | 178 | 'use_ajax' => false, |
| 179 | 179 | 'repeatable' => true, |
@@ -188,6 +188,6 @@ discard block |
||
| 188 | 188 | ); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | -$metabox['fields'] = apply_filters( 'lsx_to_review_custom_fields', $metabox['fields'] ); |
|
| 191 | +$metabox['fields'] = apply_filters('lsx_to_review_custom_fields', $metabox['fields']); |
|
| 192 | 192 | |
| 193 | 193 | return $metabox; |
@@ -12,38 +12,38 @@ discard block |
||
| 12 | 12 | $has_single = ! lsx_to_is_single_disabled(); |
| 13 | 13 | $permalink = ''; |
| 14 | 14 | |
| 15 | -if ( $has_single ) { |
|
| 15 | +if ($has_single) { |
|
| 16 | 16 | $permalink = get_the_permalink(); |
| 17 | -} elseif ( ! is_post_type_archive( 'review' ) ) { |
|
| 17 | +} elseif ( ! is_post_type_archive('review')) { |
|
| 18 | 18 | $has_single = true; |
| 19 | - $permalink = get_post_type_archive_link( 'review' ) . '#review-' . $post->post_name; |
|
| 19 | + $permalink = get_post_type_archive_link('review') . '#review-' . $post->post_name; |
|
| 20 | 20 | } |
| 21 | 21 | ?> |
| 22 | 22 | <article <?php post_class(); ?>> |
| 23 | - <?php if ( empty( $disable_placeholder ) ) { ?> |
|
| 23 | + <?php if (empty($disable_placeholder)) { ?> |
|
| 24 | 24 | <div class="lsx-to-widget-thumb"> |
| 25 | - <?php if ( $has_single ) { ?><a href="<?php echo esc_url( $permalink ); ?>"><?php } ?> |
|
| 26 | - <?php lsx_thumbnail( 'lsx-thumbnail-wide' ); ?> |
|
| 27 | - <?php if ( $has_single ) { ?></a><?php } ?> |
|
| 25 | + <?php if ($has_single) { ?><a href="<?php echo esc_url($permalink); ?>"><?php } ?> |
|
| 26 | + <?php lsx_thumbnail('lsx-thumbnail-wide'); ?> |
|
| 27 | + <?php if ($has_single) { ?></a><?php } ?> |
|
| 28 | 28 | </div> |
| 29 | 29 | <?php } ?> |
| 30 | 30 | |
| 31 | 31 | <h4 class="lsx-to-widget-title text-center"> |
| 32 | - <?php if ( $has_single ) { ?><a href="<?php echo esc_url( $permalink ); ?>"><?php } ?> |
|
| 32 | + <?php if ($has_single) { ?><a href="<?php echo esc_url($permalink); ?>"><?php } ?> |
|
| 33 | 33 | <?php the_title(); ?> |
| 34 | - <?php if ( $has_single ) { ?></a><?php } ?> |
|
| 34 | + <?php if ($has_single) { ?></a><?php } ?> |
|
| 35 | 35 | </h4> |
| 36 | 36 | |
| 37 | - <?php if ( empty( $disable_text ) ) { ?> |
|
| 37 | + <?php if (empty($disable_text)) { ?> |
|
| 38 | 38 | <blockquote class="lsx-to-widget-blockquote"> |
| 39 | 39 | <?php |
| 40 | 40 | $excerpt = get_the_excerpt(); |
| 41 | - if ( empty( $excerpt ) || '' === $excerpt ) { |
|
| 42 | - $tooltip = apply_filters( 'get_the_excerpt', get_the_content() ); |
|
| 43 | - $tooltip = strip_tags( $tooltip ); |
|
| 44 | - echo wp_kses_post( wpautop( $tooltip ) ); |
|
| 45 | - } else { |
|
| 46 | - echo wp_kses_post( $excerpt ); |
|
| 41 | + if (empty($excerpt) || '' === $excerpt) { |
|
| 42 | + $tooltip = apply_filters('get_the_excerpt', get_the_content()); |
|
| 43 | + $tooltip = strip_tags($tooltip); |
|
| 44 | + echo wp_kses_post(wpautop($tooltip)); |
|
| 45 | + }else { |
|
| 46 | + echo wp_kses_post($excerpt); |
|
| 47 | 47 | } |
| 48 | 48 | ?> |
| 49 | 49 | </blockquote> |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | <?php |
| 54 | 54 | $meta_class = 'lsx-to-meta-data lsx-to-meta-data-'; |
| 55 | 55 | |
| 56 | - lsx_to_connected_accommodation( '<span class="' . $meta_class . 'accommodations"><span class="lsx-to-meta-data-key">' . __( 'Accommodation', 'to-reviews' ) . ':</span> ', '</span>' ); |
|
| 57 | - lsx_to_connected_tours( '<span class="' . $meta_class . 'tours"><span class="lsx-to-meta-data-key">' . __( 'Tours', 'to-reviews' ) . ':</span> ', '</span>' ); |
|
| 58 | - lsx_to_connected_destinations( '<span class="' . $meta_class . 'destinations"><span class="lsx-to-meta-data-key">' . __( 'Destinations', 'to-reviews' ) . ':</span> ', '</span>' ); |
|
| 59 | - lsx_to_connected_team( '<span class="' . $meta_class . 'team"><span class="lsx-to-meta-data-key">' . __( 'Advised by', 'to-reviews' ) . ':</span> ', '</span>' ); |
|
| 56 | + lsx_to_connected_accommodation('<span class="' . $meta_class . 'accommodations"><span class="lsx-to-meta-data-key">' . __('Accommodation', 'to-reviews') . ':</span> ', '</span>'); |
|
| 57 | + lsx_to_connected_tours('<span class="' . $meta_class . 'tours"><span class="lsx-to-meta-data-key">' . __('Tours', 'to-reviews') . ':</span> ', '</span>'); |
|
| 58 | + lsx_to_connected_destinations('<span class="' . $meta_class . 'destinations"><span class="lsx-to-meta-data-key">' . __('Destinations', 'to-reviews') . ':</span> ', '</span>'); |
|
| 59 | + lsx_to_connected_team('<span class="' . $meta_class . 'team"><span class="lsx-to-meta-data-key">' . __('Advised by', 'to-reviews') . ':</span> ', '</span>'); |
|
| 60 | 60 | ?> |
| 61 | 61 | </div> |
| 62 | 62 | |
@@ -8,33 +8,33 @@ |
||
| 8 | 8 | |
| 9 | 9 | global $lsx_to_archive, $post; |
| 10 | 10 | |
| 11 | -if ( 1 !== $lsx_to_archive ) { |
|
| 11 | +if (1 !== $lsx_to_archive) { |
|
| 12 | 12 | $lsx_to_archive = false; |
| 13 | 13 | } |
| 14 | 14 | ?> |
| 15 | 15 | |
| 16 | 16 | <?php lsx_entry_before(); ?> |
| 17 | 17 | |
| 18 | -<article id="review-<?php echo esc_attr( $post->post_name ); ?>" <?php post_class( 'lsx-to-archive-container' ); ?>> |
|
| 18 | +<article id="review-<?php echo esc_attr($post->post_name); ?>" <?php post_class('lsx-to-archive-container'); ?>> |
|
| 19 | 19 | <?php lsx_entry_top(); ?> |
| 20 | 20 | |
| 21 | - <?php if ( is_single() && false === $lsx_to_archive ) { ?> |
|
| 21 | + <?php if (is_single() && false === $lsx_to_archive) { ?> |
|
| 22 | 22 | |
| 23 | - <div <?php lsx_to_entry_class( 'entry-content' ); ?>> |
|
| 23 | + <div <?php lsx_to_entry_class('entry-content'); ?>> |
|
| 24 | 24 | <div class="lsx-to-section-inner"> |
| 25 | 25 | <h3 class="lsx-to-summary-title"><?php the_title(); ?></h3> |
| 26 | 26 | <div class="lsx-to-review-content"><?php the_content(); ?></div> |
| 27 | 27 | |
| 28 | - <h3 class="lsx-to-summary-title"><?php esc_html_e( 'Trip Details', 'to-reviews' ); ?></h3> |
|
| 28 | + <h3 class="lsx-to-summary-title"><?php esc_html_e('Trip Details', 'to-reviews'); ?></h3> |
|
| 29 | 29 | <?php lsx_to_fast_facts(); ?> |
| 30 | 30 | </div> |
| 31 | 31 | |
| 32 | 32 | <?php lsx_to_sharing(); ?> |
| 33 | 33 | </div> |
| 34 | 34 | |
| 35 | - <?php } elseif ( is_search() || empty( tour_operator()->options[ get_post_type() ]['disable_entry_text'] ) ) { ?> |
|
| 35 | + <?php } elseif (is_search() || empty(tour_operator()->options[get_post_type()]['disable_entry_text'])) { ?> |
|
| 36 | 36 | |
| 37 | - <div <?php lsx_to_entry_class( 'entry-content' ); ?>><?php |
|
| 37 | + <div <?php lsx_to_entry_class('entry-content'); ?>><?php |
|
| 38 | 38 | lsx_to_entry_content_top(); |
| 39 | 39 | the_excerpt(); |
| 40 | 40 | lsx_to_entry_content_bottom(); |
@@ -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-reviews' ); ?></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-reviews'); ?></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', 'review' ); ?> |
|
| 29 | + <?php lsx_to_content('content', 'review'); ?> |
|
| 30 | 30 | </div> |
| 31 | 31 | </div> |
| 32 | 32 | </div> |
@@ -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_review_content( 'content', 'review' ); ?> |
|
| 27 | + <div class="<?php echo esc_attr(lsx_to_archive_class('lsx-to-archive-item')); ?>"> |
|
| 28 | + <?php lsx_to_review_content('content', 'review'); ?> |
|
| 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,14 +13,14 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | // If this file is called directly, abort. |
| 16 | -if ( ! defined( 'WPINC' ) ) { |
|
| 16 | +if ( ! defined('WPINC')) { |
|
| 17 | 17 | die; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -define( 'LSX_TO_REVIEWS_PATH', plugin_dir_path( __FILE__ ) ); |
|
| 21 | -define( 'LSX_TO_REVIEWS_CORE', __FILE__ ); |
|
| 22 | -define( 'LSX_TO_REVIEWS_URL', plugin_dir_url( __FILE__ ) ); |
|
| 23 | -define( 'LSX_TO_REVIEWS_VER', '1.2.2' ); |
|
| 20 | +define('LSX_TO_REVIEWS_PATH', plugin_dir_path(__FILE__)); |
|
| 21 | +define('LSX_TO_REVIEWS_CORE', __FILE__); |
|
| 22 | +define('LSX_TO_REVIEWS_URL', plugin_dir_url(__FILE__)); |
|
| 23 | +define('LSX_TO_REVIEWS_VER', '1.2.2'); |
|
| 24 | 24 | |
| 25 | 25 | /* ======================= Below is the Plugin Class init ========================= */ |
| 26 | 26 | |