admin管理员组

文章数量:1310306

I want to use the link parameter from URL as one query_var. If I visit the page where [flipwoo] is in, for example:
/?link=/?download_file=1953&order=wc_order_zHOH4RI97k9mR&email=test%40gmail&key=91c44b50-6922-4976-ac57-6d499136eead
the following is echoed:
/?download_file=1953
but I want the whole URL after ?link= to be echoed:
/?download_file=1953&order=wc_order_zHOH4RI97k9mR&email=test%40gmail&key=91c44b50-6922-4976-ac57-6d499136eead
Where is the mistake?

function themeslug_query_vars( $qvars ) {
    $qvars[] = 'link';
    return $qvars;
}
add_filter( 'query_vars', 'themeslug_query_vars' );

function get_woolink() {
    $linked = get_query_var( 'link', 1 );
    echo $linked;
}

add_shortcode('flipwoo', 'get_woolink');

本文标签: functionsqueryvars treat as single var from URL