wppaste
WordPress

Author

Source
wp-includes/SimplePie/src/Author.php:17
Manages all author-related data

Description

Used by Item::get_author() and SimplePie::get_authors()

This class can be overloaded with SimplePie::set_author_class()

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 3

$nameSimplePie\?stringpublic
Author's name
$emailSimplePie\?stringpublic
Author's email address

Methods · 5

Source code

class Author{    /**     * Author's name     *     * @var ?string     * @see get_name()     */    public $name;     /**     * Author's link     *     * @var ?string     * @see get_link()     */    public $link;     /**     * Author's email address     *     * @var ?string     * @see get_email()     */    public $email;     /**     * Constructor, used to input the data     */    public function __construct(        ?string $name = null,        ?string $link = null,        ?string $email = null    ) {        $this->name = $name;        $this->link = $link;        $this->email = $email;    }     /**     * String-ified version     *     * @return string     */    public function __toString()    {        // There is no $this->data here        return md5(serialize($this));    }     /**     * Author's name     *     * @return string|null     */    public function get_name()    {        if ($this->name !== null) {            return $this->name;        }         return null;    }     /**     * Author's link     *     * @return string|null     */    public function get_link()    {        if ($this->link !== null) {            return $this->link;        }         return null;    }     /**     * Author's email address

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, from src/wp-includes/SimplePie/src/Author.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.