WordPress.org

Make WordPress Core

Changeset 46377


Ignore:
Timestamp:
10/03/2019 02:47:17 PM (2 weeks ago)
Author:
desrosj
Message:

Docs: Add missing @deprecated tags.

Follow up to [46205-46206,46208].

Props jrf.
See #47699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-json.php

    r46205 r46377  
    125125    * constructs a new JSON instance
    126126    *
     127    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     128    *
    127129    * @param    int     $use    object behavior flags; combine with boolean-OR
    128130    *
     
    155157    /**
    156158     * PHP4 constructor.
     159     *
     160     * @deprecated 5.3.0 Use __construct() instead.
     161     *
     162     * @see __construct()
    157163     */
    158164    public function Services_JSON( $use = 0 ) {
     
    172178    * that lack the multibye string extension.
    173179    *
     180    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     181    *
    174182    * @param    string  $utf16  UTF-16 character
    175183    * @return   string  UTF-8 character
     
    217225    * provides a slower PHP-only method for installations
    218226    * that lack the multibyte string extension.
     227    *
     228    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
    219229    *
    220230    * @param    string  $utf8   UTF-8 character
     
    260270    * encodes an arbitrary variable into JSON format (and sends JSON Header)
    261271    *
     272    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     273    *
    262274    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
    263275    *                           see argument 1 to Services_JSON() above for array-parsing behavior.
     
    277289    /**
    278290    * encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!)
     291    *
     292    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
    279293    *
    280294    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
     
    300314    /**
    301315    * PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format
     316    *
     317    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
    302318    *
    303319    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
     
    546562    * array-walking function for use in generating JSON-formatted name-value pairs
    547563    *
     564    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     565    *
    548566    * @param    string  $name   name of key to use
    549567    * @param    mixed   $value  reference to an array element to be encoded
     
    568586    * reduce a string by removing leading and trailing comments and whitespace
    569587    *
     588    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     589    *
    570590    * @param    $str    string      string value to strip of comments and whitespace
    571591    *
     
    596616   /**
    597617    * decodes a JSON string into appropriate variable
     618    *
     619    * @deprecated 5.3.0 Use the PHP native JSON extension instead.
    598620    *
    599621    * @param    string  $str    JSON-formatted string
     
    887909
    888910    /**
     911     * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     912     *
    889913     * @todo Ultimately, this should just call PEAR::isError()
    890914     */
     
    904928   
    905929    /**
    906     * Calculates length of string in bytes
    907     * @param string
    908     * @return integer length
    909     */
     930     * Calculates length of string in bytes
     931     *
     932     * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     933     *
     934     * @param string
     935     * @return integer length
     936     */
    910937    function strlen8( $str )
    911938    {
     
    919946   
    920947    /**
    921     * Returns part of a string, interpreting $start and $length as number of bytes.
    922     * @param string
    923     * @param integer start
    924     * @param integer length
    925     * @return integer length
    926     */
     948     * Returns part of a string, interpreting $start and $length as number of bytes.
     949     *
     950     * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     951     *
     952     * @param string
     953     * @param integer start
     954     * @param integer length
     955     * @return integer length
     956     */
    927957    function substr8( $string, $start, $length=false )
    928958    {
     
    944974    class Services_JSON_Error extends PEAR_Error
    945975    {
     976        /**
     977         * PHP5 constructor.
     978         *
     979         * @deprecated 5.3.0 Use the PHP native JSON extension instead.
     980         */
    946981        function __construct($message = 'unknown error', $code = null,
    947982                                     $mode = null, $options = null, $userinfo = null)
     
    952987        }
    953988
     989        /**
     990         * PHP4 constructor.
     991         *
     992         * @deprecated 5.3.0 Use __construct() instead.
     993         *
     994         * @see __construct()
     995         */
    954996        public function Services_JSON_Error($message = 'unknown error', $code = null,
    955997                                     $mode = null, $options = null, $userinfo = null) {
     
    9681010        /**
    9691011         * PHP5 constructor.
     1012         *
     1013         * @deprecated 5.3.0 Use the PHP native JSON extension instead.
    9701014         */
    9711015        function __construct( $message = 'unknown error', $code = null,
     
    9771021        /**
    9781022         * PHP4 constructor.
     1023         *
     1024         * @deprecated 5.3.0 Use __construct() instead.
     1025         *
     1026         * @see __construct()
    9791027         */
    9801028        public function Services_JSON_Error( $message = 'unknown error', $code = null,
Note: See TracChangeset for help on using the changeset viewer.