Make WordPress Core

Ticket #16920: 16920.3.patch

File 16920.3.patch, 1.3 KB (added by hakre, 13 years ago)

deprecate wp_clone()

  • wp-includes/load.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk bare
     
    552552}
    553553
    554554/**
    555  * Copy an object.
    556  *
    557  * Returns a cloned copy of an object.
    558  *
    559  * @since 2.7.0
    560  *
    561  * @param object $object The object to clone
    562  * @return object The cloned object
    563  */
    564 function wp_clone( $object ) {
    565         static $can_clone;
    566         if ( !isset( $can_clone ) )
    567                 $can_clone = version_compare( phpversion(), '5.0', '>=' );
    568 
    569         return $can_clone ? clone( $object ) : $object;
    570 }
    571 
    572 /**
    573555 * Whether the current request is for a network or blog admin page
    574556 *
    575557 * Does not inform on whether the user is an admin! Use capability checks to
  • wp-includes/deprecated.php

     
    26022602        return true;
    26032603}
    26042604
     2605/**
     2606 * Copy an object.
     2607 *
     2608 * Returns a cloned copy of an object.
     2609 *
     2610 * @since 2.7.0
     2611 * @deprecated 3.2
     2612 *
     2613 * @param object $object The object to clone
     2614 * @return object The cloned object
     2615 */
     2616function wp_clone( $object ) {
     2617        _deprecated_function( __FUNCTION__, '3.1', 'clone()' );
     2618        return clone( $object );
     2619}
     2620