WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/06/2011 05:44:29 PM (11 years ago)
Author:
ryan
Message:

Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/load.php

    r17575 r17613  
    555555
    556556/**
    557  * Copy an object.
    558  *
    559  * Returns a cloned copy of an object.
    560  *
    561  * @since 2.7.0
    562  *
    563  * @param object $object The object to clone
    564  * @return object The cloned object
    565  */
    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 /**
    575557 * Whether the current request is for a network or blog admin page
    576558 *
Note: See TracChangeset for help on using the changeset viewer.