Plugin Directory


Ignore:
Timestamp:
09/13/2026 12:06:51 PM (6 weeks ago)
Author:
thesiim
Message:

Version 1.77.0 release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • seatreg/trunk/php/seatreg_shortcode.php

    r3641857 r3693621  
    3232        }
    3333       
    34         $roomQueryParam = '';
     34        $queryArgs = array(
     35            'seatreg' => 'registration',
     36            'c' => $atts['code'],
     37        );
    3538
    3639        if ( !empty($atts['room']) ) {
    … …  
    4750            }
    4851
    49             $roomQueryParam = '&room=' . urlencode( $atts['room'] );
     52            $queryArgs['room'] = $atts['room'];
    5053        }
    5154
    52         $seatregRegistrationUrl = esc_url(SeatregLinksService::getRegistrationURL() . "?seatreg=registration&c=". $atts['code'] . $roomQueryParam);
     55        $queryArgs['page_id'] = SEATREG_PAGE_ID;
     56
     57        //Added as arguments, as the address may already carry the language the page is read in
     58        $seatregRegistrationUrl = esc_url( add_query_arg( $queryArgs, SeatregLinksService::getRegistrationURLInCurrentLanguage() ) );
    5359        $height = (int) esc_attr($atts['height']);
    5460        $mobileHeight = (int) esc_attr($atts['mobile_height']);
    5561        $breakpoint = (int) esc_attr($atts['mobile_max_width']);
    56         $pageId = esc_attr(SEATREG_PAGE_ID);
    5762        $iframeId = esc_attr('seatreg-shortcode-' . uniqid());
    5863        $styleHandle = 'seatreg-inline-' . $iframeId;
    … …  
    7984        wp_add_inline_style($styleHandle, $css);
    8085
    81         return "<iframe id='{$iframeId}' src='{$seatregRegistrationUrl}&page_id={$pageId}'></iframe>";
     86        return "<iframe id='{$iframeId}' src='{$seatregRegistrationUrl}'></iframe>";
    8287    }
    8388    add_shortcode( 'seatreg', 'seatreg_shortcode' );
Note: See TracChangeset for help on using the changeset viewer.