--- a/wp/wp-includes/SimplePie/Category.php Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-includes/SimplePie/Category.php Tue Dec 15 13:49:49 2020 +0100
@@ -5,7 +5,7 @@
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@@ -33,10 +33,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
* @author Ryan Parman
- * @author Geoffrey Sneddon
+ * @author Sam Sneddon
* @author Ryan McCue
* @link http://simplepie.org/ SimplePie
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
@@ -57,7 +56,7 @@
/**
* Category identifier
*
- * @var string
+ * @var string|null
* @see get_term
*/
var $term;
@@ -65,7 +64,7 @@
/**
* Categorization scheme identifier
*
- * @var string
+ * @var string|null
* @see get_scheme()
*/
var $scheme;
@@ -73,23 +72,36 @@
/**
* Human readable label
*
- * @var string
+ * @var string|null
* @see get_label()
*/
var $label;
/**
+ * Category type
+ *
+ * category for <category>
+ * subject for <dc:subject>
+ *
+ * @var string|null
+ * @see get_type()
+ */
+ var $type;
+
+ /**
* Constructor, used to input the data
*
- * @param string $term
- * @param string $scheme
- * @param string $label
+ * @param string|null $term
+ * @param string|null $scheme
+ * @param string|null $label
+ * @param string|null $type
*/
- public function __construct($term = null, $scheme = null, $label = null)
+ public function __construct($term = null, $scheme = null, $label = null, $type = null)
{
$this->term = $term;
$this->scheme = $scheme;
$this->label = $label;
+ $this->type = $type;
}
/**
@@ -110,14 +122,7 @@
*/
public function get_term()
{
- if ($this->term !== null)
- {
- return $this->term;
- }
- else
- {
- return null;
- }
+ return $this->term;
}
/**
@@ -127,31 +132,32 @@
*/
public function get_scheme()
{
- if ($this->scheme !== null)
- {
- return $this->scheme;
- }
- else
- {
- return null;
- }
+ return $this->scheme;
}
/**
* Get the human readable label
*
+ * @param bool $strict
* @return string|null
*/
- public function get_label()
+ public function get_label($strict = false)
{
- if ($this->label !== null)
- {
- return $this->label;
- }
- else
+ if ($this->label === null && $strict !== true)
{
return $this->get_term();
}
+ return $this->label;
+ }
+
+ /**
+ * Get the category type
+ *
+ * @return string|null
+ */
+ public function get_type()
+ {
+ return $this->type;
}
}