View difference between Paste ID: yVRsS2CA and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | function add_query_arg() { |
2 | $ret = ''; | |
3 | ||
4 | if ( is_array( func_get_arg(0) ) ) { | |
5 | if ( @func_num_args() < 2 || false === @func_get_arg( 1 ) ) | |
6 | if ( get_bloginfo('url') != '' ) | |
7 | $uri = bloginfo('url') . $_SERVER['REQUEST_URI']; | |
8 | else | |
9 | $uri = $_SERVER['REQUEST_URI']; | |
10 | else | |
11 | $uri = @func_get_arg( 1 ); | |
12 | } else { | |
13 | if ( @func_num_args() < 3 || false === @func_get_arg( 2 ) ) | |
14 | if ( get_bloginfo('url') != '' ) | |
15 | $uri = bloginfo('url') . $_SERVER['REQUEST_URI']; | |
16 | else | |
17 | $uri = $_SERVER['REQUEST_URI']; | |
18 | else | |
19 | $uri = @func_get_arg( 2 ); | |
20 | } |