Ticket #4467: 4467b.diff
| File 4467b.diff, 3.3 KB (added by mdawaffe, 5 years ago) |
|---|
-
wp-includes/formatting.php
1188 1188 return $value; 1189 1189 } 1190 1190 1191 function wp_parse_str( $string, &$array ) { 1192 parse_str( $string, $array ); 1193 if ( get_magic_quotes_gpc() ) 1194 $array = stripslashes_deep( $array ); // parse_str() adds slashes if magicquotes is on. See: http://php.net/parse_str 1195 $array = apply_filters( 'wp_parse_str', $array ); 1196 } 1197 1191 1198 ?> -
wp-includes/general-template.php
968 968 echo $output; 969 969 } 970 970 971 function paginate_links( $arg = '' ) { 972 if ( is_array($arg) ) 973 $a = &$arg; 974 else 975 parse_str($arg, $a); 971 function paginate_links( $args = '' ) { 972 $defaults = array( 973 'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below) 974 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number 975 'total' => 1, 976 'current' => 0, 977 'show_all' => false, 978 'prev_next' => true, 979 'prev_text' => __('« Previous'), 980 'next_text' => __('Next »'), 981 'end_size' => 1, // How many numbers on either end including the end 982 'mid_size' => 2, // How many numbers to either side of current not including current 983 'type' => 'plain', 984 'add_args' => false // array of query args to aadd 985 ); 976 986 977 // Defaults 978 $base = '%_%'; // http://example.com/all_posts.php%_% : %_% is replaced by format (below) 979 $format = '?page=%#%'; // ?page=%#% : %#% is replaced by the page number 980 $total = 1; 981 $current = 0; 982 $show_all = false; 983 $prev_next = true; 984 $prev_text = __('« Previous'); 985 $next_text = __('Next »'); 986 $end_size = 1; // How many numbers on either end including the end 987 $mid_size = 2; // How many numbers to either side of current not including current 988 $type = 'plain'; 989 $add_args = false; // array of query args to aadd 987 $args = wp_parse_args( $args, $defaults ); 988 extract($args, EXTR_SKIP); 990 989 991 extract($a);992 993 990 // Who knows what else people pass in $args 994 991 $total = (int) $total; 995 992 if ( $total < 2 ) -
wp-includes/functions.php
604 604 $query = $uri; 605 605 } 606 606 607 parse_str($query, $qs); 608 if ( get_magic_quotes_gpc() ) 609 $qs = stripslashes_deep($qs); // parse_str() adds slashes if magicquotes is on. See: http://php.net/parse_str 607 wp_parse_str($query, $qs); 610 608 $qs = urlencode_deep($qs); 611 609 if ( is_array(func_get_arg(0)) ) { 612 610 $kayvees = func_get_arg(0); … … 1288 1286 } 1289 1287 1290 1288 function wp_parse_args( $args, $defaults = '' ) { 1291 if ( is_array( $args ) ) {1289 if ( is_array( $args ) ) 1292 1290 $r =& $args; 1293 } else { 1294 parse_str( $args, $r ); 1295 if ( get_magic_quotes_gpc() ) { 1296 $r = stripslashes_deep( $r ); 1297 } 1298 } 1291 else 1292 wp_parse_str( $args, $r ); 1299 1293 1300 if ( is_array( $defaults ) ) {1294 if ( is_array( $defaults ) ) 1301 1295 return array_merge( $defaults, $r ); 1302 } else {1296 else 1303 1297 return $r; 1304 }1305 1298 } 1306 1299 1307 1300 function wp_maybe_load_widgets() { … … 1324 1317 while ( @ob_end_flush() ); 1325 1318 } 1326 1319 1327 ?> 1328 No newline at end of file 1320 ?>
