Plugin Directory

Changeset 2552591


Ignore:
Timestamp:
06/23/2021 10:16:28 AM (5 years ago)
Author:
woorise
Message:

Update the way URL parameters are passed to iframe

Location:
woorise/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • woorise/trunk/includes/class-woorise-embed.php

    r2552145 r2552591  
    9898  public function get_embed( $url ) {
    9999
    100     $current_url = set_url_scheme( 'http://' . wp_unslash( $_SERVER['HTTP_HOST'] ) . strtok( wp_unslash( $_SERVER['REQUEST_URI'] ), '?' ) );
     100    $current_url = set_url_scheme( 'http://' . wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ) );
    101101
    102     $src = add_query_arg( [
    103       'u' => remove_query_arg( 'preview_nonce', $current_url ),
     102    $args = [
     103      'u' => strtok( $current_url, '?' ),
    104104      't' => time(),
    105     ], $url );
     105    ];
    106106
    107     if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
    108       $src .= '&' . wp_unslash( $_SERVER['QUERY_STRING'] );
     107    $current_query = wp_parse_url( $current_url, PHP_URL_QUERY );
     108
     109    if ( $current_query ) {
     110      parse_str( $current_query, $current_pieces );
     111      unset( $current_pieces['preview_nonce'] );
     112      $args = array_merge( $args, $current_pieces );
    109113    }
     114
     115    $src = add_query_arg( $args, $url );
    110116
    111117    $output = sprintf(
  • woorise/trunk/readme.txt

    r2552145 r2552591  
    66Tested up to: 5.7.2
    77Requires PHP: 7.0
    8 Stable tag: 1.3.2
     8Stable tag: 1.3.3
    99License: GPL2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • woorise/trunk/woorise.php

    r2552145 r2552591  
    55 * Plugin URI: https://woorise.com/
    66 * Description: Create viral giveaways & contests, engaging forms, landing pages, surveys, quizzes, collect payments and more.
    7  * Version: 1.3.2
     7 * Version: 1.3.3
    88 * Requires at least: 5.6
    99 * Author: Woorise
Note: See TracChangeset for help on using the changeset viewer.