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
版权声明:本文标题:functions - query_vars treat as single var from URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741828918a2399814.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论