Skip to content

Commit

Permalink
Merge pull request #112 from lightspeeddevelopment/fix/fixing-php-errors
Browse files Browse the repository at this point in the history
Fixing minor PHP errors
  • Loading branch information
jacquesvdhorst authored Mar 27, 2020
2 parents 4d31e3d + 403c3a4 commit 63d9b5f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion assets/css/maps/style.css.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion assets/css/scss/_customizer-to-body-colours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
.lsx-to-section:nth-of-type(odd) & { background-color: #FFF; }
.lsx-to-section:nth-of-type(even) & { background-color: $bg; }

a.moretag {
a.moretag,
a.moretag:visited {
background-color: $link;
color: #FFF;

Expand Down
4 changes: 2 additions & 2 deletions assets/css/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,9 @@ body.single-tour-operator .modal-body article .entry-content .moretag { width: 2

.lsx-to-section:nth-of-type(even) .lsx-to-widget-item-wrap .lsx-to-widget-content { background-color: #F6F6F6; }

.lsx-to-widget-item-wrap .lsx-to-widget-content a.moretag { background-color: #1098AD; color: #FFF; }
.lsx-to-widget-item-wrap .lsx-to-widget-content a.moretag, .lsx-to-widget-item-wrap .lsx-to-widget-content a.moretag:visited { background-color: #1098AD; color: #FFF; }

.lsx-to-widget-item-wrap .lsx-to-widget-content a.moretag:hover { background-color: #F7AE00; color: #FFF; }
.lsx-to-widget-item-wrap .lsx-to-widget-content a.moretag:hover, .lsx-to-widget-item-wrap .lsx-to-widget-content a.moretag:visited:hover { background-color: #F7AE00; color: #FFF; }

.lsx-to-widget-item-wrap .lsx-to-widget-title > a:not(.btn), .lsx-to-widget-item-wrap .lsx-to-widget-title > a:not(.btn):active, .lsx-to-widget-item-wrap .lsx-to-widget-title > a:not(.btn):visited { color: #4A4A4A; }

Expand Down
4 changes: 2 additions & 2 deletions assets/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
- Fix output escaping issues.
- Fixed issue `PHP Deprecated: dbx_post_advanced is deprecated since version 3.7.0! Use add_meta_boxes instead`.
- Fixed Slick slider bug.
- Fixed PHP error `Undefined variable: connection`.
- Fixed PHP error `preg_match() expects parameter 2 to be string, array given`.
- Fixed PHP error `Undefined variable: accommodation_id`.
- Fixed PHP error `Undefined variable: temp_id`.

### Security
- Sanitizing widget fields.
Expand Down
5 changes: 4 additions & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ function lsx_to_itinerary_has_thumbnail() {
*/
function lsx_to_itinerary_thumbnail() {
global $tour_itinerary;

$accommodation_id = '';
$temp_id = '';
if ( $tour_itinerary && $tour_itinerary->has_itinerary && false !== $tour_itinerary->itinerary ) {
$thumbnail_src = false;

Expand Down Expand Up @@ -241,7 +242,9 @@ function lsx_to_itinerary_thumbnail() {

// If it is the last day of the itinerary and there is no image, then use the featured image of the tour.
if ( $tour_itinerary->index === $tour_itinerary->count && ( false === $thumbnail_src || '' === $thumbnail_src ) ) {

$temp_id = get_post_thumbnail_id( $accommodation_id );

if ( false !== $temp_id ) {
$current_image_id = $tour_itinerary->find_next_image( $accommodation_id );
$temp_src_array = wp_get_attachment_image_src( $current_image_id, 'lsx-thumbnail-square' );
Expand Down
7 changes: 4 additions & 3 deletions includes/template-tags/destination.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,17 @@ function destination_children( $parent_id ) {
) );
$meta_class = 'lsx-to-meta-data lsx-to-meta-data-';
if ( $child->have_posts() ) {
$list_destinations = array();

$list_destinations = array();
$final_list_destinations = '';
echo '<span class="' . esc_attr( $meta_class ) . 'regions"><span class="lsx-to-meta-data-key">' . esc_html__( 'Regions', 'tour-operator' ) . ':</span>';
while ( $child->have_posts() ) {
$child->the_post();
$childtitle = get_the_title();
$childlink = get_the_permalink();
$list_destinations[] = '<a href="' . esc_attr( $childlink ) . '"> ' . esc_attr( $childtitle ) . '</a>';
}
echo implode( ', ', wp_kses_post( $list_destinations ) );
$final_list_destinations = implode( ', ', $list_destinations );
echo wp_kses_post( $final_list_destinations );
} else {
echo '<span class="' . esc_attr( $meta_class ) . 'regions"><span class="lsx-to-meta-data-key">' . esc_html__( 'Country', 'tour-operator' ) . ':</span>';
$parent_title = get_the_title( wp_get_post_parent_id( $theid ) );
Expand Down
3 changes: 3 additions & 0 deletions templates/content-map-marker.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

<div class="entry-content">
<?php
if ( empty( $connection ) || '' === $connection || 'undefined' === $connection ) {
$connection = '';
}
$excerpt = get_the_excerpt( $connection );
if ( empty( $excerpt ) || '' === $excerpt ) {
$tooltip = apply_filters( 'get_the_excerpt', get_the_content() );
Expand Down

0 comments on commit 63d9b5f

Please sign in to comment.