### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
503 | 503 | * @param string|array $data |
504 | 504 | * @return string query safe string |
505 | 505 | */ |
506 | | function escape($data) { |
507 | | if ( is_array($data) ) { |
508 | | foreach ( (array) $data as $k => $v ) { |
509 | | if ( is_array($v) ) |
510 | | $data[$k] = $this->escape( $v ); |
511 | | else |
512 | | $data[$k] = $this->_weak_escape( $v ); |
513 | | } |
514 | | } else { |
515 | | $data = $this->_weak_escape( $data ); |
516 | | } |
517 | | |
518 | | return $data; |
| 506 | function escape( $data ) { |
| 507 | return is_array( $data ) ? array_map( array( &$this, 'escape' ), $data ) : addslashes( $data ); |
519 | 508 | } |
520 | 509 | |
521 | 510 | /** |