WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/01/2020 02:24:42 PM (18 months ago)
Author:
desrosj
Message:

External Libraries: Update the SimplePie library to the latest version (1.5.5).

This brings SimplePie in sync with the most up to date version, 1.5.5.

This update brings many bug fixes, small enhancements, and PHP compatibility fixes for newer versions of PHP.

For a full list of changes, see https://github.com/simplepie/simplepie/blob/master/CHANGELOG.md#155-may-1-2020.

Props dshanske, slushman, etruel, wpshades, dmenard, desrosj, hareesh-pillai, stevenkword, jrf, Ipstenu, johnbillion.
Fixes #36669.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/SimplePie/Category.php

    r22798 r47733  
    66 * Takes the hard work out of managing a complete RSS/Atom solution.
    77 *
    8  * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
     8 * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
    99 * All rights reserved.
    1010 *
     
    3434 *
    3535 * @package SimplePie
    36  * @version 1.3.1
    37  * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
     36 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
    3837 * @author Ryan Parman
    39  * @author Geoffrey Sneddon
     38 * @author Sam Sneddon
    4039 * @author Ryan McCue
    4140 * @link http://simplepie.org/ SimplePie
     
    5857     * Category identifier
    5958     *
    60      * @var string
     59     * @var string|null
    6160     * @see get_term
    6261     */
     
    6665     * Categorization scheme identifier
    6766     *
    68      * @var string
     67     * @var string|null
    6968     * @see get_scheme()
    7069     */
     
    7473     * Human readable label
    7574     *
    76      * @var string
     75     * @var string|null
    7776     * @see get_label()
    7877     */
     
    8079
    8180    /**
     81     * Category type
     82     *
     83     * category for <category>
     84     * subject for <dc:subject>
     85     *
     86     * @var string|null
     87     * @see get_type()
     88     */
     89    var $type;
     90
     91    /**
    8292     * Constructor, used to input the data
    8393     *
    84      * @param string $term
    85      * @param string $scheme
    86      * @param string $label
     94     * @param string|null $term
     95     * @param string|null $scheme
     96     * @param string|null $label
     97     * @param string|null $type
    8798     */
    88     public function __construct($term = null, $scheme = null, $label = null)
     99    public function __construct($term = null, $scheme = null, $label = null, $type = null)
    89100    {
    90101        $this->term = $term;
    91102        $this->scheme = $scheme;
    92103        $this->label = $label;
     104        $this->type = $type;
    93105    }
    94106
     
    111123    public function get_term()
    112124    {
    113         if ($this->term !== null)
    114         {
    115             return $this->term;
    116         }
    117         else
    118         {
    119             return null;
    120         }
     125        return $this->term;
    121126    }
    122127
     
    128133    public function get_scheme()
    129134    {
    130         if ($this->scheme !== null)
    131         {
    132             return $this->scheme;
    133         }
    134         else
    135         {
    136             return null;
    137         }
     135        return $this->scheme;
    138136    }
    139137
     
    141139     * Get the human readable label
    142140     *
     141     * @param bool $strict
    143142     * @return string|null
    144143     */
    145     public function get_label()
     144    public function get_label($strict = false)
    146145    {
    147         if ($this->label !== null)
    148         {
    149             return $this->label;
    150         }
    151         else
     146        if ($this->label === null && $strict !== true)
    152147        {
    153148            return $this->get_term();
    154149        }
     150        return $this->label;
     151    }
     152
     153    /**
     154     * Get the category type
     155     *
     156     * @return string|null
     157     */
     158    public function get_type()
     159    {
     160        return $this->type;
    155161    }
    156162}
Note: See TracChangeset for help on using the changeset viewer.