Make WordPress Core

Ticket #32246: 32246.2.diff

File 32246.2.diff, 1004 bytes (added by brentvr, 9 years ago)
  • src/wp-includes/functions.php

     
    680680 * value. Additional values provided are expected to be encoded appropriately
    681681 * with urlencode() or rawurlencode().
    682682 *
     683 *    // Both examples will output: http://www.example.com/?key=value
     684 *    $param1 = 'key';
     685 *    $param2 = 'value';
     686 *    $param3 = 'http://www.example.com';
     687 *
     688 *    // Parameters as separate arguments
     689 *    add_query_arg( $param1, $param2, $param3 );
     690 *
     691 *    // Parameters as array of key => value pairs
     692 *    add_query_arg( array( $param1 => $param2 ), $param3 ); // Where param1 = 'key'
     693 *
     694 * Reminder: The return value of this function should be escaped on output to
     695 * prevent exposure to XXS vulnerabilities using esc_url() or similar.
     696 *
    683697 * @since 1.5.0
    684698 *
    685699 * @param string|array $param1 Either newkey or an associative_array.