Changeset 17613
- Timestamp:
- 04/06/2011 05:44:29 PM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cache.php
r17604 r17613 351 351 $this->cache_hits += 1; 352 352 if ( is_object($this->cache[$group][$id]) ) 353 return wp_clone($this->cache[$group][$id]);353 return clone $this->cache[$group][$id]; 354 354 else 355 355 return $this->cache[$group][$id]; … … 427 427 428 428 if ( is_object($data) ) 429 $data = wp_clone($data);429 $data = clone $data; 430 430 431 431 $this->cache[$group][$id] = $data; -
trunk/wp-includes/comment.php
r17053 r17613 1395 1395 } 1396 1396 1397 $comment_old = wp_clone(get_comment($comment_id));1397 $comment_old = clone get_comment($comment_id); 1398 1398 1399 1399 if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { -
trunk/wp-includes/deprecated.php
r17541 r17613 2603 2603 } 2604 2604 2605 2606 /** 2607 * Copy an object. 2608 * 2609 * Returns a cloned copy of an object. 2610 * 2611 * @since 2.7.0 2612 * @deprecated 3.2 2613 * 2614 * @param object $object The object to clone 2615 * @return object The cloned object 2616 */ 2617 function wp_clone( $object ) { 2618 _deprecated_function( __FUNCTION__, '3.2' ); 2619 2620 return clone $object; 2621 } -
trunk/wp-includes/functions.php
r17603 r17613 510 510 511 511 if ( is_object($newvalue) ) 512 $newvalue = wp_clone($newvalue);512 $newvalue = clone $newvalue; 513 513 514 514 $newvalue = sanitize_option( $option, $newvalue ); … … 591 591 wp_protect_special_option( $option ); 592 592 593 /* 594 * FIXME the next two lines of code are not necessary and should be removed. 595 * @see http://core.trac.wordpress.org/ticket/13480 596 */ 593 597 if ( is_object($value) ) 594 $value = wp_clone($value);598 $value = clone $value; 595 599 596 600 $value = sanitize_option( $option, $value ); -
trunk/wp-includes/load.php
r17575 r17613 555 555 556 556 /** 557 * Copy an object.558 *559 * Returns a cloned copy of an object.560 *561 * @since 2.7.0562 *563 * @param object $object The object to clone564 * @return object The cloned object565 */566 function wp_clone( $object ) {567 static $can_clone;568 if ( !isset( $can_clone ) )569 $can_clone = version_compare( phpversion(), '5.0', '>=' );570 571 return $can_clone ? clone( $object ) : $object;572 }573 574 /**575 557 * Whether the current request is for a network or blog admin page 576 558 *
Note: See TracChangeset
for help on using the changeset viewer.