mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
git-svn-id: https://develop.svn.wordpress.org/trunk@17613 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -553,24 +553,6 @@ function shutdown_action_hook() {
|
||||
wp_cache_close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy an object.
|
||||
*
|
||||
* Returns a cloned copy of an object.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param object $object The object to clone
|
||||
* @return object The cloned object
|
||||
*/
|
||||
function wp_clone( $object ) {
|
||||
static $can_clone;
|
||||
if ( !isset( $can_clone ) )
|
||||
$can_clone = version_compare( phpversion(), '5.0', '>=' );
|
||||
|
||||
return $can_clone ? clone( $object ) : $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the current request is for a network or blog admin page
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user