From 9138eb61be327411e9b3052cb266d3c5afb526b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 24 Nov 2024 03:56:08 +0000 Subject: [PATCH] Generate stubs for WordPress 6.7.0 --- release-latest-versions.sh | 2 +- source/composer.json | 2 +- wordpress-stubs.php | 6567 ++++++++++++++++++++++++++---------- 3 files changed, 4793 insertions(+), 1778 deletions(-) diff --git a/release-latest-versions.sh b/release-latest-versions.sh index 38d6520..3adfea6 100755 --- a/release-latest-versions.sh +++ b/release-latest-versions.sh @@ -37,7 +37,7 @@ CORE_JSON="$(wget -q -O- "https://packagist.org/packages/johnpbloch/wordpress-co #for MINOR in 4.7 4.8 4.9 \ # 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 \ for MINOR in \ - 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7; do + 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9; do # Find latest version printf -v JQ_FILTER '.package.versions[].version | select(test("^%s\\\\.%s\\\\.\\\\d+$"))' "${MINOR%.*}" "${MINOR#*.}" LATEST_FIVE="$(jq -r "$JQ_FILTER" <<<"$CORE_JSON" | sort -t "." -k 3 -g | tail -n 5)" diff --git a/source/composer.json b/source/composer.json index 6c3d543..17cff77 100644 --- a/source/composer.json +++ b/source/composer.json @@ -7,7 +7,7 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-sodium": "*", - "johnpbloch/wordpress": "6.6.2" + "johnpbloch/wordpress": "6.7.0" }, "minimum-stability": "stable", "config": { diff --git a/wordpress-stubs.php b/wordpress-stubs.php index 84d1752..02f8f50 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -940,6 +940,10 @@ public function delete_temp_backup(array $temp_backups = array()) * It allows for WordPress to upgrade itself in combination with * the wp-admin/includes/update-core.php file. * + * Note: Newly introduced functions and methods cannot be used here. + * All functions must be present in the previous version being upgraded from + * as this file is used there too. + * * @since 2.8.0 * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. * @@ -1020,15 +1024,15 @@ class Custom_Background /** * Callback for administration header. * - * @var callable * @since 3.0.0 + * @var callable */ public $admin_header_callback; /** * Callback for header div. * - * @var callable * @since 3.0.0 + * @var callable */ public $admin_image_div_callback; /** @@ -1139,22 +1143,22 @@ class Custom_Image_Header /** * Callback for administration header. * - * @var callable * @since 2.1.0 + * @var callable */ public $admin_header_callback; /** * Callback for header div. * - * @var callable * @since 3.0.0 + * @var callable */ public $admin_image_div_callback; /** * Holds default headers. * - * @var array * @since 3.0.0 + * @var array */ public $default_headers = array(); /** @@ -2404,8 +2408,6 @@ public function upgrade($plugin, $args = array()) * @since 2.8.0 * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. * - * @global string $wp_version The WordPress version string. - * * @param string[] $plugins Array of paths to plugin files relative to the plugins directory. * @param array $args { * Optional. Other arguments for upgrading several plugins at once. @@ -2428,7 +2430,6 @@ public function bulk_upgrade($plugins, $args = array()) * @since 3.3.0 * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. - * @global string $wp_version The WordPress version string. * * @param string $source The path to the downloaded package source. * @return string|WP_Error The source as passed, or a WP_Error object on failure. @@ -2739,8 +2740,6 @@ public function upgrade($theme, $args = array()) * @since 3.0.0 * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. * - * @global string $wp_version The WordPress version string. - * * @param string[] $themes Array of the theme slugs. * @param array $args { * Optional. Other arguments for upgrading several themes at once. Default empty array. @@ -2764,7 +2763,6 @@ public function bulk_upgrade($themes, $args = array()) * @since 3.3.0 * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. - * @global string $wp_version The WordPress version string. * * @param string $source The path to the downloaded package source. * @return string|WP_Error The source as passed, or a WP_Error object on failure. @@ -3216,6 +3214,7 @@ public function end_lvl(&$output, $depth = 0, $args = \null) * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added. * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id` * to match parent class for PHP 8 named parameter support. + * @since 6.7.0 Removed redundant title attributes. * * @see Walker::start_el() * @@ -4047,7 +4046,7 @@ public function display_rows_or_placeholder() { } /** - * Generates the table rows. + * Generates the list table rows. * * @since 3.1.0 */ @@ -4905,10 +4904,9 @@ public static function check_for_updates() * @since 5.3.0 Added database charset, database collation, * and timezone information. * @since 5.5.0 Added pretty permalinks support information. + * @since 6.7.0 Modularized into separate theme-oriented methods. * * @throws ImagickException - * @global wpdb $wpdb WordPress database abstraction object. - * @global array $_wp_theme_features * * @return array The debug data for the site. */ @@ -7611,6 +7609,11 @@ public function column_rating($link) public function column_default($item, $column_name) { } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ public function display_rows() { } @@ -7859,6 +7862,10 @@ public function column_default($item, $column_name) { } /** + * Generates the list table rows. + * + * @since 3.1.0 + * * @global WP_Post $post Global post object. * @global WP_Query $wp_query WordPress Query object. */ @@ -8080,7 +8087,9 @@ public function column_default($item, $column_name) { } /** - * @global string $mode List table view mode. + * Generates the list table rows. + * + * @since 3.1.0 */ public function display_rows() { @@ -8239,6 +8248,9 @@ protected function get_bulk_actions() { } /** + * Generates the list table rows. + * + * @since 3.1.0 */ public function display_rows() { @@ -8485,6 +8497,11 @@ public function column_blogs($user) public function column_default($item, $column_name) { } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ public function display_rows() { } @@ -8622,6 +8639,11 @@ protected function get_table_classes() public function get_columns() { } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ public function display_rows() { } @@ -8669,7 +8691,6 @@ public function display_rows() * banners?: bool, * icons?: bool, * active_installs?: bool, - * group?: bool, * contributors?: bool, * }, * } $plugin_data See plugins_api() @@ -8835,6 +8856,10 @@ public function current_action() { } /** + * Generates the list table rows. + * + * @since 3.1.0 + * * @global string $status * @phpstan-return void */ @@ -9120,8 +9145,13 @@ protected function get_sortable_columns() { } /** + * Generates the list table rows. + * + * @since 3.1.0 + * * @global WP_Query $wp_query WordPress Query object. - * @global int $per_page + * @global int $per_page + * * @param array $posts * @param int $level */ @@ -11180,6 +11210,9 @@ public function display_rows_or_placeholder() { } /** + * Generates the list table rows. + * + * @since 3.1.0 */ public function display_rows() { @@ -11253,6 +11286,9 @@ public function display() { } /** + * Generates the list table rows. + * + * @since 3.1.0 */ public function display_rows() { @@ -15341,8 +15377,7 @@ class PHPMailer * Only supported in simple alt or alt_inline message types * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. * - * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ - * @see http://kigkonsult.se/iCalcreator/ + * @see https://kigkonsult.se/iCalcreator/ * * @var string */ @@ -15515,7 +15550,7 @@ class PHPMailer */ public $AuthType = ''; /** - * SMTP SMTPXClient command attibutes + * SMTP SMTPXClient command attributes * * @var array */ @@ -15616,7 +15651,7 @@ class PHPMailer * Only applicable when sending via SMTP. * * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path - * @see http://www.postfix.org/VERP_README.html Postfix VERP info + * @see https://www.postfix.org/VERP_README.html Postfix VERP info * * @var bool */ @@ -15689,10 +15724,10 @@ class PHPMailer * The function that handles the result of the send email action. * It is called out by send() for each email sent. * - * Value can be any php callable: http://www.php.net/is_callable + * Value can be any php callable: https://www.php.net/is_callable * * Parameters: - * bool $result result of the send action + * bool $result result of the send action * array $to email addresses of the recipients * array $cc cc email addresses * array $bcc bcc email addresses @@ -15871,7 +15906,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.9.1'; + const VERSION = '6.9.2'; /** * Error severity: message only, continue processing. * @@ -16046,14 +16081,14 @@ public function addReplyTo($address, $name = '') * be modified after calling this function), addition of such addresses is delayed until send(). * Addresses that have been added already return false, but do not throw exceptions. * - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $kind One of 'to', 'cc', 'bcc', or 'Reply-To' * @param string $address The email address * @param string $name An optional username associated with the address * * @throws Exception * * @return bool true on success, false if address already used or invalid in some way - * @phpstan-param 'to'|'cc'|'bcc'|'ReplyTo' $kind + * @phpstan-param 'to'|'cc'|'bcc'|'Reply-To' $kind */ protected function addOrEnqueueAnAddress($kind, $address, $name) { @@ -16091,7 +16126,7 @@ protected function addAnAddress($kind, $address, $name = '') * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. * Note that quotes in the name part are removed. * - * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation * * @param string $addrstr The address list string * @param bool $useimap Whether to use the IMAP extension to parse the list @@ -16264,7 +16299,7 @@ protected static function fileIsAccessible($path) /** * Send mail using the PHP mail() function. * - * @see http://www.php.net/manual/en/book.mail.php + * @see https://www.php.net/manual/en/book.mail.php * * @param string $header The message headers * @param string $body The message body @@ -16649,7 +16684,7 @@ public function has8bitChars($text) * without breaking lines within a character. * Adapted from a function by paravoid. * - * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * @see https://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 * * @param string $str multi-byte text to wrap encode * @param string $linebreak string to use as linefeed/end-of-line @@ -16673,7 +16708,7 @@ public function encodeQP($string) /** * Encode a string using Q encoding. * - * @see http://tools.ietf.org/html/rfc2047#section-4.2 + * @see https://www.rfc-editor.org/rfc/rfc2047#section-4.2 * * @param string $str the text to encode * @param string $position Where the text is going to be used, see the RFC for what that means @@ -17021,7 +17056,7 @@ public static function filenameToType($filename) * Multi-byte-safe pathinfo replacement. * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe. * - * @see http://www.php.net/manual/en/function.pathinfo.php#107461 + * @see https://www.php.net/manual/en/function.pathinfo.php#107461 * * @param string $path A filename or path, does not need to exist as a file * @param int|string $options Either a PATHINFO_* constant, @@ -17296,7 +17331,7 @@ class SMTP * * @var string */ - const VERSION = '6.9.1'; + const VERSION = '6.9.2'; /** * SMTP line break constant. * @@ -17400,8 +17435,8 @@ class SMTP /** * Whether to use VERP. * - * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path - * @see http://www.postfix.org/VERP_README.html Info on VERP + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see https://www.postfix.org/VERP_README.html Info on VERP * * @var bool */ @@ -17411,7 +17446,7 @@ class SMTP * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. * - * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * @see https://www.rfc-editor.org/rfc/rfc2821#section-4.5.3.2 * * @var int */ @@ -17430,7 +17465,7 @@ class SMTP * * @var string[] */ - protected $smtp_transaction_id_patterns = ['exim' => '/[\\d]{3} OK id=(.*)/', 'sendmail' => '/[\\d]{3} 2.0.0 (.*) Message/', 'postfix' => '/[\\d]{3} 2.0.0 Ok: queued as (.*)/', 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\\d].0 (.*)@(?:.*) Queued mail for delivery/', 'Amazon_SES' => '/[\\d]{3} Ok (.*)/', 'SendGrid' => '/[\\d]{3} Ok: queued as (.*)/', 'CampaignMonitor' => '/[\\d]{3} 2.0.0 OK:([a-zA-Z\\d]{48})/', 'Haraka' => '/[\\d]{3} Message Queued \\((.*)\\)/', 'ZoneMTA' => '/[\\d]{3} Message queued as (.*)/', 'Mailjet' => '/[\\d]{3} OK queued as (.*)/']; + protected $smtp_transaction_id_patterns = ['exim' => '/[\\d]{3} OK id=(.*)/', 'sendmail' => '/[\\d]{3} 2\\.0\\.0 (.*) Message/', 'postfix' => '/[\\d]{3} 2\\.0\\.0 Ok: queued as (.*)/', 'Microsoft_ESMTP' => '/[0-9]{3} 2\\.[\\d]\\.0 (.*)@(?:.*) Queued mail for delivery/', 'Amazon_SES' => '/[\\d]{3} Ok (.*)/', 'SendGrid' => '/[\\d]{3} Ok: queued as (.*)/', 'CampaignMonitor' => '/[\\d]{3} 2\\.0\\.0 OK:([a-zA-Z\\d]{48})/', 'Haraka' => '/[\\d]{3} Message Queued \\((.*)\\)/', 'ZoneMTA' => '/[\\d]{3} Message queued as (.*)/', 'Mailjet' => '/[\\d]{3} OK queued as (.*)/']; /** * Allowed SMTP XCLIENT attributes. * Must be allowed by the SMTP server. EHLO response is not checked. @@ -21131,1038 +21166,325 @@ public static function is_curl_handle($input) } namespace { /** - * Manages all author-related data - * - * Used by {@see SimplePie_Item::get_author()} and {@see SimplePie::get_authors()} - * - * This class can be overloaded with {@see SimplePie::set_author_class()} + * Autoloader class * * @package SimplePie * @subpackage API */ - class SimplePie_Author - { - /** - * Author's name - * - * @var string - * @see get_name() - */ - var $name; - /** - * Author's link - * - * @var string - * @see get_link() - */ - var $link; - /** - * Author's email address - * - * @var string - * @see get_email() - */ - var $email; - /** - * Constructor, used to input the data - * - * @param string $name - * @param string $link - * @param string $email - */ - public function __construct($name = \null, $link = \null, $email = \null) - { - } - /** - * String-ified version - * - * @return string - */ - public function __toString() - { - } - /** - * Author's name - * - * @return string|null - */ - public function get_name() - { - } - /** - * Author's link - * - * @return string|null - */ - public function get_link() - { - } - /** - * Author's email address - * - * @return string|null - */ - public function get_email() - { - } - } - /** - * Used to create cache objects - * - * This class can be overloaded with {@see SimplePie::set_cache_class()}, - * although the preferred way is to create your own handler - * via {@see register()} - * - * @package SimplePie - * @subpackage Caching - */ - class SimplePie_Cache + class SimplePie_Autoloader { + protected $path; /** - * Cache handler classes - * - * These receive 3 parameters to their constructor, as documented in - * {@see register()} - * @var array - */ - protected static $handlers = array('mysql' => 'SimplePie_Cache_MySQL', 'memcache' => 'SimplePie_Cache_Memcache', 'memcached' => 'SimplePie_Cache_Memcached', 'redis' => 'SimplePie_Cache_Redis'); - /** - * Create a new SimplePie_Cache object - * - * @param string $location URL location (scheme is used to determine handler) - * @param string $filename Unique identifier for cache object - * @param string $extension 'spi' or 'spc' - * @return SimplePie_Cache_Base Type of object depends on scheme of `$location` - */ - public static function get_handler($location, $filename, $extension) - { - } - /** - * Create a new SimplePie_Cache object - * - * @deprecated Use {@see get_handler} instead - */ - public function create($location, $filename, $extension) - { - } - /** - * Register a handler - * - * @param string $type DSN type to register for - * @param string $class Name of handler class. Must implement SimplePie_Cache_Base + * Constructor */ - public static function register($type, $class) + public function __construct() { } /** - * Parse a URL into an array + * Autoloader * - * @param string $url - * @return array + * @param string $class The name of the class to attempt to load. + * @phpstan-return void */ - public static function parse_URL($url) + public function autoload($class) { } } +} +namespace SimplePie { /** * SimplePie * - * A PHP-Based RSS and Atom Feed Framework. - * Takes the hard work out of managing a complete RSS/Atom solution. - * - * 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 - * permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * * Neither the name of the SimplePie Team nor the names of its contributors may be used - * to endorse or promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS - * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue - * @author Ryan Parman - * @author Sam Sneddon - * @author Ryan McCue - * @link http://simplepie.org/ SimplePie - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - */ - /** - * Base for cache objects - * - * Classes to be used with {@see SimplePie_Cache::register()} are expected - * to implement this interface. - * - * @package SimplePie - * @subpackage Caching - */ - interface SimplePie_Cache_Base - { - /** - * Feed cache type - * - * @var string - */ - const TYPE_FEED = 'spc'; - /** - * Image cache type - * - * @var string - */ - const TYPE_IMAGE = 'spi'; - /** - * Create a new cache object - * - * @param string $location Location string (from SimplePie::$cache_location) - * @param string $name Unique ID for the cache - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data - */ - public function __construct($location, $name, $type); - /** - * Save data to the cache - * - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property - * @return bool Successfulness - */ - public function save($data); - /** - * Retrieve the data saved to the cache - * - * @return array Data for SimplePie::$data - */ - public function load(); - /** - * Retrieve the last modified time for the cache - * - * @return int Timestamp - */ - public function mtime(); - /** - * Set the last modified time to the current time - * - * @return bool Success status - */ - public function touch(); - /** - * Remove the cache - * - * @return bool Success status - */ - public function unlink(); - } - /** - * Base class for database-based caches - * - * @package SimplePie - * @subpackage Caching - */ - abstract class SimplePie_Cache_DB implements \SimplePie_Cache_Base - { - /** - * Helper for database conversion - * - * Converts a given {@see SimplePie} object into data to be stored - * - * @param SimplePie $data - * @return array First item is the serialized data for storage, second item is the unique ID for this item - */ - protected static function prepare_simplepie_object_for_cache($data) - { - } - } - /** - * Caches data to the filesystem - * - * @package SimplePie - * @subpackage Caching - */ - class SimplePie_Cache_File implements \SimplePie_Cache_Base - { - /** - * Location string - * - * @see SimplePie::$cache_location - * @var string - */ - protected $location; - /** - * Filename - * - * @var string - */ - protected $filename; - /** - * File extension - * - * @var string - */ - protected $extension; - /** - * File path - * - * @var string - */ - protected $name; - /** - * Create a new cache object - * - * @param string $location Location string (from SimplePie::$cache_location) - * @param string $name Unique ID for the cache - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data - */ - public function __construct($location, $name, $type) - { - } - /** - * Save data to the cache - * - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property - * @return bool Successfulness - */ - public function save($data) - { - } - /** - * Retrieve the data saved to the cache - * - * @return array Data for SimplePie::$data - */ - public function load() - { - } - /** - * Retrieve the last modified time for the cache - * - * @return int Timestamp - */ - public function mtime() - { - } - /** - * Set the last modified time to the current time - * - * @return bool Success status - */ - public function touch() - { - } - /** - * Remove the cache - * - * @return bool Success status - */ - public function unlink() - { - } - } - /** - * Caches data to memcache - * - * Registered for URLs with the "memcache" protocol - * - * For example, `memcache://localhost:11211/?timeout=3600&prefix=sp_` will - * connect to memcache on `localhost` on port 11211. All tables will be - * prefixed with `sp_` and data will expire after 3600 seconds - * * @package SimplePie - * @subpackage Caching - * @uses Memcache + * @subpackage API */ - class SimplePie_Cache_Memcache implements \SimplePie_Cache_Base + class SimplePie { /** - * Memcache instance - * - * @var Memcache - */ - protected $cache; - /** - * Options - * - * @var array - */ - protected $options; - /** - * Cache name - * - * @var string - */ - protected $name; - /** - * Create a new cache object - * - * @param string $location Location string (from SimplePie::$cache_location) - * @param string $name Unique ID for the cache - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data - */ - public function __construct($location, $name, $type) - { - } - /** - * Save data to the cache - * - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property - * @return bool Successfulness + * SimplePie Name */ - public function save($data) - { - } + public const NAME = 'SimplePie'; /** - * Retrieve the data saved to the cache - * - * @return array Data for SimplePie::$data + * SimplePie Version */ - public function load() - { - } + public const VERSION = '1.8.0'; /** - * Retrieve the last modified time for the cache - * - * @return int Timestamp + * SimplePie Website URL */ - public function mtime() - { - } + public const URL = 'http://simplepie.org'; /** - * Set the last modified time to the current time - * - * @return bool Success status + * SimplePie Linkback */ - public function touch() - { - } + public const LINKBACK = '' . self::NAME . ''; /** - * Remove the cache - * - * @return bool Success status - */ - public function unlink() - { - } - } - /** - * Caches data to memcached - * - * Registered for URLs with the "memcached" protocol - * - * For example, `memcached://localhost:11211/?timeout=3600&prefix=sp_` will - * connect to memcached on `localhost` on port 11211. All tables will be - * prefixed with `sp_` and data will expire after 3600 seconds - * - * @package SimplePie - * @subpackage Caching - * @author Paul L. McNeely - * @uses Memcached - */ - class SimplePie_Cache_Memcached implements \SimplePie_Cache_Base - { - /** - * Memcached instance - * @var Memcached + * No Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - protected $cache; + public const LOCATOR_NONE = 0; /** - * Options - * @var array + * Feed Link Element Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - protected $options; + public const LOCATOR_AUTODISCOVERY = 1; /** - * Cache name - * @var string + * Local Feed Extension Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - protected $name; + public const LOCATOR_LOCAL_EXTENSION = 2; /** - * Create a new cache object - * @param string $location Location string (from SimplePie::$cache_location) - * @param string $name Unique ID for the cache - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + * Local Feed Body Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - public function __construct($location, $name, $type) - { - } + public const LOCATOR_LOCAL_BODY = 4; /** - * Save data to the cache - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property - * @return bool Successfulness + * Remote Feed Extension Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - public function save($data) - { - } + public const LOCATOR_REMOTE_EXTENSION = 8; /** - * Retrieve the data saved to the cache - * @return array Data for SimplePie::$data + * Remote Feed Body Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - public function load() - { - } + public const LOCATOR_REMOTE_BODY = 16; /** - * Retrieve the last modified time for the cache - * @return int Timestamp + * All Feed Autodiscovery + * @see SimplePie::set_autodiscovery_level() */ - public function mtime() - { - } + public const LOCATOR_ALL = 31; /** - * Set the last modified time to the current time - * @return bool Success status + * No known feed type */ - public function touch() - { - } + public const TYPE_NONE = 0; /** - * Remove the cache - * @return bool Success status + * RSS 0.90 */ - public function unlink() - { - } - } - /** - * Caches data to a MySQL database - * - * Registered for URLs with the "mysql" protocol - * - * For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will - * connect to the `mydb` database on `localhost` on port 3306, with the user - * `root` and the password `password`. All tables will be prefixed with `sp_` - * - * @package SimplePie - * @subpackage Caching - */ - class SimplePie_Cache_MySQL extends \SimplePie_Cache_DB - { + public const TYPE_RSS_090 = 1; /** - * PDO instance - * - * @var PDO + * RSS 0.91 (Netscape) */ - protected $mysql; + public const TYPE_RSS_091_NETSCAPE = 2; /** - * Options - * - * @var array + * RSS 0.91 (Userland) */ - protected $options; + public const TYPE_RSS_091_USERLAND = 4; /** - * Cache ID - * - * @var string + * RSS 0.91 (both Netscape and Userland) */ - protected $id; + public const TYPE_RSS_091 = 6; /** - * Create a new cache object - * - * @param string $location Location string (from SimplePie::$cache_location) - * @param string $name Unique ID for the cache - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data - * @phpstan-return void + * RSS 0.92 */ - public function __construct($location, $name, $type) - { - } + public const TYPE_RSS_092 = 8; /** - * Save data to the cache - * - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property - * @return bool Successfulness + * RSS 0.93 */ - public function save($data) - { - } + public const TYPE_RSS_093 = 16; /** - * Retrieve the data saved to the cache - * - * @return array Data for SimplePie::$data + * RSS 0.94 */ - public function load() - { - } + public const TYPE_RSS_094 = 32; /** - * Retrieve the last modified time for the cache - * - * @return int Timestamp + * RSS 1.0 */ - public function mtime() - { - } + public const TYPE_RSS_10 = 64; /** - * Set the last modified time to the current time - * - * @return bool Success status + * RSS 2.0 */ - public function touch() - { - } + public const TYPE_RSS_20 = 128; /** - * Remove the cache - * - * @return bool Success status + * RDF-based RSS */ - public function unlink() - { - } - } - /** - * Caches data to redis - * - * Registered for URLs with the "redis" protocol - * - * For example, `redis://localhost:6379/?timeout=3600&prefix=sp_&dbIndex=0` will - * connect to redis on `localhost` on port 6379. All tables will be - * prefixed with `simple_primary-` and data will expire after 3600 seconds - * - * @package SimplePie - * @subpackage Caching - * @uses Redis - */ - class SimplePie_Cache_Redis implements \SimplePie_Cache_Base - { + public const TYPE_RSS_RDF = 65; /** - * Redis instance - * - * @var \Redis + * Non-RDF-based RSS (truly intended as syndication format) */ - protected $cache; + public const TYPE_RSS_SYNDICATION = 190; /** - * Options - * - * @var array + * All RSS */ - protected $options; + public const TYPE_RSS_ALL = 255; /** - * Cache name - * - * @var string + * Atom 0.3 */ - protected $name; + public const TYPE_ATOM_03 = 256; /** - * Cache Data - * - * @var type + * Atom 1.0 */ - protected $data; + public const TYPE_ATOM_10 = 512; /** - * Create a new cache object - * - * @param string $location Location string (from SimplePie::$cache_location) - * @param string $name Unique ID for the cache - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + * All Atom */ - public function __construct($location, $name, $options = \null) - { - } + public const TYPE_ATOM_ALL = 768; /** - * @param \Redis $cache + * All feed types */ - public function setRedisClient(\Redis $cache) - { - } + public const TYPE_ALL = 1023; /** - * Save data to the cache - * - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property - * @return bool Successfulness + * No construct */ - public function save($data) - { - } + public const CONSTRUCT_NONE = 0; /** - * Retrieve the data saved to the cache - * - * @return array Data for SimplePie::$data + * Text construct */ - public function load() - { - } + public const CONSTRUCT_TEXT = 1; /** - * Retrieve the last modified time for the cache - * - * @return int Timestamp + * HTML construct */ - public function mtime() - { - } + public const CONSTRUCT_HTML = 2; /** - * Set the last modified time to the current time - * - * @return bool Success status + * XHTML construct */ - public function touch() - { - } + public const CONSTRUCT_XHTML = 4; /** - * Remove the cache - * - * @return bool Success status + * base64-encoded construct */ - public function unlink() - { - } - } - /** - * Handles `` captions as defined in Media RSS. - * - * Used by {@see SimplePie_Enclosure::get_caption()} and {@see SimplePie_Enclosure::get_captions()} - * - * This class can be overloaded with {@see SimplePie::set_caption_class()} - * - * @package SimplePie - * @subpackage API - */ - class SimplePie_Caption - { + public const CONSTRUCT_BASE64 = 8; /** - * Content type - * - * @var string - * @see get_type() + * IRI construct */ - var $type; + public const CONSTRUCT_IRI = 16; /** - * Language - * - * @var string - * @see get_language() + * A construct that might be HTML */ - var $lang; + public const CONSTRUCT_MAYBE_HTML = 32; /** - * Start time - * - * @var string - * @see get_starttime() + * All constructs */ - var $startTime; + public const CONSTRUCT_ALL = 63; /** - * End time - * - * @var string - * @see get_endtime() + * Don't change case */ - var $endTime; + public const SAME_CASE = 1; /** - * Caption text - * - * @var string - * @see get_text() + * Change to lowercase */ - var $text; + public const LOWERCASE = 2; /** - * Constructor, used to input the data - * - * For documentation on all the parameters, see the corresponding - * properties and their accessors + * Change to uppercase */ - public function __construct($type = \null, $lang = \null, $startTime = \null, $endTime = \null, $text = \null) - { - } + public const UPPERCASE = 4; /** - * String-ified version - * - * @return string + * PCRE for HTML attributes */ - public function __toString() - { - } + public const PCRE_HTML_ATTRIBUTE = '((?:[\\x09\\x0A\\x0B\\x0C\\x0D\\x20]+[^\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\x2F\\x3E][^\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\x2F\\x3D\\x3E]*(?:[\\x09\\x0A\\x0B\\x0C\\x0D\\x20]*=[\\x09\\x0A\\x0B\\x0C\\x0D\\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\x22\\x27\\x3E][^\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\x3E]*)?))?)*)[\\x09\\x0A\\x0B\\x0C\\x0D\\x20]*'; /** - * Get the end time - * - * @return string|null Time in the format 'hh:mm:ss.SSS' + * PCRE for XML attributes */ - public function get_endtime() - { - } + public const PCRE_XML_ATTRIBUTE = '((?:\\s+(?:(?:[^\\s:]+:)?[^\\s:]+)\\s*=\\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'))*)\\s*'; /** - * Get the language - * - * @link http://tools.ietf.org/html/rfc3066 - * @return string|null Language code as per RFC 3066 + * XML Namespace */ - public function get_language() - { - } + public const NAMESPACE_XML = 'http://www.w3.org/XML/1998/namespace'; /** - * Get the start time - * - * @return string|null Time in the format 'hh:mm:ss.SSS' + * Atom 1.0 Namespace */ - public function get_starttime() - { - } + public const NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom'; /** - * Get the text of the caption - * - * @return string|null + * Atom 0.3 Namespace */ - public function get_text() - { - } + public const NAMESPACE_ATOM_03 = 'http://purl.org/atom/ns#'; /** - * Get the content type (not MIME type) - * - * @return string|null Either 'text' or 'html' + * RDF Namespace */ - public function get_type() - { - } - } - /** - * Manages all category-related data - * - * Used by {@see SimplePie_Item::get_category()} and {@see SimplePie_Item::get_categories()} - * - * This class can be overloaded with {@see SimplePie::set_category_class()} - * - * @package SimplePie - * @subpackage API - */ - class SimplePie_Category - { + public const NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; /** - * Category identifier - * - * @var string|null - * @see get_term + * RSS 0.90 Namespace */ - var $term; + public const NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/'; /** - * Categorization scheme identifier - * - * @var string|null - * @see get_scheme() + * RSS 1.0 Namespace */ - var $scheme; + public const NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/'; /** - * Human readable label - * - * @var string|null - * @see get_label() + * RSS 1.0 Content Module Namespace */ - var $label; + public const NAMESPACE_RSS_10_MODULES_CONTENT = 'http://purl.org/rss/1.0/modules/content/'; /** - * Category type - * - * category for - * subject for - * - * @var string|null - * @see get_type() + * RSS 2.0 Namespace + * (Stupid, I know, but I'm certain it will confuse people less with support.) */ - var $type; + public const NAMESPACE_RSS_20 = ''; /** - * Constructor, used to input the data - * - * @param string|null $term - * @param string|null $scheme - * @param string|null $label - * @param string|null $type + * DC 1.0 Namespace */ - public function __construct($term = \null, $scheme = \null, $label = \null, $type = \null) - { - } + public const NAMESPACE_DC_10 = 'http://purl.org/dc/elements/1.0/'; /** - * String-ified version - * - * @return string + * DC 1.1 Namespace */ - public function __toString() - { - } + public const NAMESPACE_DC_11 = 'http://purl.org/dc/elements/1.1/'; /** - * Get the category identifier - * - * @return string|null + * W3C Basic Geo (WGS84 lat/long) Vocabulary Namespace */ - public function get_term() - { - } + public const NAMESPACE_W3C_BASIC_GEO = 'http://www.w3.org/2003/01/geo/wgs84_pos#'; /** - * Get the categorization scheme identifier - * - * @return string|null + * GeoRSS Namespace */ - public function get_scheme() - { - } + public const NAMESPACE_GEORSS = 'http://www.georss.org/georss'; /** - * Get the human readable label - * - * @param bool $strict - * @return string|null + * Media RSS Namespace */ - public function get_label($strict = \false) - { - } + public const NAMESPACE_MEDIARSS = 'http://search.yahoo.com/mrss/'; /** - * Get the category type - * - * @return string|null + * Wrong Media RSS Namespace. Caused by a long-standing typo in the spec. */ - public function get_type() - { - } - } - /** - * Content-type sniffing - * - * Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06 - * - * This is used since we can't always trust Content-Type headers, and is based - * upon the HTML5 parsing rules. - * - * - * This class can be overloaded with {@see SimplePie::set_content_type_sniffer_class()} - * - * @package SimplePie - * @subpackage HTTP - */ - class SimplePie_Content_Type_Sniffer - { + public const NAMESPACE_MEDIARSS_WRONG = 'http://search.yahoo.com/mrss'; /** - * File object - * - * @var SimplePie_File + * Wrong Media RSS Namespace #2. New namespace introduced in Media RSS 1.5. */ - var $file; + public const NAMESPACE_MEDIARSS_WRONG2 = 'http://video.search.yahoo.com/mrss'; /** - * Create an instance of the class with the input file - * - * @param SimplePie_Content_Type_Sniffer $file Input file + * Wrong Media RSS Namespace #3. A possible typo of the Media RSS 1.5 namespace. */ - public function __construct($file) - { - } + public const NAMESPACE_MEDIARSS_WRONG3 = 'http://video.search.yahoo.com/mrss/'; /** - * Get the Content-Type of the specified file - * - * @return string Actual Content-Type + * Wrong Media RSS Namespace #4. New spec location after the RSS Advisory Board takes it over, but not a valid namespace. */ - public function get_type() - { - } + public const NAMESPACE_MEDIARSS_WRONG4 = 'http://www.rssboard.org/media-rss'; /** - * Sniff text or binary - * - * @return string Actual Content-Type + * Wrong Media RSS Namespace #5. A possible typo of the RSS Advisory Board URL. */ - public function text_or_binary() - { - } + public const NAMESPACE_MEDIARSS_WRONG5 = 'http://www.rssboard.org/media-rss/'; /** - * Sniff unknown - * - * @return string Actual Content-Type + * iTunes RSS Namespace */ - public function unknown() - { - } + public const NAMESPACE_ITUNES = 'http://www.itunes.com/dtds/podcast-1.0.dtd'; /** - * Sniff images - * - * @return string Actual Content-Type + * XHTML Namespace */ - public function image() - { - } + public const NAMESPACE_XHTML = 'http://www.w3.org/1999/xhtml'; /** - * Sniff HTML - * - * @return string Actual Content-Type + * IANA Link Relations Registry */ - public function feed_or_html() - { - } - } - /** - * Manages `` copyright tags as defined in Media RSS - * - * Used by {@see SimplePie_Enclosure::get_copyright()} - * - * This class can be overloaded with {@see SimplePie::set_copyright_class()} - * - * @package SimplePie - * @subpackage API - */ - class SimplePie_Copyright - { + public const IANA_LINK_RELATIONS_REGISTRY = 'http://www.iana.org/assignments/relation/'; /** - * Copyright URL - * - * @var string - * @see get_url() + * No file source */ - var $url; + public const FILE_SOURCE_NONE = 0; /** - * Attribution - * - * @var string - * @see get_attribution() + * Remote file source */ - var $label; + public const FILE_SOURCE_REMOTE = 1; /** - * Constructor, used to input the data - * - * For documentation on all the parameters, see the corresponding - * properties and their accessors + * Local file source */ - public function __construct($url = \null, $label = \null) - { - } + public const FILE_SOURCE_LOCAL = 2; /** - * String-ified version - * - * @return string + * fsockopen() file source */ - public function __toString() - { - } + public const FILE_SOURCE_FSOCKOPEN = 4; /** - * Get the copyright URL - * - * @return string|null URL to copyright information + * cURL file source */ - public function get_url() - { - } + public const FILE_SOURCE_CURL = 8; /** - * Get the attribution text - * - * @return string|null + * file_get_contents() file source */ - public function get_attribution() - { - } - } - /** - * SimplePie - * - * @package SimplePie - * @subpackage API - */ - class SimplePie - { + public const FILE_SOURCE_FILE_GET_CONTENTS = 16; /** * @var array Raw data * @access private */ - public $data = array(); + public $data = []; /** * @var mixed Error string * @access private @@ -22173,9 +21495,9 @@ class SimplePie * @see SimplePie::status_code() * @access private */ - public $status_code; + public $status_code = 0; /** - * @var object Instance of SimplePie_Sanitize (or other class) + * @var object Instance of \SimplePie\Sanitize (or other class) * @see SimplePie::set_sanitize_class() * @access private */ @@ -22185,7 +21507,7 @@ class SimplePie * @see SimplePie::set_useragent() * @access private */ - public $useragent = \SIMPLEPIE_USERAGENT; + public $useragent = ''; /** * @var string Feed URL * @see SimplePie::set_feed_url() @@ -22197,9 +21519,9 @@ class SimplePie * @see SimplePie::subscribe_url() * @access private */ - public $permanent_url = \null; + public $permanent_url = null; /** - * @var object Instance of SimplePie_File to use as a feed + * @var object Instance of \SimplePie\File to use as a feed * @see SimplePie::set_file() * @access private */ @@ -22221,34 +21543,28 @@ class SimplePie * @see SimplePie::set_curl_options() * @access private */ - public $curl_options = array(); + public $curl_options = []; /** * @var bool Forces fsockopen() to be used for remote files instead * of cURL, even if a new enough version is installed * @see SimplePie::force_fsockopen() * @access private */ - public $force_fsockopen = \false; + public $force_fsockopen = false; /** * @var bool Force the given data/URL to be treated as a feed no matter what * it appears like * @see SimplePie::force_feed() * @access private */ - public $force_feed = \false; - /** - * @var bool Enable/Disable Caching - * @see SimplePie::enable_cache() - * @access private - */ - public $cache = \true; + public $force_feed = false; /** * @var bool Force SimplePie to fallback to expired cache, if enabled, * when feed is unavailable. * @see SimplePie::force_cache_fallback() * @access private */ - public $force_cache_fallback = \false; + public $force_cache_fallback = false; /** * @var int Cache duration (in seconds) * @see SimplePie::set_cache_duration() @@ -22278,24 +21594,24 @@ class SimplePie * @see SimplePie::enable_order_by_date() * @access private */ - public $order_by_date = \true; + public $order_by_date = true; /** * @var mixed Force input encoding to be set to the follow value * (false, or anything type-cast to false, disables this feature) * @see SimplePie::set_input_encoding() * @access private */ - public $input_encoding = \false; + public $input_encoding = false; /** * @var int Feed Autodiscovery Level * @see SimplePie::set_autodiscovery_level() * @access private */ - public $autodiscovery = \SIMPLEPIE_LOCATOR_ALL; + public $autodiscovery = self::LOCATOR_ALL; /** * Class registry object * - * @var SimplePie_Registry + * @var \SimplePie\Registry */ public $registry; /** @@ -22309,7 +21625,7 @@ class SimplePie * @see SimplePie::get_all_discovered_feeds() * @access private */ - public $all_discovered_feeds = array(); + public $all_discovered_feeds = []; /** * @var string Web-accessible path to the handler_image.php file. * @see SimplePie::set_image_handler() @@ -22321,18 +21637,18 @@ class SimplePie * @see SimplePie::set_feed_url() * @access private */ - public $multifeed_url = array(); + public $multifeed_url = []; /** * @var array Stores SimplePie objects when multiple feeds initialized. * @access private */ - public $multifeed_objects = array(); + public $multifeed_objects = []; /** * @var array Stores the get_object_vars() array for use with multifeeds. * @see SimplePie::set_feed_url() * @access private */ - public $config_settings = \null; + public $config_settings = null; /** * @var integer Stores the number of items to return per-feed with multifeeds. * @see SimplePie::set_item_limit() @@ -22343,30 +21659,36 @@ class SimplePie * @var bool Stores if last-modified and/or etag headers were sent with the * request when checking a feed. */ - public $check_modified = \false; + public $check_modified = false; /** * @var array Stores the default attributes to be stripped by strip_attributes(). * @see SimplePie::strip_attributes() * @access private */ - public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); + public $strip_attributes = ['bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']; /** * @var array Stores the default attributes to add to different tags by add_attributes(). * @see SimplePie::add_attributes() * @access private */ - public $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none')); + public $add_attributes = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]; /** * @var array Stores the default tags to be stripped by strip_htmltags(). * @see SimplePie::strip_htmltags() * @access private */ - public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); + public $strip_htmltags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']; + /** + * @var array Stores the default attributes to be renamed by rename_attributes(). + * @see SimplePie::rename_attributes() + * @access private + */ + public $rename_attributes = []; /** * @var bool Should we throw exceptions, or use the old-style error property? * @access private */ - public $enable_exceptions = \false; + public $enable_exceptions = false; /** * The SimplePie class contains feed level data and options * @@ -22405,7 +21727,7 @@ public function __destruct() * @since 1.1 * @param bool $enable Force the given data/URL to be treated as a feed */ - public function force_feed($enable = \false) + public function force_feed($enable = false) { } /** @@ -22427,9 +21749,9 @@ public function set_feed_url($url) { } /** - * Set an instance of {@see SimplePie_File} to use as a feed + * Set an instance of {@see \SimplePie\File} to use as a feed * - * @param SimplePie_File &$file + * @param \SimplePie\File &$file * @return bool True on success, false on failure */ public function set_file(&$file) @@ -22471,7 +21793,7 @@ public function set_timeout($timeout = 10) * @since 1.0 Beta 3 * @param array $curl_options Curl options to add to default settings */ - public function set_curl_options(array $curl_options = array()) + public function set_curl_options(array $curl_options = []) { } /** @@ -22480,7 +21802,7 @@ public function set_curl_options(array $curl_options = array()) * @since 1.0 Beta 3 * @param bool $enable Force fsockopen() to be used */ - public function force_fsockopen($enable = \false) + public function force_fsockopen($enable = false) { } /** @@ -22492,7 +21814,17 @@ public function force_fsockopen($enable = \false) * @since 1.0 Preview Release * @param bool $enable Enable caching */ - public function enable_cache($enable = \true) + public function enable_cache($enable = true) + { + } + /** + * Set a PSR-16 implementation as cache + * + * @param CacheInterface $psr16cache The PSR-16 cache implementation + * + * @return void + */ + public function set_cache(\Psr\SimpleCache\CacheInterface $cache) { } /** @@ -22502,9 +21834,12 @@ public function enable_cache($enable = \true) * This tells SimplePie to ignore any file errors and fall back to cache * instead. This only works if caching is enabled and cached content * still exists. + * + * @deprecated since SimplePie 1.8.0, expired cache will not be used anymore. + * * @param bool $enable Force use of cache on fail. */ - public function force_cache_fallback($enable = \false) + public function force_cache_fallback($enable = false) { } /** @@ -22528,6 +21863,8 @@ public function set_autodiscovery_cache_duration($seconds = 604800) /** * Set the file system location where the cached files should be stored * + * @deprecated since SimplePie 1.8.0, use \SimplePie\SimplePie::set_cache() instead. + * * @param string $location The file system location. */ public function set_cache_location($location = './cache') @@ -22535,6 +21872,7 @@ public function set_cache_location($location = './cache') } /** * Return the filename (i.e. hash, without path and without extension) of the file to cache a given URL. + * * @param string $url The URL of the feed to be cached. * @return string A filename (i.e. hash, without path and without extension). */ @@ -22546,7 +21884,7 @@ public function get_cache_filename($url) * * @param bool $enable Sort as reverse chronological order. */ - public function enable_order_by_date($enable = \true) + public function enable_order_by_date($enable = true) { } /** @@ -22557,164 +21895,264 @@ public function enable_order_by_date($enable = \true) * * @param string $encoding Character encoding */ - public function set_input_encoding($encoding = \false) + public function set_input_encoding($encoding = false) { } /** * Set how much feed autodiscovery to do * - * @see SIMPLEPIE_LOCATOR_NONE - * @see SIMPLEPIE_LOCATOR_AUTODISCOVERY - * @see SIMPLEPIE_LOCATOR_LOCAL_EXTENSION - * @see SIMPLEPIE_LOCATOR_LOCAL_BODY - * @see SIMPLEPIE_LOCATOR_REMOTE_EXTENSION - * @see SIMPLEPIE_LOCATOR_REMOTE_BODY - * @see SIMPLEPIE_LOCATOR_ALL + * @see \SimplePie\SimplePie::LOCATOR_NONE + * @see \SimplePie\SimplePie::LOCATOR_AUTODISCOVERY + * @see \SimplePie\SimplePie::LOCATOR_LOCAL_EXTENSION + * @see \SimplePie\SimplePie::LOCATOR_LOCAL_BODY + * @see \SimplePie\SimplePie::LOCATOR_REMOTE_EXTENSION + * @see \SimplePie\SimplePie::LOCATOR_REMOTE_BODY + * @see \SimplePie\SimplePie::LOCATOR_ALL * @param int $level Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator) */ - public function set_autodiscovery_level($level = \SIMPLEPIE_LOCATOR_ALL) + public function set_autodiscovery_level($level = self::LOCATOR_ALL) { } /** * Get the class registry * * Use this to override SimplePie's default classes - * @see SimplePie_Registry - * @return SimplePie_Registry + * @see \SimplePie\Registry + * + * @return Registry */ public function &get_registry() { } - /**#@+ - * Useful when you are overloading or extending SimplePie's default classes. + /** + * Set which class SimplePie uses for caching + * + * @deprecated since SimplePie 1.3, use {@see set_cache()} instead * - * @deprecated Use {@see get_registry()} instead - * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation * @param string $class Name of custom class + * * @return boolean True on success, false otherwise */ - /** - * Set which class SimplePie uses for caching - */ - public function set_cache_class($class = 'SimplePie_Cache') + public function set_cache_class($class = \SimplePie\Cache::class) { } /** * Set which class SimplePie uses for auto-discovery + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_locator_class($class = 'SimplePie_Locator') + public function set_locator_class($class = \SimplePie\Locator::class) { } /** * Set which class SimplePie uses for XML parsing + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_parser_class($class = 'SimplePie_Parser') + public function set_parser_class($class = \SimplePie\Parser::class) { } /** * Set which class SimplePie uses for remote file fetching + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_file_class($class = 'SimplePie_File') + public function set_file_class($class = \SimplePie\File::class) { } /** * Set which class SimplePie uses for data sanitization + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_sanitize_class($class = 'SimplePie_Sanitize') + public function set_sanitize_class($class = \SimplePie\Sanitize::class) { } /** * Set which class SimplePie uses for handling feed items + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_item_class($class = 'SimplePie_Item') + public function set_item_class($class = \SimplePie\Item::class) { } /** * Set which class SimplePie uses for handling author data + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_author_class($class = 'SimplePie_Author') + public function set_author_class($class = \SimplePie\Author::class) { } /** * Set which class SimplePie uses for handling category data + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_category_class($class = 'SimplePie_Category') + public function set_category_class($class = \SimplePie\Category::class) { } /** * Set which class SimplePie uses for feed enclosures + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_enclosure_class($class = 'SimplePie_Enclosure') + public function set_enclosure_class($class = \SimplePie\Enclosure::class) { } /** * Set which class SimplePie uses for `` captions + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_caption_class($class = 'SimplePie_Caption') + public function set_caption_class($class = \SimplePie\Caption::class) { } /** * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_copyright_class($class = 'SimplePie_Copyright') + public function set_copyright_class($class = \SimplePie\Copyright::class) { } /** * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_credit_class($class = 'SimplePie_Credit') + public function set_credit_class($class = \SimplePie\Credit::class) { } /** * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_rating_class($class = 'SimplePie_Rating') + public function set_rating_class($class = \SimplePie\Rating::class) { } /** * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_restriction_class($class = 'SimplePie_Restriction') + public function set_restriction_class($class = \SimplePie\Restriction::class) { } /** * Set which class SimplePie uses for content-type sniffing + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer') + public function set_content_type_sniffer_class($class = \SimplePie\Content\Type\Sniffer::class) { } /** * Set which class SimplePie uses item sources + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param string $class Name of custom class + * + * @return boolean True on success, false otherwise */ - public function set_source_class($class = 'SimplePie_Source') + public function set_source_class($class = \SimplePie\Source::class) { } - /**#@-*/ /** * Set the user agent string * * @param string $ua New user agent string. */ - public function set_useragent($ua = \SIMPLEPIE_USERAGENT) + public function set_useragent($ua = null) + { + } + /** + * Set a namefilter to modify the cache filename with + * + * @param NameFilter $filter + * + * @return void + */ + public function set_cache_namefilter(\SimplePie\Cache\NameFilter $filter) : void { } /** * Set callback function to create cache filename with * + * @deprecated since SimplePie 1.8.0, use {@see set_cache_namefilter()} instead + * * @param mixed $function Callback function */ public function set_cache_name_function($function = 'md5') { } /** - * Set options to make SimplePie as fast as possible. + * Set options to make SP as fast as possible * - * Forgoes a substantial amount of data sanitization in favor of speed. - * This turns SimplePie into a less clever parser of feeds. + * Forgoes a substantial amount of data sanitization in favor of speed. This + * turns SimplePie into a dumb parser of feeds. * - * @param bool $set Whether to set them or not. + * @param bool $set Whether to set them or not */ - public function set_stupidly_fast($set = \false) + public function set_stupidly_fast($set = false) { } /** @@ -22725,13 +22163,16 @@ public function set_stupidly_fast($set = \false) public function set_max_checked_feeds($max = 10) { } - public function remove_div($enable = \true) + public function remove_div($enable = true) + { + } + public function strip_htmltags($tags = '', $encode = null) { } - public function strip_htmltags($tags = '', $encode = \null) + public function encode_instead_of_strip($enable = true) { } - public function encode_instead_of_strip($enable = \true) + public function rename_attributes($attribs = '') { } public function strip_attributes($attribs = '') @@ -22765,7 +22206,7 @@ public function add_attributes($attribs = '') public function set_output_encoding($encoding = 'UTF-8') { } - public function strip_comments($strip = \false) + public function strip_comments($strip = false) { } /** @@ -22779,15 +22220,15 @@ public function strip_comments($strip = \false) * @since 1.0 * @param array|null $element_attribute Element/attribute key/value pairs, null for default */ - public function set_url_replacements($element_attribute = \null) + public function set_url_replacements($element_attribute = null) { } /** * Set the list of domains for which to force HTTPS. - * @see SimplePie_Sanitize::set_https_domains() + * @see \SimplePie\Sanitize::set_https_domains() * @param array List of HTTPS domains. Example array('biz', 'example.com', 'example.org', 'www.example.net'). */ - public function set_https_domains($domains = array()) + public function set_https_domains($domains = []) { } /** @@ -22796,7 +22237,7 @@ public function set_https_domains($domains = array()) * @param string $page Web-accessible path to the handler_image.php file. * @param string $qs The query string that the value should be passed to. */ - public function set_image_handler($page = \false, $qs = 'i') + public function set_image_handler($page = false, $qs = 'i') { } /** @@ -22812,7 +22253,7 @@ public function set_item_limit($limit = 0) * * @param boolean $enable Should we throw exceptions, or use the old-style error property? */ - public function enable_exceptions($enable = \true) + public function enable_exceptions($enable = true) { } /** @@ -22828,10 +22269,10 @@ public function init() { } /** - * Fetch the data via SimplePie_File + * Fetch the data via \SimplePie\File * * If the data is already cached, attempt to fetch it from there instead - * @param SimplePie_Cache_Base|false $cache Cache handler, or false to not load from the cache + * @param Base|DataCache|false $cache Cache handler, or false to not load from the cache * @return array|true Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type */ protected function fetch_data(&$cache) @@ -22874,7 +22315,7 @@ public function get_encoding() { } /** - * Send the Content-Type header with correct encoding + * Send the content-type header with correct encoding * * This method ensures that the SimplePie-enabled page is being served with * the correct {@link http://www.iana.org/assignments/media-types/ mime-type} @@ -22898,28 +22339,28 @@ public function handle_content_type($mime = 'text/html') /** * Get the type of the feed * - * This returns a SIMPLEPIE_TYPE_* constant, which can be tested against + * This returns a \SimplePie\SimplePie::TYPE_* constant, which can be tested against * using {@link http://php.net/language.operators.bitwise bitwise operators} * * @since 0.8 (usage changed to using constants in 1.0) - * @see SIMPLEPIE_TYPE_NONE Unknown. - * @see SIMPLEPIE_TYPE_RSS_090 RSS 0.90. - * @see SIMPLEPIE_TYPE_RSS_091_NETSCAPE RSS 0.91 (Netscape). - * @see SIMPLEPIE_TYPE_RSS_091_USERLAND RSS 0.91 (Userland). - * @see SIMPLEPIE_TYPE_RSS_091 RSS 0.91. - * @see SIMPLEPIE_TYPE_RSS_092 RSS 0.92. - * @see SIMPLEPIE_TYPE_RSS_093 RSS 0.93. - * @see SIMPLEPIE_TYPE_RSS_094 RSS 0.94. - * @see SIMPLEPIE_TYPE_RSS_10 RSS 1.0. - * @see SIMPLEPIE_TYPE_RSS_20 RSS 2.0.x. - * @see SIMPLEPIE_TYPE_RSS_RDF RDF-based RSS. - * @see SIMPLEPIE_TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication format). - * @see SIMPLEPIE_TYPE_RSS_ALL Any version of RSS. - * @see SIMPLEPIE_TYPE_ATOM_03 Atom 0.3. - * @see SIMPLEPIE_TYPE_ATOM_10 Atom 1.0. - * @see SIMPLEPIE_TYPE_ATOM_ALL Any version of Atom. - * @see SIMPLEPIE_TYPE_ALL Any known/supported feed type. - * @return int SIMPLEPIE_TYPE_* constant + * @see \SimplePie\SimplePie::TYPE_NONE Unknown. + * @see \SimplePie\SimplePie::TYPE_RSS_090 RSS 0.90. + * @see \SimplePie\SimplePie::TYPE_RSS_091_NETSCAPE RSS 0.91 (Netscape). + * @see \SimplePie\SimplePie::TYPE_RSS_091_USERLAND RSS 0.91 (Userland). + * @see \SimplePie\SimplePie::TYPE_RSS_091 RSS 0.91. + * @see \SimplePie\SimplePie::TYPE_RSS_092 RSS 0.92. + * @see \SimplePie\SimplePie::TYPE_RSS_093 RSS 0.93. + * @see \SimplePie\SimplePie::TYPE_RSS_094 RSS 0.94. + * @see \SimplePie\SimplePie::TYPE_RSS_10 RSS 1.0. + * @see \SimplePie\SimplePie::TYPE_RSS_20 RSS 2.0.x. + * @see \SimplePie\SimplePie::TYPE_RSS_RDF RDF-based RSS. + * @see \SimplePie\SimplePie::TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication format). + * @see \SimplePie\SimplePie::TYPE_RSS_ALL Any version of RSS. + * @see \SimplePie\SimplePie::TYPE_ATOM_03 Atom 0.3. + * @see \SimplePie\SimplePie::TYPE_ATOM_10 Atom 1.0. + * @see \SimplePie\SimplePie::TYPE_ATOM_ALL Any version of Atom. + * @see \SimplePie\SimplePie::TYPE_ALL Any known/supported feed type. + * @return int \SimplePie\SimplePie::TYPE_* constant */ public function get_type() { @@ -22943,7 +22384,7 @@ public function get_type() * iff it is a 301 redirection * @return string|null */ - public function subscribe_url($permanent = \false) + public function subscribe_url($permanent = false) { } /** @@ -22965,8 +22406,8 @@ public function subscribe_url($permanent = \false) * // This is probably a bad example because we already support * // natively, but it shows you how to parse through * // the nodes. - * $group = $item->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group'); - * $content = $group[0]['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content']; + * $group = $item->get_item_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'group'); + * $content = $group[0]['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['content']; * $file = $content[0]['attribs']['']['url']; * echo $file; * @@ -23026,16 +22467,16 @@ public function get_image_tags($namespace, $tag) * @param array $element * @return string */ - public function get_base($element = array()) + public function get_base($element = []) { } /** * Sanitize feed data * * @access private - * @see SimplePie_Sanitize::sanitize() + * @see \SimplePie\Sanitize::sanitize() * @param string $data Data to sanitize - * @param int $type One of the SIMPLEPIE_CONSTRUCT_* constants + * @param int $type One of the \SimplePie\SimplePie::CONSTRUCT_* constants * @param string $base Base URL to resolve URLs against * @return string Sanitized data */ @@ -23058,7 +22499,7 @@ public function get_title() * * @since Unknown * @param int $key The category that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Category|null + * @return \SimplePie\Category|null */ public function get_category($key = 0) { @@ -23069,7 +22510,7 @@ public function get_category($key = 0) * Uses ``, `` or `` * * @since Unknown - * @return array|null List of {@see SimplePie_Category} objects + * @return array|null List of {@see \SimplePie\Category} objects */ public function get_categories() { @@ -23079,7 +22520,7 @@ public function get_categories() * * @since 1.1 * @param int $key The author that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Author|null + * @return \SimplePie\Author|null */ public function get_author($key = 0) { @@ -23090,7 +22531,7 @@ public function get_author($key = 0) * Uses ``, ``, `` or `` * * @since 1.1 - * @return array|null List of {@see SimplePie_Author} objects + * @return array|null List of {@see \SimplePie\Author} objects */ public function get_authors() { @@ -23100,7 +22541,7 @@ public function get_authors() * * @since 1.1 * @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Author|null + * @return \SimplePie\Author|null */ public function get_contributor($key = 0) { @@ -23111,7 +22552,7 @@ public function get_contributor($key = 0) * Uses `` * * @since 1.1 - * @return array|null List of {@see SimplePie_Author} objects + * @return array|null List of {@see \SimplePie\Author} objects */ public function get_contributors() { @@ -23265,10 +22706,10 @@ public function get_image_link() * * RSS 2.0 feeds are allowed to have a "feed logo" width. * - * Uses `` or defaults to 88.0 if no width is specified and + * Uses `` or defaults to 88 if no width is specified and * the feed is an RSS 2.0 feed. * - * @return int|float|null + * @return int|null */ public function get_image_width() { @@ -23278,10 +22719,10 @@ public function get_image_width() * * RSS 2.0 feeds are allowed to have a "feed logo" height. * - * Uses `` or defaults to 31.0 if no height is specified and + * Uses `` or defaults to 31 if no height is specified and * the feed is an RSS 2.0 feed. * - * @return int|float|null + * @return int|null */ public function get_image_height() { @@ -23308,7 +22749,7 @@ public function get_item_quantity($max = 0) * @see get_item_quantity() * @since Beta 2 * @param int $key The item that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Item|null + * @return \SimplePie\Item|null */ public function get_item($key = 0) { @@ -23324,7 +22765,7 @@ public function get_item($key = 0) * @since Beta 2 * @param int $start Index to start at * @param int $end Number of items to return. 0 for all items after `$start` - * @return SimplePie_Item[]|null List of {@see SimplePie_Item} objects + * @return \SimplePie\Item[]|null List of {@see \SimplePie\Item} objects */ public function get_items($start = 0, $end = 0) { @@ -23334,7 +22775,7 @@ public function get_items($start = 0, $end = 0) * * @deprecated Use your own favicon handling instead */ - public function set_favicon_handler($page = \false, $qs = 'i') + public function set_favicon_handler($page = false, $qs = 'i') { } /** @@ -23383,6 +22824,1097 @@ public static function merge_items($urls, $start = 0, $end = 0, $limit = 0) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\SimplePie" instead */ + class SimplePie extends \SimplePie\SimplePie + { + } +} +namespace SimplePie { + /** + * Manages all author-related data + * + * Used by {@see Item::get_author()} and {@see SimplePie::get_authors()} + * + * This class can be overloaded with {@see SimplePie::set_author_class()} + * + * @package SimplePie + * @subpackage API + */ + 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 + * + * @param string $name + * @param string $link + * @param string $email + */ + public function __construct($name = null, $link = null, $email = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Author's name + * + * @return string|null + */ + public function get_name() + { + } + /** + * Author's link + * + * @return string|null + */ + public function get_link() + { + } + /** + * Author's email address + * + * @return string|null + */ + public function get_email() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Author" instead */ + class SimplePie_Author extends \SimplePie\Author + { + } +} +namespace SimplePie { + /** + * Used to create cache objects + * + * This class can be overloaded with {@see SimplePie::set_cache_class()}, + * although the preferred way is to create your own handler + * via {@see register()} + * + * @package SimplePie + * @subpackage Caching + * @deprecated since SimplePie 1.8.0, use "SimplePie\SimplePie::set_cache()" instead + */ + class Cache + { + /** + * Cache handler classes + * + * These receive 3 parameters to their constructor, as documented in + * {@see register()} + * @var array + */ + protected static $handlers = ['mysql' => 'SimplePie\\Cache\\MySQL', 'memcache' => 'SimplePie\\Cache\\Memcache', 'memcached' => 'SimplePie\\Cache\\Memcached', 'redis' => 'SimplePie\\Cache\\Redis']; + /** + * Create a new SimplePie\Cache object + * + * @param string $location URL location (scheme is used to determine handler) + * @param string $filename Unique identifier for cache object + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $extension 'spi' or 'spc' + * @return Base Type of object depends on scheme of `$location` + */ + public static function get_handler($location, $filename, $extension) + { + } + /** + * Create a new SimplePie\Cache object + * + * @deprecated since SimplePie 1.3.1, use {@see get_handler()} instead + */ + public function create($location, $filename, $extension) + { + } + /** + * Register a handler + * + * @param string $type DSN type to register for + * @param class-string $class Name of handler class. Must implement Base + */ + public static function register($type, $class) + { + } + /** + * Parse a URL into an array + * + * @param string $url + * @return array + */ + public static function parse_URL($url) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache" instead */ + class SimplePie_Cache extends \SimplePie\Cache + { + } +} +namespace SimplePie\Cache { + /** + * Base for cache objects + * + * Classes to be used with {@see \SimplePie\Cache::register()} are expected + * to implement this interface. + * + * @package SimplePie + * @subpackage Caching + * @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead + */ + interface Base + { + /** + * Feed cache type + * + * @var string + */ + public const TYPE_FEED = 'spc'; + /** + * Image cache type + * + * @var string + */ + public const TYPE_IMAGE = 'spi'; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct($location, $name, $type); + /** + * Save data to the cache + * + * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data); + /** + * Retrieve the data saved to the cache + * + * @return array Data for SimplePie::$data + */ + public function load(); + /** + * Retrieve the last modified time for the cache + * + * @return int Timestamp + */ + public function mtime(); + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch(); + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink(); + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Base" instead */ + interface SimplePie_Cache_Base extends \SimplePie\Cache\Base + { + } +} +namespace SimplePie\Cache { + /** + * Base class for database-based caches + * + * @package SimplePie + * @subpackage Caching + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + abstract class DB implements \SimplePie\Cache\Base + { + /** + * Helper for database conversion + * + * Converts a given {@see SimplePie} object into data to be stored + * + * @param \SimplePie\SimplePie $data + * @return array First item is the serialized data for storage, second item is the unique ID for this item + */ + protected static function prepare_simplepie_object_for_cache($data) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\DB" instead */ + abstract class SimplePie_Cache_DB extends \SimplePie\Cache\DB + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to the filesystem + * + * @package SimplePie + * @subpackage Caching + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class File implements \SimplePie\Cache\Base + { + /** + * Location string + * + * @see SimplePie::$cache_location + * @var string + */ + protected $location; + /** + * Filename + * + * @var string + */ + protected $filename; + /** + * File extension + * + * @var string + */ + protected $extension; + /** + * File path + * + * @var string + */ + protected $name; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct($location, $name, $type) + { + } + /** + * Save data to the cache + * + * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\File" instead */ + class SimplePie_Cache_File extends \SimplePie\Cache\File + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to memcache + * + * Registered for URLs with the "memcache" protocol + * + * For example, `memcache://localhost:11211/?timeout=3600&prefix=sp_` will + * connect to memcache on `localhost` on port 11211. All tables will be + * prefixed with `sp_` and data will expire after 3600 seconds + * + * @package SimplePie + * @subpackage Caching + * @uses Memcache + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class Memcache implements \SimplePie\Cache\Base + { + /** + * Memcache instance + * + * @var Memcache + */ + protected $cache; + /** + * Options + * + * @var array + */ + protected $options; + /** + * Cache name + * + * @var string + */ + protected $name; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct($location, $name, $type) + { + } + /** + * Save data to the cache + * + * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcache" instead */ + class SimplePie_Cache_Memcache extends \SimplePie\Cache\Memcache + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to memcached + * + * Registered for URLs with the "memcached" protocol + * + * For example, `memcached://localhost:11211/?timeout=3600&prefix=sp_` will + * connect to memcached on `localhost` on port 11211. All tables will be + * prefixed with `sp_` and data will expire after 3600 seconds + * + * @package SimplePie + * @subpackage Caching + * @author Paul L. McNeely + * @uses Memcached + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class Memcached implements \SimplePie\Cache\Base + { + /** + * NativeMemcached instance + * @var NativeMemcached + */ + protected $cache; + /** + * Options + * @var array + */ + protected $options; + /** + * Cache name + * @var string + */ + protected $name; + /** + * Create a new cache object + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct($location, $name, $type) + { + } + /** + * Save data to the cache + * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * @return array Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * @return int Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcached" instead */ + class SimplePie_Cache_Memcached extends \SimplePie\Cache\Memcached + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to a MySQL database + * + * Registered for URLs with the "mysql" protocol + * + * For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will + * connect to the `mydb` database on `localhost` on port 3306, with the user + * `root` and the password `password`. All tables will be prefixed with `sp_` + * + * @package SimplePie + * @subpackage Caching + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class MySQL extends \SimplePie\Cache\DB + { + /** + * PDO instance + * + * @var \PDO + */ + protected $mysql; + /** + * Options + * + * @var array + */ + protected $options; + /** + * Cache ID + * + * @var string + */ + protected $id; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + * @phpstan-return void + */ + public function __construct($location, $name, $type) + { + } + /** + * Save data to the cache + * + * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\MySQL" instead */ + class SimplePie_Cache_MySQL extends \SimplePie\Cache\MySQL + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to redis + * + * Registered for URLs with the "redis" protocol + * + * For example, `redis://localhost:6379/?timeout=3600&prefix=sp_&dbIndex=0` will + * connect to redis on `localhost` on port 6379. All tables will be + * prefixed with `simple_primary-` and data will expire after 3600 seconds + * + * @package SimplePie + * @subpackage Caching + * @uses Redis + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class Redis implements \SimplePie\Cache\Base + { + /** + * Redis instance + * + * @var NativeRedis + */ + protected $cache; + /** + * Options + * + * @var array + */ + protected $options; + /** + * Cache name + * + * @var string + */ + protected $name; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct($location, $name, $options = null) + { + } + /** + * @param NativeRedis $cache + */ + public function setRedisClient(\Redis $cache) + { + } + /** + * Save data to the cache + * + * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Redis" instead */ + class SimplePie_Cache_Redis extends \SimplePie\Cache\Redis + { + } +} +namespace SimplePie { + /** + * Handles `` captions as defined in Media RSS. + * + * Used by {@see \SimplePie\Enclosure::get_caption()} and {@see \SimplePie\Enclosure::get_captions()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_caption_class()} + * + * @package SimplePie + * @subpackage API + */ + class Caption + { + /** + * Content type + * + * @var string + * @see get_type() + */ + public $type; + /** + * Language + * + * @var string + * @see get_language() + */ + public $lang; + /** + * Start time + * + * @var string + * @see get_starttime() + */ + public $startTime; + /** + * End time + * + * @var string + * @see get_endtime() + */ + public $endTime; + /** + * Caption text + * + * @var string + * @see get_text() + */ + public $text; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct($type = null, $lang = null, $startTime = null, $endTime = null, $text = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the end time + * + * @return string|null Time in the format 'hh:mm:ss.SSS' + */ + public function get_endtime() + { + } + /** + * Get the language + * + * @link http://tools.ietf.org/html/rfc3066 + * @return string|null Language code as per RFC 3066 + */ + public function get_language() + { + } + /** + * Get the start time + * + * @return string|null Time in the format 'hh:mm:ss.SSS' + */ + public function get_starttime() + { + } + /** + * Get the text of the caption + * + * @return string|null + */ + public function get_text() + { + } + /** + * Get the content type (not MIME type) + * + * @return string|null Either 'text' or 'html' + */ + public function get_type() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Caption" instead */ + class SimplePie_Caption extends \SimplePie\Caption + { + } +} +namespace SimplePie { + /** + * Manages all category-related data + * + * Used by {@see \SimplePie\Item::get_category()} and {@see \SimplePie\Item::get_categories()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_category_class()} + * + * @package SimplePie + * @subpackage API + */ + class Category + { + /** + * Category identifier + * + * @var string|null + * @see get_term + */ + public $term; + /** + * Categorization scheme identifier + * + * @var string|null + * @see get_scheme() + */ + public $scheme; + /** + * Human readable label + * + * @var string|null + * @see get_label() + */ + public $label; + /** + * Category type + * + * category for + * subject for + * + * @var string|null + * @see get_type() + */ + public $type; + /** + * Constructor, used to input the data + * + * @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, $type = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the category identifier + * + * @return string|null + */ + public function get_term() + { + } + /** + * Get the categorization scheme identifier + * + * @return string|null + */ + public function get_scheme() + { + } + /** + * Get the human readable label + * + * @param bool $strict + * @return string|null + */ + public function get_label($strict = false) + { + } + /** + * Get the category type + * + * @return string|null + */ + public function get_type() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Category" instead */ + class SimplePie_Category extends \SimplePie\Category + { + } +} +namespace SimplePie\Content\Type { + /** + * Content-type sniffing + * + * Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06 + * + * This is used since we can't always trust Content-Type headers, and is based + * upon the HTML5 parsing rules. + * + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_content_type_sniffer_class()} + * + * @package SimplePie + * @subpackage HTTP + */ + class Sniffer + { + /** + * File object + * + * @var \SimplePie\File + */ + public $file; + /** + * Create an instance of the class with the input file + * + * @param Sniffer $file Input file + */ + public function __construct($file) + { + } + /** + * Get the Content-Type of the specified file + * + * @return string Actual Content-Type + */ + public function get_type() + { + } + /** + * Sniff text or binary + * + * @return string Actual Content-Type + */ + public function text_or_binary() + { + } + /** + * Sniff unknown + * + * @return string Actual Content-Type + */ + public function unknown() + { + } + /** + * Sniff images + * + * @return string Actual Content-Type + */ + public function image() + { + } + /** + * Sniff HTML + * + * @return string Actual Content-Type + */ + public function feed_or_html() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Content\Type\Sniffer" instead */ + class SimplePie_Content_Type_Sniffer extends \SimplePie\Content\Type\Sniffer + { + } +} +namespace SimplePie { + /** + * Manages `` copyright tags as defined in Media RSS + * + * Used by {@see \SimplePie\Enclosure::get_copyright()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_copyright_class()} + * + * @package SimplePie + * @subpackage API + */ + class Copyright + { + /** + * Copyright URL + * + * @var string + * @see get_url() + */ + public $url; + /** + * Attribution + * + * @var string + * @see get_attribution() + */ + public $label; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct($url = null, $label = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the copyright URL + * + * @return string|null URL to copyright information + */ + public function get_url() + { + } + /** + * Get the attribution text + * + * @return string|null + */ + public function get_attribution() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Copyright" instead */ + class SimplePie_Copyright extends \SimplePie\Copyright + { + } /** * SimplePie class. * @@ -23395,17 +23927,19 @@ public static function merge_items($urls, $start = 0, $end = 0, $limit = 0) class SimplePie_Core extends \SimplePie { } +} +namespace SimplePie { /** * Handles `` as defined in Media RSS * - * Used by {@see SimplePie_Enclosure::get_credit()} and {@see SimplePie_Enclosure::get_credits()} + * Used by {@see \SimplePie\Enclosure::get_credit()} and {@see \SimplePie\Enclosure::get_credits()} * - * This class can be overloaded with {@see SimplePie::set_credit_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_credit_class()} * * @package SimplePie * @subpackage API */ - class SimplePie_Credit + class Credit { /** * Credited role @@ -23413,28 +23947,28 @@ class SimplePie_Credit * @var string * @see get_role() */ - var $role; + public $role; /** * Organizational scheme * * @var string * @see get_scheme() */ - var $scheme; + public $scheme; /** * Credited name * * @var string * @see get_name() */ - var $name; + public $name; /** * Constructor, used to input the data * * For documentation on all the parameters, see the corresponding * properties and their accessors */ - public function __construct($role = \null, $scheme = \null, $name = \null) + public function __construct($role = null, $scheme = null, $name = null) { } /** @@ -23470,6 +24004,12 @@ public function get_name() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Credit" instead */ + class SimplePie_Credit extends \SimplePie\Credit + { + } /** * Decode HTML Entities * @@ -23486,21 +24026,21 @@ class SimplePie_Decode_HTML_Entities * @access private * @var string */ - var $data = ''; + public $data = ''; /** * Currently consumed bytes * * @access private * @var string */ - var $consumed = ''; + public $consumed = ''; /** * Position of the current byte being parsed * * @access private * @var int */ - var $position = 0; + public $position = 0; /** * Create an instance of the class with the input data * @@ -23555,153 +24095,155 @@ public function entity() { } } +} +namespace SimplePie { /** * Handles everything related to enclosures (including Media RSS and iTunes RSS) * - * Used by {@see SimplePie_Item::get_enclosure()} and {@see SimplePie_Item::get_enclosures()} + * Used by {@see \SimplePie\Item::get_enclosure()} and {@see \SimplePie\Item::get_enclosures()} * - * This class can be overloaded with {@see SimplePie::set_enclosure_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_enclosure_class()} * * @package SimplePie * @subpackage API */ - class SimplePie_Enclosure + class Enclosure { /** * @var string * @see get_bitrate() */ - var $bitrate; + public $bitrate; /** * @var array * @see get_captions() */ - var $captions; + public $captions; /** * @var array * @see get_categories() */ - var $categories; + public $categories; /** * @var int * @see get_channels() */ - var $channels; + public $channels; /** - * @var SimplePie_Copyright + * @var \SimplePie\Copyright * @see get_copyright() */ - var $copyright; + public $copyright; /** * @var array * @see get_credits() */ - var $credits; + public $credits; /** * @var string * @see get_description() */ - var $description; + public $description; /** * @var int * @see get_duration() */ - var $duration; + public $duration; /** * @var string * @see get_expression() */ - var $expression; + public $expression; /** * @var string * @see get_framerate() */ - var $framerate; + public $framerate; /** * @var string * @see get_handler() */ - var $handler; + public $handler; /** * @var array * @see get_hashes() */ - var $hashes; + public $hashes; /** * @var string * @see get_height() */ - var $height; + public $height; /** * @deprecated * @var null */ - var $javascript; + public $javascript; /** * @var array * @see get_keywords() */ - var $keywords; + public $keywords; /** * @var string * @see get_language() */ - var $lang; + public $lang; /** * @var string * @see get_length() */ - var $length; + public $length; /** * @var string * @see get_link() */ - var $link; + public $link; /** * @var string * @see get_medium() */ - var $medium; + public $medium; /** * @var string * @see get_player() */ - var $player; + public $player; /** * @var array * @see get_ratings() */ - var $ratings; + public $ratings; /** * @var array * @see get_restrictions() */ - var $restrictions; + public $restrictions; /** * @var string * @see get_sampling_rate() */ - var $samplingrate; + public $samplingrate; /** * @var array * @see get_thumbnails() */ - var $thumbnails; + public $thumbnails; /** * @var string * @see get_title() */ - var $title; + public $title; /** * @var string * @see get_type() */ - var $type; + public $type; /** * @var string * @see get_width() */ - var $width; + public $width; /** * Constructor, used to input the data * @@ -23710,7 +24252,7 @@ class SimplePie_Enclosure * * @uses idna_convert If available, this will convert an IDN */ - public function __construct($link = \null, $type = \null, $length = \null, $javascript = \null, $bitrate = \null, $captions = \null, $categories = \null, $channels = \null, $copyright = \null, $credits = \null, $description = \null, $duration = \null, $expression = \null, $framerate = \null, $hashes = \null, $height = \null, $keywords = \null, $lang = \null, $medium = \null, $player = \null, $ratings = \null, $restrictions = \null, $samplingrate = \null, $thumbnails = \null, $title = \null, $width = \null) + public function __construct($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null) { } /** @@ -23733,7 +24275,7 @@ public function get_bitrate() * Get a single caption * * @param int $key - * @return SimplePie_Caption|null + * @return \SimplePie\Caption|null */ public function get_caption($key = 0) { @@ -23741,7 +24283,7 @@ public function get_caption($key = 0) /** * Get all captions * - * @return array|null Array of {@see SimplePie_Caption} objects + * @return array|null Array of {@see \SimplePie\Caption} objects */ public function get_captions() { @@ -23750,7 +24292,7 @@ public function get_captions() * Get a single category * * @param int $key - * @return SimplePie_Category|null + * @return \SimplePie\Category|null */ public function get_category($key = 0) { @@ -23758,7 +24300,7 @@ public function get_category($key = 0) /** * Get all categories * - * @return array|null Array of {@see SimplePie_Category} objects + * @return array|null Array of {@see \SimplePie\Category} objects */ public function get_categories() { @@ -23774,7 +24316,7 @@ public function get_channels() /** * Get the copyright information * - * @return SimplePie_Copyright|null + * @return \SimplePie\Copyright|null */ public function get_copyright() { @@ -23783,7 +24325,7 @@ public function get_copyright() * Get a single credit * * @param int $key - * @return SimplePie_Credit|null + * @return \SimplePie\Credit|null */ public function get_credit($key = 0) { @@ -23791,7 +24333,7 @@ public function get_credit($key = 0) /** * Get all credits * - * @return array|null Array of {@see SimplePie_Credit} objects + * @return array|null Array of {@see \SimplePie\Credit} objects */ public function get_credits() { @@ -23810,7 +24352,7 @@ public function get_description() * @param bool $convert Convert seconds into hh:mm:ss * @return string|int|null 'hh:mm:ss' string if `$convert` was specified, otherwise integer (or null if none found) */ - public function get_duration($convert = \false) + public function get_duration($convert = false) { } /** @@ -23935,7 +24477,7 @@ public function get_player() * Get a single rating * * @param int $key - * @return SimplePie_Rating|null + * @return \SimplePie\Rating|null */ public function get_rating($key = 0) { @@ -23943,7 +24485,7 @@ public function get_rating($key = 0) /** * Get all ratings * - * @return array|null Array of {@see SimplePie_Rating} objects + * @return array|null Array of {@see \SimplePie\Rating} objects */ public function get_ratings() { @@ -23952,7 +24494,7 @@ public function get_ratings() * Get a single restriction * * @param int $key - * @return SimplePie_Restriction|null + * @return \SimplePie\Restriction|null */ public function get_restriction($key = 0) { @@ -23960,7 +24502,7 @@ public function get_restriction($key = 0) /** * Get all restrictions * - * @return array|null Array of {@see SimplePie_Restriction} objects + * @return array|null Array of {@see \SimplePie\Restriction} objects */ public function get_restrictions() { @@ -24028,7 +24570,7 @@ public function get_width() * * @deprecated Use the second parameter to {@see embed} instead * - * @param array|string $options See first paramter to {@see embed} + * @param array|string $options See first parameter to {@see embed} * @return string HTML string to output */ public function native_embed($options = '') @@ -24079,7 +24621,7 @@ public function native_embed($options = '') * @param bool $native Use `` * @return string HTML string to output */ - public function embed($options = '', $native = \false) + public function embed($options = '', $native = false) { } /** @@ -24093,52 +24635,76 @@ public function embed($options = '', $native = \false) * @param bool $find_handler Internal use only, use {@see get_handler()} instead * @return string MIME type */ - public function get_real_type($find_handler = \false) + public function get_real_type($find_handler = false) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Enclosure" instead */ + class SimplePie_Enclosure extends \SimplePie\Enclosure + { + } +} +namespace SimplePie { /** * General SimplePie exception class * * @package SimplePie */ - class SimplePie_Exception extends \Exception + class Exception extends \Exception + { + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Exception" instead */ + class SimplePie_Exception extends \SimplePie\Exception { } +} +namespace SimplePie { /** * Used for fetching remote files and reading local files * * Supports HTTP 1.0 via cURL or fsockopen, with spotty HTTP 1.1 support * - * This class can be overloaded with {@see SimplePie::set_file_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_file_class()} * * @package SimplePie * @subpackage HTTP * @todo Move to properly supporting RFC2616 (HTTP/1.1) */ - class SimplePie_File + class File { - var $url; - var $useragent; - var $success = \true; - var $headers = array(); - var $body; - var $status_code; - var $redirects = 0; - var $error; - var $method = \SIMPLEPIE_FILE_SOURCE_NONE; - var $permanent_url; - public function __construct($url, $timeout = 10, $redirects = 5, $headers = \null, $useragent = \null, $force_fsockopen = \false, $curl_options = array()) + public $url; + public $useragent; + public $success = true; + public $headers = []; + public $body; + public $status_code = 0; + public $redirects = 0; + public $error; + public $method = \SimplePie\SimplePie::FILE_SOURCE_NONE; + public $permanent_url; + public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false, $curl_options = []) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\File" instead */ + class SimplePie_File extends \SimplePie\File + { + } +} +namespace SimplePie\HTTP { /** * HTTP Response Parser * * @package SimplePie * @subpackage HTTP */ - class SimplePie_HTTP_Parser + class Parser { /** * HTTP Version @@ -24163,7 +24729,7 @@ class SimplePie_HTTP_Parser * * @var array */ - public $headers = array(); + public $headers = []; /** * Body of the response * @@ -24173,9 +24739,9 @@ class SimplePie_HTTP_Parser /** * Current state of the state machine * - * @var string + * @var self::STATE_* */ - protected $state = 'http_version'; + protected $state = self::STATE_HTTP_VERSION; /** * Input data * @@ -24329,6 +24895,14 @@ public static function prepareHeaders($headers, $count = 1) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\HTTP\Parser" instead */ + class SimplePie_HTTP_Parser extends \SimplePie\HTTP\Parser + { + } +} +namespace SimplePie { /** * IRI parser/serialiser/normaliser * @@ -24340,32 +24914,32 @@ public static function prepareHeaders($headers, $count = 1) * @copyright 2007-2012 Sam Sneddon, Steve Minutillo, Ryan McCue * @license http://www.opensource.org/licenses/bsd-license.php */ - class SimplePie_IRI + class IRI { /** * Scheme * * @var string */ - protected $scheme = \null; + protected $scheme = null; /** * User Information * * @var string */ - protected $iuserinfo = \null; + protected $iuserinfo = null; /** * ihost * * @var string */ - protected $ihost = \null; + protected $ihost = null; /** * Port * * @var string */ - protected $port = \null; + protected $port = null; /** * ipath * @@ -24377,20 +24951,20 @@ class SimplePie_IRI * * @var string */ - protected $iquery = \null; + protected $iquery = null; /** * ifragment * * @var string */ - protected $ifragment = \null; + protected $ifragment = null; /** * Normalization database * * Each key is the scheme, each value is an array with each key as the IRI * part and value as the default value for that part. */ - protected $normalization = array('acap' => array('port' => 674), 'dict' => array('port' => 2628), 'file' => array('ihost' => 'localhost'), 'http' => array('port' => 80, 'ipath' => '/'), 'https' => array('port' => 443, 'ipath' => '/')); + protected $normalization = ['acap' => ['port' => 674], 'dict' => ['port' => 2628], 'file' => ['ihost' => 'localhost'], 'http' => ['port' => 80, 'ipath' => '/'], 'https' => ['port' => 443, 'ipath' => '/']]; /** * Return the entire IRI when you try and read the object as a string * @@ -24439,7 +25013,7 @@ public function __unset($name) * * @param string $iri */ - public function __construct($iri = \null) + public function __construct($iri = null) { } /** @@ -24487,7 +25061,7 @@ protected function remove_dot_segments($input) * @param bool $iprivate Allow iprivate * @return string */ - protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = \false) + protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false) { } /** @@ -24521,7 +25095,7 @@ public function is_valid() * @param string $iri * @return bool */ - public function set_iri($iri, $clear_cache = \false) + public function set_iri($iri, $clear_cache = false) { } /** @@ -24541,7 +25115,7 @@ public function set_scheme($scheme) * @param string $authority * @return bool */ - public function set_authority($authority, $clear_cache = \false) + public function set_authority($authority, $clear_cache = false) { } /** @@ -24579,7 +25153,7 @@ public function set_port($port) * @param string $ipath * @return bool */ - public function set_path($ipath, $clear_cache = \false) + public function set_path($ipath, $clear_cache = false) { } /** @@ -24641,46 +25215,72 @@ protected function get_authority() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\IRI" instead */ + class SimplePie_IRI extends \SimplePie\IRI + { + } +} +namespace SimplePie { + /** + * Handles the injection of Registry into other class + * + * {@see \SimplePie\SimplePie::get_registry()} + * + * @package SimplePie + */ + interface RegistryAware + { + /** + * Set the Registry into the class + * + * @param Registry $registry + * + * @return void + */ + public function set_registry(\SimplePie\Registry $registry); + } /** * Manages all item-related data * - * Used by {@see SimplePie::get_item()} and {@see SimplePie::get_items()} + * Used by {@see \SimplePie\SimplePie::get_item()} and {@see \SimplePie\SimplePie::get_items()} * - * This class can be overloaded with {@see SimplePie::set_item_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_item_class()} * - * @package SimplePie + * @package \SimplePie\SimplePie * @subpackage API */ - class SimplePie_Item + class Item implements \SimplePie\RegistryAware { /** * Parent feed * * @access private - * @var SimplePie + * @var \SimplePie\SimplePie */ - var $feed; + public $feed; /** * Raw data * * @access private * @var array */ - var $data = array(); + public $data = []; /** * Registry object * * @see set_registry - * @var SimplePie_Registry + * @var \SimplePie\Registry */ protected $registry; /** * Create a new item object * - * This is usually used by {@see SimplePie::get_items} and - * {@see SimplePie::get_item}. Avoid creating this manually. + * This is usually used by {@see \SimplePie\SimplePie::get_items} and + * {@see \SimplePie\SimplePie::get_item}. Avoid creating this manually. * - * @param SimplePie $feed Parent feed + * @param \SimplePie\SimplePie $feed Parent feed * @param array $data Raw data */ public function __construct($feed, $data) @@ -24689,12 +25289,12 @@ public function __construct($feed, $data) /** * Set the registry handler * - * This is usually used by {@see SimplePie_Registry::create} + * This is usually used by {@see \SimplePie\Registry::create} * * @since 1.3 - * @param SimplePie_Registry $registry + * @param \SimplePie\Registry $registry */ - public function set_registry(\SimplePie_Registry $registry) + public function set_registry(\SimplePie\Registry $registry) { } /** @@ -24717,7 +25317,7 @@ public function __destruct() * This method allows you to get access to ANY element/attribute that is a * sub-element of the item/entry tag. * - * See {@see SimplePie::get_feed_tags()} for a description of the return value + * See {@see \SimplePie\SimplePie::get_feed_tags()} for a description of the return value * * @since 1.0 * @see http://simplepie.org/wiki/faq/supported_xml_namespaces @@ -24729,23 +25329,22 @@ public function get_item_tags($namespace, $tag) { } /** - * Get the base URL value from the parent feed - * - * Uses `` + * Get the base URL value. + * Uses ``, or item link, or feed base URL. * * @param array $element * @return string */ - public function get_base($element = array()) + public function get_base($element = []) { } /** * Sanitize feed data * * @access private - * @see SimplePie::sanitize() + * @see \SimplePie\SimplePie::sanitize() * @param string $data Data to sanitize - * @param int $type One of the SIMPLEPIE_CONSTRUCT_* constants + * @param int $type One of the \SimplePie\SimplePie::CONSTRUCT_* constants * @param string $base Base URL to resolve URLs against * @return string Sanitized data */ @@ -24759,7 +25358,7 @@ public function sanitize($data, $type, $base = '') * * @link http://simplepie.org/faq/typical_multifeed_gotchas#missing_data_from_feed * @since 1.0 - * @return SimplePie + * @return \SimplePie\SimplePie */ public function get_feed() { @@ -24778,7 +25377,7 @@ public function get_feed() * @param string|false $fn User-supplied function to generate an hash * @return string|null */ - public function get_id($hash = \false, $fn = 'md5') + public function get_id($hash = false, $fn = 'md5') { } /** @@ -24807,7 +25406,7 @@ public function get_title() * @param boolean $description_only Should we avoid falling back to the content? * @return string|null */ - public function get_description($description_only = \false) + public function get_description($description_only = false) { } /** @@ -24824,7 +25423,7 @@ public function get_description($description_only = \false) * @param boolean $content_only Should we avoid falling back to the description? * @return string|null */ - public function get_content($content_only = \false) + public function get_content($content_only = false) { } /** @@ -24843,7 +25442,7 @@ public function get_thumbnail() * * @since Beta 3 (previously called `get_categories()` since Beta 2) * @param int $key The category that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Category|null + * @return \SimplePie\Category|null */ public function get_category($key = 0) { @@ -24854,7 +25453,7 @@ public function get_category($key = 0) * Uses ``, `` or `` * * @since Beta 3 - * @return SimplePie_Category[]|null List of {@see SimplePie_Category} objects + * @return \SimplePie\Category[]|null List of {@see \SimplePie\Category} objects */ public function get_categories() { @@ -24864,7 +25463,7 @@ public function get_categories() * * @since Beta 2 * @param int $key The author that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Author|null + * @return \SimplePie\Author|null */ public function get_author($key = 0) { @@ -24874,7 +25473,7 @@ public function get_author($key = 0) * * @since 1.1 * @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Author|null + * @return \SimplePie\Author|null */ public function get_contributor($key = 0) { @@ -24885,7 +25484,7 @@ public function get_contributor($key = 0) * Uses `` * * @since 1.1 - * @return SimplePie_Author[]|null List of {@see SimplePie_Author} objects + * @return \SimplePie\Author[]|null List of {@see \SimplePie\Author} objects */ public function get_contributors() { @@ -24896,7 +25495,7 @@ public function get_contributors() * Uses ``, ``, `` or `` * * @since Beta 2 - * @return SimplePie_Author[]|null List of {@see SimplePie_Author} objects + * @return \SimplePie\Author[]|null List of {@see \SimplePie\Author} objects */ public function get_authors() { @@ -25023,9 +25622,9 @@ public function get_links($rel = 'alternate') * @since Beta 2 * @todo Add ability to prefer one type of content over another (in a media group). * @param int $key The enclosure that you want to return. Remember that arrays begin with 0, not 1 - * @return SimplePie_Enclosure|null + * @return \SimplePie\Enclosure|null */ - public function get_enclosure($key = 0, $prefer = \null) + public function get_enclosure($key = 0, $prefer = null) { } /** @@ -25040,7 +25639,7 @@ public function get_enclosure($key = 0, $prefer = \null) * @since Beta 2 * @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4). * @todo If an element exists at a level, but its value is empty, we should fall back to the value from the parent (if it exists). - * @return SimplePie_Enclosure[]|null List of SimplePie_Enclosure items + * @return \SimplePie\Enclosure[]|null List of \SimplePie\Enclosure items */ public function get_enclosures() { @@ -25079,47 +25678,55 @@ public function get_longitude() * Get the `` for the item * * @since 1.1 - * @return SimplePie_Source|null + * @return \SimplePie\Source|null */ public function get_source() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Item" instead */ + class SimplePie_Item extends \SimplePie\Item + { + } +} +namespace SimplePie { /** * Used for feed auto-discovery * * - * This class can be overloaded with {@see SimplePie::set_locator_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_locator_class()} * * @package SimplePie */ - class SimplePie_Locator + class Locator implements \SimplePie\RegistryAware { - var $useragent; - var $timeout; - var $file; - var $local = array(); - var $elsewhere = array(); - var $cached_entities = array(); - var $http_base; - var $base; - var $base_location = 0; - var $checked_feeds = 0; - var $max_checked_feeds = 10; - var $force_fsockopen = \false; - var $curl_options = array(); - var $dom; + public $useragent; + public $timeout; + public $file; + public $local = []; + public $elsewhere = []; + public $cached_entities = []; + public $http_base; + public $base; + public $base_location = 0; + public $checked_feeds = 0; + public $max_checked_feeds = 10; + public $force_fsockopen = false; + public $curl_options = []; + public $dom; protected $registry; - public function __construct(\SimplePie_File $file, $timeout = 10, $useragent = \null, $max_checked_feeds = 10, $force_fsockopen = \false, $curl_options = array()) + public function __construct(\SimplePie\File $file, $timeout = 10, $useragent = null, $max_checked_feeds = 10, $force_fsockopen = false, $curl_options = []) { } - public function set_registry(\SimplePie_Registry $registry) + public function set_registry(\SimplePie\Registry $registry) { } - public function find($type = \SIMPLEPIE_LOCATOR_ALL, &$working = \null) + public function find($type = \SimplePie\SimplePie::LOCATOR_ALL, &$working = null) { } - public function is_feed($file, $check_html = \false) + public function is_feed($file, $check_html = false) { } public function get_base() @@ -25144,12 +25751,20 @@ public function body(&$array) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Locator" instead */ + class SimplePie_Locator extends \SimplePie\Locator + { + } +} +namespace SimplePie { /** - * Miscellanous utilities + * Miscellaneous utilities * * @package SimplePie */ - class SimplePie_Misc + class Misc { public static function time_hms($seconds) { @@ -25160,7 +25775,7 @@ public static function absolutize_url($relative, $base) /** * Get a HTML/XML element from a HTML string * - * @deprecated Use DOMDocument instead (parsing HTML with regex is bad!) + * @deprecated since SimplePie 1.3, use DOMDocument instead (parsing HTML with regex is bad!) * @param string $realname Element name (including namespace prefix if applicable) * @param string $string HTML document * @return array @@ -25177,6 +25792,9 @@ public static function error($message, $level, $file, $line) public static function fix_protocol($url, $http = 1) { } + /** + * @deprecated since SimplePie 1.8.0, use PHP native array_replace_recursive() instead. + */ public static function array_merge_recursive($array1, $array2) { } @@ -25260,7 +25878,7 @@ public static function parse_date($dt) /** * Decode HTML entities * - * @deprecated Use DOMDocument instead + * @deprecated since SimplePie 1.3, use DOMDocument instead * @param string $data Input data * @return string Output data */ @@ -25322,7 +25940,7 @@ public static function parse_str($str) * * @todo Add support for EBCDIC * @param string $data XML data - * @param SimplePie_Registry $registry Class registry + * @param \SimplePie\Registry $registry Class registry * @return array Possible encodings */ public static function xml_encoding($data, $registry) @@ -25340,6 +25958,14 @@ public static function output_javascript() public static function get_build() { } + /** + * Get the default user agent string + * + * @return string + */ + public static function get_default_useragent() + { + } /** * Format debugging information */ @@ -25358,6 +25984,14 @@ public static function url_remove_credentials($url) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Misc" instead */ + class SimplePie_Misc extends \SimplePie\Misc + { + } +} +namespace SimplePie\Net { /** * Class to validate and to work with IPv6 addresses. * @@ -25371,7 +26005,7 @@ public static function url_remove_credentials($url) * @author Josh Peck * @author Sam Sneddon */ - class SimplePie_Net_IPv6 + class IPv6 { /** * Uncompresses an IPv6 address @@ -25426,7 +26060,7 @@ public static function check_ipv6($ip) * Checks if the given IP is a valid IPv6 address * * @codeCoverageIgnore - * @deprecated Use {@see SimplePie_Net_IPv6::check_ipv6()} instead + * @deprecated Use {@see IPv6::check_ipv6()} instead * @see check_ipv6 * @param string $ip An IPv6 address * @return bool true if $ip is a valid IPv6 address @@ -25435,13 +26069,21 @@ public static function checkIPv6($ip) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Net\IPv6" instead */ + class SimplePie_Net_IPv6 extends \SimplePie\Net\IPv6 + { + } +} +namespace SimplePie\Parse { /** * Date Parser * * @package SimplePie * @subpackage Parsing */ - class SimplePie_Parse_Date + class Date { /** * Input data @@ -25449,14 +26091,14 @@ class SimplePie_Parse_Date * @access protected * @var string */ - var $date; + public $date; /** * List of days, calendar day name => ordinal day number in the week * * @access protected * @var array */ - var $day = array( + public $day = [ // English 'mon' => 1, 'monday' => 1, @@ -25553,14 +26195,14 @@ class SimplePie_Parse_Date 'Пт.' => 5, 'Сб.' => 6, 'Вс.' => 7, - ); + ]; /** * List of months, calendar month name => calendar month number * * @access protected * @var array */ - var $month = array( + public $month = [ // English 'jan' => 1, 'january' => 1, @@ -25734,44 +26376,44 @@ class SimplePie_Parse_Date 'ноября' => 11, 'Дек' => 12, 'декабря' => 12, - ); + ]; /** * List of timezones, abbreviation => offset from UTC * * @access protected * @var array */ - var $timezone = array('ACDT' => 37800, 'ACIT' => 28800, 'ACST' => 34200, 'ACT' => -18000, 'ACWDT' => 35100, 'ACWST' => 31500, 'AEDT' => 39600, 'AEST' => 36000, 'AFT' => 16200, 'AKDT' => -28800, 'AKST' => -32400, 'AMDT' => 18000, 'AMT' => -14400, 'ANAST' => 46800, 'ANAT' => 43200, 'ART' => -10800, 'AZOST' => -3600, 'AZST' => 18000, 'AZT' => 14400, 'BIOT' => 21600, 'BIT' => -43200, 'BOT' => -14400, 'BRST' => -7200, 'BRT' => -10800, 'BST' => 3600, 'BTT' => 21600, 'CAST' => 18000, 'CAT' => 7200, 'CCT' => 23400, 'CDT' => -18000, 'CEDT' => 7200, 'CEST' => 7200, 'CET' => 3600, 'CGST' => -7200, 'CGT' => -10800, 'CHADT' => 49500, 'CHAST' => 45900, 'CIST' => -28800, 'CKT' => -36000, 'CLDT' => -10800, 'CLST' => -14400, 'COT' => -18000, 'CST' => -21600, 'CVT' => -3600, 'CXT' => 25200, 'DAVT' => 25200, 'DTAT' => 36000, 'EADT' => -18000, 'EAST' => -21600, 'EAT' => 10800, 'ECT' => -18000, 'EDT' => -14400, 'EEST' => 10800, 'EET' => 7200, 'EGT' => -3600, 'EKST' => 21600, 'EST' => -18000, 'FJT' => 43200, 'FKDT' => -10800, 'FKST' => -14400, 'FNT' => -7200, 'GALT' => -21600, 'GEDT' => 14400, 'GEST' => 10800, 'GFT' => -10800, 'GILT' => 43200, 'GIT' => -32400, 'GST' => 14400, 'GST' => -7200, 'GYT' => -14400, 'HAA' => -10800, 'HAC' => -18000, 'HADT' => -32400, 'HAE' => -14400, 'HAP' => -25200, 'HAR' => -21600, 'HAST' => -36000, 'HAT' => -9000, 'HAY' => -28800, 'HKST' => 28800, 'HMT' => 18000, 'HNA' => -14400, 'HNC' => -21600, 'HNE' => -18000, 'HNP' => -28800, 'HNR' => -25200, 'HNT' => -12600, 'HNY' => -32400, 'IRDT' => 16200, 'IRKST' => 32400, 'IRKT' => 28800, 'IRST' => 12600, 'JFDT' => -10800, 'JFST' => -14400, 'JST' => 32400, 'KGST' => 21600, 'KGT' => 18000, 'KOST' => 39600, 'KOVST' => 28800, 'KOVT' => 25200, 'KRAST' => 28800, 'KRAT' => 25200, 'KST' => 32400, 'LHDT' => 39600, 'LHST' => 37800, 'LINT' => 50400, 'LKT' => 21600, 'MAGST' => 43200, 'MAGT' => 39600, 'MAWT' => 21600, 'MDT' => -21600, 'MESZ' => 7200, 'MEZ' => 3600, 'MHT' => 43200, 'MIT' => -34200, 'MNST' => 32400, 'MSDT' => 14400, 'MSST' => 10800, 'MST' => -25200, 'MUT' => 14400, 'MVT' => 18000, 'MYT' => 28800, 'NCT' => 39600, 'NDT' => -9000, 'NFT' => 41400, 'NMIT' => 36000, 'NOVST' => 25200, 'NOVT' => 21600, 'NPT' => 20700, 'NRT' => 43200, 'NST' => -12600, 'NUT' => -39600, 'NZDT' => 46800, 'NZST' => 43200, 'OMSST' => 25200, 'OMST' => 21600, 'PDT' => -25200, 'PET' => -18000, 'PETST' => 46800, 'PETT' => 43200, 'PGT' => 36000, 'PHOT' => 46800, 'PHT' => 28800, 'PKT' => 18000, 'PMDT' => -7200, 'PMST' => -10800, 'PONT' => 39600, 'PST' => -28800, 'PWT' => 32400, 'PYST' => -10800, 'PYT' => -14400, 'RET' => 14400, 'ROTT' => -10800, 'SAMST' => 18000, 'SAMT' => 14400, 'SAST' => 7200, 'SBT' => 39600, 'SCDT' => 46800, 'SCST' => 43200, 'SCT' => 14400, 'SEST' => 3600, 'SGT' => 28800, 'SIT' => 28800, 'SRT' => -10800, 'SST' => -39600, 'SYST' => 10800, 'SYT' => 7200, 'TFT' => 18000, 'THAT' => -36000, 'TJT' => 18000, 'TKT' => -36000, 'TMT' => 18000, 'TOT' => 46800, 'TPT' => 32400, 'TRUT' => 36000, 'TVT' => 43200, 'TWT' => 28800, 'UYST' => -7200, 'UYT' => -10800, 'UZT' => 18000, 'VET' => -14400, 'VLAST' => 39600, 'VLAT' => 36000, 'VOST' => 21600, 'VUT' => 39600, 'WAST' => 7200, 'WAT' => 3600, 'WDT' => 32400, 'WEST' => 3600, 'WFT' => 43200, 'WIB' => 25200, 'WIT' => 32400, 'WITA' => 28800, 'WKST' => 18000, 'WST' => 28800, 'YAKST' => 36000, 'YAKT' => 32400, 'YAPT' => 36000, 'YEKST' => 21600, 'YEKT' => 18000); + public $timezone = ['ACDT' => 37800, 'ACIT' => 28800, 'ACST' => 34200, 'ACT' => -18000, 'ACWDT' => 35100, 'ACWST' => 31500, 'AEDT' => 39600, 'AEST' => 36000, 'AFT' => 16200, 'AKDT' => -28800, 'AKST' => -32400, 'AMDT' => 18000, 'AMT' => -14400, 'ANAST' => 46800, 'ANAT' => 43200, 'ART' => -10800, 'AZOST' => -3600, 'AZST' => 18000, 'AZT' => 14400, 'BIOT' => 21600, 'BIT' => -43200, 'BOT' => -14400, 'BRST' => -7200, 'BRT' => -10800, 'BST' => 3600, 'BTT' => 21600, 'CAST' => 18000, 'CAT' => 7200, 'CCT' => 23400, 'CDT' => -18000, 'CEDT' => 7200, 'CEST' => 7200, 'CET' => 3600, 'CGST' => -7200, 'CGT' => -10800, 'CHADT' => 49500, 'CHAST' => 45900, 'CIST' => -28800, 'CKT' => -36000, 'CLDT' => -10800, 'CLST' => -14400, 'COT' => -18000, 'CST' => -21600, 'CVT' => -3600, 'CXT' => 25200, 'DAVT' => 25200, 'DTAT' => 36000, 'EADT' => -18000, 'EAST' => -21600, 'EAT' => 10800, 'ECT' => -18000, 'EDT' => -14400, 'EEST' => 10800, 'EET' => 7200, 'EGT' => -3600, 'EKST' => 21600, 'EST' => -18000, 'FJT' => 43200, 'FKDT' => -10800, 'FKST' => -14400, 'FNT' => -7200, 'GALT' => -21600, 'GEDT' => 14400, 'GEST' => 10800, 'GFT' => -10800, 'GILT' => 43200, 'GIT' => -32400, 'GST' => 14400, 'GST' => -7200, 'GYT' => -14400, 'HAA' => -10800, 'HAC' => -18000, 'HADT' => -32400, 'HAE' => -14400, 'HAP' => -25200, 'HAR' => -21600, 'HAST' => -36000, 'HAT' => -9000, 'HAY' => -28800, 'HKST' => 28800, 'HMT' => 18000, 'HNA' => -14400, 'HNC' => -21600, 'HNE' => -18000, 'HNP' => -28800, 'HNR' => -25200, 'HNT' => -12600, 'HNY' => -32400, 'IRDT' => 16200, 'IRKST' => 32400, 'IRKT' => 28800, 'IRST' => 12600, 'JFDT' => -10800, 'JFST' => -14400, 'JST' => 32400, 'KGST' => 21600, 'KGT' => 18000, 'KOST' => 39600, 'KOVST' => 28800, 'KOVT' => 25200, 'KRAST' => 28800, 'KRAT' => 25200, 'KST' => 32400, 'LHDT' => 39600, 'LHST' => 37800, 'LINT' => 50400, 'LKT' => 21600, 'MAGST' => 43200, 'MAGT' => 39600, 'MAWT' => 21600, 'MDT' => -21600, 'MESZ' => 7200, 'MEZ' => 3600, 'MHT' => 43200, 'MIT' => -34200, 'MNST' => 32400, 'MSDT' => 14400, 'MSST' => 10800, 'MST' => -25200, 'MUT' => 14400, 'MVT' => 18000, 'MYT' => 28800, 'NCT' => 39600, 'NDT' => -9000, 'NFT' => 41400, 'NMIT' => 36000, 'NOVST' => 25200, 'NOVT' => 21600, 'NPT' => 20700, 'NRT' => 43200, 'NST' => -12600, 'NUT' => -39600, 'NZDT' => 46800, 'NZST' => 43200, 'OMSST' => 25200, 'OMST' => 21600, 'PDT' => -25200, 'PET' => -18000, 'PETST' => 46800, 'PETT' => 43200, 'PGT' => 36000, 'PHOT' => 46800, 'PHT' => 28800, 'PKT' => 18000, 'PMDT' => -7200, 'PMST' => -10800, 'PONT' => 39600, 'PST' => -28800, 'PWT' => 32400, 'PYST' => -10800, 'PYT' => -14400, 'RET' => 14400, 'ROTT' => -10800, 'SAMST' => 18000, 'SAMT' => 14400, 'SAST' => 7200, 'SBT' => 39600, 'SCDT' => 46800, 'SCST' => 43200, 'SCT' => 14400, 'SEST' => 3600, 'SGT' => 28800, 'SIT' => 28800, 'SRT' => -10800, 'SST' => -39600, 'SYST' => 10800, 'SYT' => 7200, 'TFT' => 18000, 'THAT' => -36000, 'TJT' => 18000, 'TKT' => -36000, 'TMT' => 18000, 'TOT' => 46800, 'TPT' => 32400, 'TRUT' => 36000, 'TVT' => 43200, 'TWT' => 28800, 'UYST' => -7200, 'UYT' => -10800, 'UZT' => 18000, 'VET' => -14400, 'VLAST' => 39600, 'VLAT' => 36000, 'VOST' => 21600, 'VUT' => 39600, 'WAST' => 7200, 'WAT' => 3600, 'WDT' => 32400, 'WEST' => 3600, 'WFT' => 43200, 'WIB' => 25200, 'WIT' => 32400, 'WITA' => 28800, 'WKST' => 18000, 'WST' => 28800, 'YAKST' => 36000, 'YAKT' => 32400, 'YAPT' => 36000, 'YEKST' => 21600, 'YEKT' => 18000]; /** - * Cached PCRE for SimplePie_Parse_Date::$day + * Cached PCRE for Date::$day * * @access protected * @var string */ - var $day_pcre; + public $day_pcre; /** - * Cached PCRE for SimplePie_Parse_Date::$month + * Cached PCRE for Date::$month * * @access protected * @var string */ - var $month_pcre; + public $month_pcre; /** * Array of user-added callback methods * * @access private * @var array */ - var $built_in = array(); + public $built_in = []; /** * Array of user-added callback methods * * @access private * @var array */ - var $user = array(); + public $user = []; /** - * Create new SimplePie_Parse_Date object, and set self::day_pcre, + * Create new Date object, and set self::day_pcre, * self::month_pcre, and self::built_in * * @access private @@ -25803,7 +26445,7 @@ public function parse($date) * * @final * @access public - * @param callback $callback + * @param callable $callback */ public function add_callback($callback) { @@ -25866,34 +26508,42 @@ public function date_strtotime($date) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Parse\Date" instead */ + class SimplePie_Parse_Date extends \SimplePie\Parse\Date + { + } +} +namespace SimplePie { /** * Parses XML into something sane * * - * This class can be overloaded with {@see SimplePie::set_parser_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_parser_class()} * * @package SimplePie * @subpackage Parsing */ - class SimplePie_Parser - { - var $error_code; - var $error_string; - var $current_line; - var $current_column; - var $current_byte; - var $separator = ' '; - var $namespace = array(''); - var $element = array(''); - var $xml_base = array(''); - var $xml_base_explicit = array(\false); - var $xml_lang = array(''); - var $data = array(); - var $datas = array(array()); - var $current_xhtml_construct = -1; - var $encoding; + class Parser implements \SimplePie\RegistryAware + { + public $error_code; + public $error_string; + public $current_line; + public $current_column; + public $current_byte; + public $separator = ' '; + public $namespace = ['']; + public $element = ['']; + public $xml_base = ['']; + public $xml_base_explicit = [false]; + public $xml_lang = ['']; + public $data = []; + public $datas = [[]]; + public $current_xhtml_construct = -1; + public $encoding; protected $registry; - public function set_registry(\SimplePie_Registry $registry) + public function set_registry(\SimplePie\Registry $registry) { } public function parse(&$data, $encoding, $url = '') @@ -25930,17 +26580,25 @@ public function split_ns($string) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Parser" instead */ + class SimplePie_Parser extends \SimplePie\Parser + { + } +} +namespace SimplePie { /** * Handles `` or `` tags as defined in Media RSS and iTunes RSS respectively * - * Used by {@see SimplePie_Enclosure::get_rating()} and {@see SimplePie_Enclosure::get_ratings()} + * Used by {@see \SimplePie\Enclosure::get_rating()} and {@see \SimplePie\Enclosure::get_ratings()} * - * This class can be overloaded with {@see SimplePie::set_rating_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_rating_class()} * * @package SimplePie * @subpackage API */ - class SimplePie_Rating + class Rating { /** * Rating scheme @@ -25948,21 +26606,21 @@ class SimplePie_Rating * @var string * @see get_scheme() */ - var $scheme; + public $scheme; /** * Rating value * * @var string * @see get_value() */ - var $value; + public $value; /** * Constructor, used to input the data * * For documentation on all the parameters, see the corresponding * properties and their accessors */ - public function __construct($scheme = \null, $value = \null) + public function __construct($scheme = null, $value = null) { } /** @@ -25990,37 +26648,45 @@ public function get_value() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Rating" instead */ + class SimplePie_Rating extends \SimplePie\Rating + { + } +} +namespace SimplePie { /** * Handles creating objects and calling methods * - * Access this via {@see SimplePie::get_registry()} + * Access this via {@see \SimplePie\SimplePie::get_registry()} * * @package SimplePie */ - class SimplePie_Registry + class Registry { /** * Default class mapping * * Overriding classes *must* subclass these. * - * @var array + * @var array */ - protected $default = array('Cache' => 'SimplePie_Cache', 'Locator' => 'SimplePie_Locator', 'Parser' => 'SimplePie_Parser', 'File' => 'SimplePie_File', 'Sanitize' => 'SimplePie_Sanitize', 'Item' => 'SimplePie_Item', 'Author' => 'SimplePie_Author', 'Category' => 'SimplePie_Category', 'Enclosure' => 'SimplePie_Enclosure', 'Caption' => 'SimplePie_Caption', 'Copyright' => 'SimplePie_Copyright', 'Credit' => 'SimplePie_Credit', 'Rating' => 'SimplePie_Rating', 'Restriction' => 'SimplePie_Restriction', 'Content_Type_Sniffer' => 'SimplePie_Content_Type_Sniffer', 'Source' => 'SimplePie_Source', 'Misc' => 'SimplePie_Misc', 'XML_Declaration_Parser' => 'SimplePie_XML_Declaration_Parser', 'Parse_Date' => 'SimplePie_Parse_Date'); + protected $default = [\SimplePie\Cache::class => \SimplePie\Cache::class, \SimplePie\Locator::class => \SimplePie\Locator::class, \SimplePie\Parser::class => \SimplePie\Parser::class, \SimplePie\File::class => \SimplePie\File::class, \SimplePie\Sanitize::class => \SimplePie\Sanitize::class, \SimplePie\Item::class => \SimplePie\Item::class, \SimplePie\Author::class => \SimplePie\Author::class, \SimplePie\Category::class => \SimplePie\Category::class, \SimplePie\Enclosure::class => \SimplePie\Enclosure::class, \SimplePie\Caption::class => \SimplePie\Caption::class, \SimplePie\Copyright::class => \SimplePie\Copyright::class, \SimplePie\Credit::class => \SimplePie\Credit::class, \SimplePie\Rating::class => \SimplePie\Rating::class, \SimplePie\Restriction::class => \SimplePie\Restriction::class, \SimplePie\Content\Type\Sniffer::class => \SimplePie\Content\Type\Sniffer::class, \SimplePie\Source::class => \SimplePie\Source::class, \SimplePie\Misc::class => \SimplePie\Misc::class, \SimplePie\XML\Declaration\Parser::class => \SimplePie\XML\Declaration\Parser::class, \SimplePie\Parse\Date::class => \SimplePie\Parse\Date::class]; /** * Class mapping * * @see register() * @var array */ - protected $classes = array(); + protected $classes = []; /** * Legacy classes * * @see register() - * @var array + * @var array */ - protected $legacy = array(); + protected $legacy = []; /** * Constructor * @@ -26033,11 +26699,11 @@ public function __construct() * Register a class * * @param string $type See {@see $default} for names - * @param string $class Class name, must subclass the corresponding default + * @param class-string $class Class name, must subclass the corresponding default * @param bool $legacy Whether to enable legacy support for this class * @return bool Successfulness */ - public function register($type, $class, $legacy = \false) + public function register($type, $class, $legacy = false) { } /** @@ -26045,8 +26711,9 @@ public function register($type, $class, $legacy = \false) * * Where possible, use {@see create()} or {@see call()} instead * - * @param string $type - * @return string|null + * @template T + * @param class-string $type + * @return class-string|null */ public function get_class($type) { @@ -26054,36 +26721,45 @@ public function get_class($type) /** * Create a new instance of a given type * - * @param string $type + * @template T class-string $type + * @param class-string $type * @param array $parameters Parameters to pass to the constructor - * @return object Instance of class + * @return T Instance of class */ - public function &create($type, $parameters = array()) + public function &create($type, $parameters = []) { } /** * Call a static method for a type * - * @param string $type + * @param class-string $type * @param string $method * @param array $parameters * @return mixed */ - public function &call($type, $method, $parameters = array()) + public function &call($type, $method, $parameters = []) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Registry" instead */ + class SimplePie_Registry extends \SimplePie\Registry + { + } +} +namespace SimplePie { /** * Handles `` as defined in Media RSS * - * Used by {@see SimplePie_Enclosure::get_restriction()} and {@see SimplePie_Enclosure::get_restrictions()} + * Used by {@see \SimplePie\Enclosure::get_restriction()} and {@see \SimplePie\Enclosure::get_restrictions()} * - * This class can be overloaded with {@see SimplePie::set_restriction_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_restriction_class()} * * @package SimplePie * @subpackage API */ - class SimplePie_Restriction + class Restriction { /** * Relationship ('allow'/'deny') @@ -26091,28 +26767,28 @@ class SimplePie_Restriction * @var string * @see get_relationship() */ - var $relationship; + public $relationship; /** * Type of restriction * * @var string * @see get_type() */ - var $type; + public $type; /** * Restricted values * * @var string * @see get_value() */ - var $value; + public $value; /** * Constructor, used to input the data * * For documentation on all the parameters, see the corresponding * properties and their accessors */ - public function __construct($relationship = \null, $type = \null, $value = \null) + public function __construct($relationship = null, $type = null, $value = null) { } /** @@ -26148,72 +26824,84 @@ public function get_value() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Restriction" instead */ + class SimplePie_Restriction extends \SimplePie\Restriction + { + } +} +namespace SimplePie { /** * Used for data cleanup and post-processing * * - * This class can be overloaded with {@see SimplePie::set_sanitize_class()} + * This class can be overloaded with {@see \SimplePie\SimplePie::set_sanitize_class()} * * @package SimplePie * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags */ - class SimplePie_Sanitize - { - var $base; - var $remove_div = \true; - var $image_handler = ''; - var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); - var $encode_instead_of_strip = \false; - var $strip_attributes = array('bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); - var $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none')); - var $strip_comments = \false; - var $output_encoding = 'UTF-8'; - var $enable_cache = \true; - var $cache_location = './cache'; - var $cache_name_function = 'md5'; - var $timeout = 10; - var $useragent = ''; - var $force_fsockopen = \false; - var $replace_url_attributes = \null; - var $registry; + class Sanitize implements \SimplePie\RegistryAware + { + public $base; + public $remove_div = true; + public $image_handler = ''; + public $strip_htmltags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']; + public $encode_instead_of_strip = false; + public $strip_attributes = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']; + public $rename_attributes = []; + public $add_attributes = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]; + public $strip_comments = false; + public $output_encoding = 'UTF-8'; + public $enable_cache = true; + public $cache_location = './cache'; + public $cache_name_function = 'md5'; + public $timeout = 10; + public $useragent = ''; + public $force_fsockopen = false; + public $replace_url_attributes = null; + public $registry; /** * List of domains for which to force HTTPS. - * @see SimplePie_Sanitize::set_https_domains() + * @see \SimplePie\Sanitize::set_https_domains() * Array is a tree split at DNS levels. Example: * array('biz' => true, 'com' => array('example' => true), 'net' => array('example' => array('www' => true))) */ - var $https_domains = array(); + public $https_domains = []; public function __construct() { } - public function remove_div($enable = \true) + public function remove_div($enable = true) + { + } + public function set_image_handler($page = false) { } - public function set_image_handler($page = \false) + public function set_registry(\SimplePie\Registry $registry) { } - public function set_registry(\SimplePie_Registry $registry) + public function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie\\Cache', ?\SimplePie\Cache\DataCache $cache = null) { } - public function pass_cache_data($enable_cache = \true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache') + public function pass_file_data($file_class = 'SimplePie\\File', $timeout = 10, $useragent = '', $force_fsockopen = false) { } - public function pass_file_data($file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = \false) + public function strip_htmltags($tags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']) { } - public function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')) + public function encode_instead_of_strip($encode = false) { } - public function encode_instead_of_strip($encode = \false) + public function rename_attributes($attribs = []) { } - public function strip_attributes($attribs = array('bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')) + public function strip_attributes($attribs = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']) { } - public function add_attributes($attribs = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none'))) + public function add_attributes($attribs = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]) { } - public function strip_comments($strip = \false) + public function strip_comments($strip = false) { } public function set_output_encoding($encoding = 'UTF-8') @@ -26223,19 +26911,19 @@ public function set_output_encoding($encoding = 'UTF-8') * Set element/attribute key/value pairs of HTML attributes * containing URLs that need to be resolved relative to the feed * - * Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, - * |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, - * |q|@cite + * Defaults to |a|@href, |area|@href, |audio|@src, |blockquote|@cite, + * |del|@cite, |form|@action, |img|@longdesc, |img|@src, |input|@src, + * |ins|@cite, |q|@cite, |source|@src, |video|@src * * @since 1.0 * @param array|null $element_attribute Element/attribute key/value pairs, null for default */ - public function set_url_replacements($element_attribute = \null) + public function set_url_replacements($element_attribute = null) { } /** * Set the list of domains for which to force HTTPS. - * @see SimplePie_Misc::https_url() + * @see \SimplePie\Misc::https_url() * Example array('biz', 'example.com', 'example.org', 'www.example.net'); */ public function set_https_domains($domains) @@ -26271,29 +26959,40 @@ protected function strip_tag($tag, $document, $xpath, $type) protected function strip_attr($attrib, $xpath) { } + protected function rename_attr($attrib, $xpath) + { + } protected function add_attr($tag, $valuePairs, $document) { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Sanitize" instead */ + class SimplePie_Sanitize extends \SimplePie\Sanitize + { + } +} +namespace SimplePie { /** * Handles `` * - * Used by {@see SimplePie_Item::get_source()} + * Used by {@see \SimplePie\Item::get_source()} * - * This class can be overloaded with {@see SimplePie::set_source_class()} + * This class can be overloaded with {@see \SimplePie::set_source_class()} * * @package SimplePie * @subpackage API */ - class SimplePie_Source + class Source implements \SimplePie\RegistryAware { - var $item; - var $data = array(); + public $item; + public $data = []; protected $registry; public function __construct($item, $data) { } - public function set_registry(\SimplePie_Registry $registry) + public function set_registry(\SimplePie\Registry $registry) { } public function __toString() @@ -26302,7 +27001,7 @@ public function __toString() public function get_source_tags($namespace, $tag) { } - public function get_base($element = array()) + public function get_base($element = []) { } public function sanitize($data, $type, $base = '') @@ -26363,13 +27062,21 @@ public function get_image_url() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Source" instead */ + class SimplePie_Source extends \SimplePie\Source + { + } +} +namespace SimplePie\XML\Declaration { /** * Parses the XML Declaration * * @package SimplePie * @subpackage Parsing */ - class SimplePie_XML_Declaration_Parser + class Parser { /** * XML Version @@ -26377,49 +27084,49 @@ class SimplePie_XML_Declaration_Parser * @access public * @var string */ - var $version = '1.0'; + public $version = '1.0'; /** * Encoding * * @access public * @var string */ - var $encoding = 'UTF-8'; + public $encoding = 'UTF-8'; /** * Standalone * * @access public * @var bool */ - var $standalone = \false; + public $standalone = false; /** * Current state of the state machine * * @access private - * @var string + * @var self::STATE_* */ - var $state = 'before_version_name'; + public $state = self::STATE_BEFORE_VERSION_NAME; /** * Input data * * @access private * @var string */ - var $data = ''; + public $data = ''; /** * Input data length (to avoid calling strlen() everytime this is needed) * * @access private * @var int */ - var $data_length = 0; + public $data_length = 0; /** * Current position of the pointer * * @var int * @access private */ - var $position = 0; + public $position = 0; /** * Create an instance of the class with the input data * @@ -26492,6 +27199,14 @@ public function standalone_value() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\XML\Declaration\Parser" instead */ + class SimplePie_XML_Declaration_Parser extends \SimplePie\XML\Declaration\Parser + { + } +} +namespace SimplePie { /** * Decode 'gzip' encoded HTTP data * @@ -26499,7 +27214,7 @@ public function standalone_value() * @subpackage HTTP * @link http://www.gzip.org/format.txt */ - class SimplePie_gzdecode + class Gzdecode { /** * Compressed data @@ -26508,35 +27223,35 @@ class SimplePie_gzdecode * @var string * @see gzdecode::$data */ - var $compressed_data; + public $compressed_data; /** * Size of compressed data * * @access private * @var int */ - var $compressed_size; + public $compressed_size; /** * Minimum size of a valid gzip string * * @access private * @var int */ - var $min_compressed_size = 18; + public $min_compressed_size = 18; /** * Current position of pointer * * @access private * @var int */ - var $position = 0; + public $position = 0; /** * Flags (FLG) * * @access private * @var int */ - var $flags; + public $flags; /** * Uncompressed data * @@ -26544,28 +27259,28 @@ class SimplePie_gzdecode * @see gzdecode::$compressed_data * @var string */ - var $data; + public $data; /** * Modified time * * @access public * @var int */ - var $MTIME; + public $MTIME; /** * Extra Flags * * @access public * @var int */ - var $XFL; + public $XFL; /** * Operating System * * @access public * @var int */ - var $OS; + public $OS; /** * Subfield ID 1 * @@ -26574,7 +27289,7 @@ class SimplePie_gzdecode * @see gzdecode::$SI2 * @var string */ - var $SI1; + public $SI1; /** * Subfield ID 2 * @@ -26583,7 +27298,7 @@ class SimplePie_gzdecode * @see gzdecode::$SI1 * @var string */ - var $SI2; + public $SI2; /** * Extra field content * @@ -26592,21 +27307,21 @@ class SimplePie_gzdecode * @see gzdecode::$SI2 * @var string */ - var $extra_field; + public $extra_field; /** * Original filename * * @access public * @var string */ - var $filename; + public $filename; /** * Human readable comment * * @access public * @var string */ - var $comment; + public $comment; /** * Don't allow anything to be set * @@ -26633,6 +27348,301 @@ public function parse() { } } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Gzdecode" instead */ + class SimplePie_gzdecode extends \SimplePie\Gzdecode + { + } +} +namespace SimplePie\Cache { + /** + * Subset of PSR-16 Cache client for caching data arrays + * + * Only get(), set() and delete() methods are used, + * but not has(), getMultiple(), setMultiple() or deleteMultiple(). + * + * The methods names must be different, but should be compatible to the + * methods of \Psr\SimpleCache\CacheInterface. + * + * @package SimplePie + * @subpackage Caching + * @internal + */ + interface DataCache + { + /** + * Fetches a value from the cache. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::get() + * + * public function get(string $key, mixed $default = null): mixed; + * + * + * @param string $key The unique key of this item in the cache. + * @param mixed $default Default value to return if the key does not exist. + * + * @return array|mixed The value of the item from the cache, or $default in case of cache miss. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function get_data(string $key, $default = null); + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::set() + * + * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + * + * + * @param string $key The key of the item to store. + * @param array $value The value of the item to store, must be serializable. + * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function set_data(string $key, array $value, ?int $ttl = null) : bool; + /** + * Delete an item from the cache by its unique key. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::delete() + * + * public function delete(string $key): bool; + * + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function delete_data(string $key) : bool; + } + /** + * Adapter for deprecated \SimplePie\Cache\Base implementations + * + * @package SimplePie + * @subpackage Caching + * @internal + */ + final class BaseDataCache implements \SimplePie\Cache\DataCache + { + public function __construct(\SimplePie\Cache\Base $cache) + { + } + /** + * Fetches a value from the cache. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::get() + * + * public function get(string $key, mixed $default = null): mixed; + * + * + * @param string $key The unique key of this item in the cache. + * @param mixed $default Default value to return if the key does not exist. + * + * @return array|mixed The value of the item from the cache, or $default in case of cache miss. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function get_data(string $key, $default = null) + { + } + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::set() + * + * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + * + * + * @param string $key The key of the item to store. + * @param array $value The value of the item to store, must be serializable. + * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function set_data(string $key, array $value, ?int $ttl = null) : bool + { + } + /** + * Delete an item from the cache by its unique key. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::delete() + * + * public function delete(string $key): bool; + * + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function delete_data(string $key) : bool + { + } + } + /** + * Interface for creating a cache filename + * + * @package SimplePie + * @subpackage Caching + */ + interface NameFilter + { + /** + * Method to create cache filename with. + * + * The returning name MUST follow the rules for keys in PSR-16. + * + * @link https://www.php-fig.org/psr/psr-16/ + * + * The returning name MUST be a string of at least one character + * that uniquely identifies a cached item, MUST only contain the + * characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding + * and MUST not longer then 64 characters. The following characters + * are reserved for future extensions and MUST NOT be used: {}()/\@: + * + * A provided implementing library MAY support additional characters + * and encodings or longer lengths, but MUST support at least that + * minimum. + * + * @param string $name The name for the cache will be most likly an url with query string + * + * @return string the new cache name + */ + public function filter(string $name) : string; + } + /** + * Creating a cache filename with callables + * + * @package SimplePie + * @subpackage Caching + */ + final class CallableNameFilter implements \SimplePie\Cache\NameFilter + { + public function __construct(callable $callable) + { + } + /** + * Method to create cache filename with. + * + * The returning name MUST follow the rules for keys in PSR-16. + * + * @link https://www.php-fig.org/psr/psr-16/ + * + * The returning name MUST be a string of at least one character + * that uniquely identifies a cached item, MUST only contain the + * characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding + * and MUST not longer then 64 characters. The following characters + * are reserved for future extensions and MUST NOT be used: {}()/\@: + * + * A provided implementing library MAY support additional characters + * and encodings or longer lengths, but MUST support at least that + * minimum. + * + * @param string $name The name for the cache will be most likly an url with query string + * + * @return string the new cache name + */ + public function filter(string $name) : string + { + } + } + /** + * Caches data into a PSR-16 cache implementation + * + * @package SimplePie + * @subpackage Caching + * @internal + */ + final class Psr16 implements \SimplePie\Cache\DataCache + { + /** + * PSR-16 cache implementation + * + * @param CacheInterface $cache + */ + public function __construct(\Psr\SimpleCache\CacheInterface $cache) + { + } + /** + * Fetches a value from the cache. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::get() + * + * public function get(string $key, mixed $default = null): mixed; + * + * + * @param string $key The unique key of this item in the cache. + * @param mixed $default Default value to return if the key does not exist. + * + * @return array|mixed The value of the item from the cache, or $default in case of cache miss. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function get_data(string $key, $default = null) + { + } + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::set() + * + * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + * + * + * @param string $key The key of the item to store. + * @param array $value The value of the item to store, must be serializable. + * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function set_data(string $key, array $value, ?int $ttl = null) : bool + { + } + /** + * Delete an item from the cache by its unique key. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::delete() + * + * public function delete(string $key): bool; + * + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function delete_data(string $key) : bool + { + } + } +} +namespace { /** * General API for generating and formatting diffs - the differences between * two sequences of strings. @@ -26824,13 +27834,11 @@ public function Text_MappedDiff($from_lines, $to_lines, $mapped_from_lines, $map * * @access private */ - class Text_Diff_Op + abstract class Text_Diff_Op { var $orig; var $final; - function &reverse() - { - } + abstract function &reverse(); function norig() { } @@ -27344,6 +28352,17 @@ function _encode(&$string) { } } + /** + * Exception for errors from the Text_Diff package. + * + * {@internal This is a WP native addition to the external Text_Diff package.} + * + * @package WordPress + * @subpackage Text_Diff + */ + class Text_Exception extends \Exception + { + } /** * Structure that store common Atom Feed Properties * @@ -27416,6 +28435,10 @@ class AtomParser var $FILE = "php://input"; var $feed; var $current; + var $map_attrs_func; + var $map_xmlns_func; + var $error; + var $content; /** * PHP5 constructor. */ @@ -28762,7 +29785,7 @@ public static function is_in_use() * @return array|WP_Error { * Application password details, or a WP_Error instance if an error occurs. * - * @type string $0 The unhashed generated application password. + * @type string $0 The generated application password in plain text. * @type array $1 { * The details about the created password. * @@ -28802,7 +29825,7 @@ public static function create_new_application_password($user_id, $args = array() * * @param int $user_id User ID. * @return array { - * The list of app passwords. + * The list of application passwords. * * @type array ...$0 { * @type string $uuid The unique identifier for the application password. @@ -28834,7 +29857,26 @@ public static function get_user_application_passwords($user_id) * * @param int $user_id User ID. * @param string $uuid The password's UUID. - * @return array|null The application password if found, null otherwise. + * @return array|null { + * The application password if found, null otherwise. + * + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } + * @phpstan-return null|array{ + * uuid: string, + * app_id: string, + * name: string, + * password: string, + * created: int, + * last_used: int|null, + * last_ip: string|null, + * } */ public static function get_user_application_password($user_id, $uuid) { @@ -28858,8 +29900,27 @@ public static function application_name_exists_for_user($user_id, $name) * * @param int $user_id User ID. * @param string $uuid The password's UUID. - * @param array $update Information about the application password to update. + * @param array $update { + * Information about the application password to update. + * + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } * @return true|WP_Error True if successful, otherwise a WP_Error instance is returned on error. + * @phpstan-param array{ + * uuid?: string, + * app_id?: string, + * name?: string, + * password?: string, + * created?: int, + * last_used?: int|null, + * last_ip?: string|null, + * } $update */ public static function update_application_password($user_id, $uuid, $update = array()) { @@ -28905,9 +29966,31 @@ public static function delete_all_application_passwords($user_id) * @since 5.6.0 * * @param int $user_id User ID. - * @param array $passwords Application passwords. + * @param array $passwords { + * The list of application passwords. * - * @return bool + * @type array ...$0 { + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } + * } + * @return int|bool User meta ID if the key didn't exist (ie. this is the first time that an application password + * has been saved for the user), true on successful update, false on failure or if the value passed + * is the same as the one that is already in the database. + * @phpstan-param array $passwords */ protected static function set_user_application_passwords($user_id, $passwords) { @@ -29082,21 +30165,23 @@ final class WP_Block_Bindings_Source * * @since 6.5.0 * - * @param string $name The name of the source. - * @param array $source_properties The properties of the source. + * @param string $name The name of the source. + * @param array $source_properties The properties of the source. */ public function __construct(string $name, array $source_properties) { } /** - * Retrieves the value from the source. + * Calls the callback function specified in the `$get_value_callback` property + * with the given arguments and returns the result. It can be modified with + * `block_bindings_source_value` filter. * * @since 6.5.0 + * @since 6.7.0 `block_bindings_source_value` filter was added. * - * @param array $source_args Array containing source arguments used to look up the override value, i.e. {"key": "foo"}. - * @param WP_Block $block_instance The block instance. - * @param string $attribute_name The name of the target attribute. - * + * @param array $source_args Array containing source arguments used to look up the override value, i.e. {"key": "foo"}. + * @param WP_Block $block_instance The block instance. + * @param string $attribute_name The name of the target attribute. * @return mixed The value of the source. */ public function get_value(array $source_args, $block_instance, string $attribute_name) @@ -29338,6 +30423,83 @@ public function count() { } } + /** + * Class used for managing block metadata collections. + * + * The WP_Block_Metadata_Registry allows plugins to register metadata for large + * collections of blocks (e.g., 50-100+) using a single PHP file. This approach + * reduces the need to read and decode multiple `block.json` files, enhancing + * performance through opcode caching. + * + * @since 6.7.0 + */ + class WP_Block_Metadata_Registry + { + /** + * Registers a block metadata collection. + * + * This method allows registering a collection of block metadata from a single + * manifest file, improving performance for large sets of blocks. + * + * The manifest file should be a PHP file that returns an associative array, where + * the keys are the block identifiers (without their namespace) and the values are + * the corresponding block metadata arrays. The block identifiers must match the + * parent directory name for the respective `block.json` file. + * + * Example manifest file structure: + * ``` + * return array( + * 'example-block' => array( + * 'title' => 'Example Block', + * 'category' => 'widgets', + * 'icon' => 'smiley', + * // ... other block metadata + * ), + * 'another-block' => array( + * 'title' => 'Another Block', + * 'category' => 'formatting', + * 'icon' => 'star-filled', + * // ... other block metadata + * ), + * // ... more block metadata entries + * ); + * ``` + * + * @since 6.7.0 + * + * @param string $path The absolute base path for the collection ( e.g., WP_PLUGIN_DIR . '/my-plugin/blocks/' ). + * @param string $manifest The absolute path to the manifest file containing the metadata collection. + * @return bool True if the collection was registered successfully, false otherwise. + */ + public static function register_collection($path, $manifest) + { + } + /** + * Retrieves block metadata for a given block within a specific collection. + * + * This method uses the registered collections to efficiently lookup + * block metadata without reading individual `block.json` files. + * + * @since 6.7.0 + * + * @param string $file_or_folder The path to the file or folder containing the block. + * @return array|null The block metadata for the block, or null if not found. + */ + public static function get_metadata($file_or_folder) + { + } + /** + * Checks if metadata exists for a given block name in a specific collection. + * + * @since 6.7.0 + * + * @param string $file_or_folder The path to the file or folder containing the block metadata. + * @return bool True if metadata exists for the block, false otherwise. + */ + public static function has_metadata($file_or_folder) + { + } + } /** * Class WP_Block_Parser_Block * @@ -29469,8 +30631,9 @@ class WP_Block_Parser_Frame * @param WP_Block_Parser_Block $block Full or partial block. * @param int $token_start Byte offset into document for start of parse token. * @param int $token_length Byte length of entire parse token string. - * @param int $prev_offset Byte offset into document for after parse token ends. - * @param int $leading_html_start Byte offset into document where leading HTML before token starts. + * @param int|null $prev_offset Optional. Byte offset into document for after parse token ends. Default null. + * @param int|null $leading_html_start Optional. Byte offset into document where leading HTML before token starts. + * Default null. */ public function __construct($block, $token_start, $token_length, $prev_offset = \null, $leading_html_start = \null) { @@ -30117,6 +31280,13 @@ class WP_Block_Template * @var int|null */ public $author; + /** + * Plugin. + * + * @since 6.7.0 + * @var string|null + */ + public $plugin; /** * Post types. * @@ -30139,6 +31309,114 @@ class WP_Block_Template */ public $modified; } + /** + * Core class used for interacting with templates. + * + * @since 6.7.0 + */ + final class WP_Block_Templates_Registry + { + /** + * Registers a template. + * + * @since 6.7.0 + * + * @param string $template_name Template name including namespace. + * @param array $args Optional. Array of template arguments. + * @return WP_Block_Template|WP_Error The registered template on success, or WP_Error on failure. + */ + public function register($template_name, $args = array()) + { + } + /** + * Retrieves all registered templates. + * + * @since 6.7.0 + * + * @return WP_Block_Template[] Associative array of `$template_name => $template` pairs. + */ + public function get_all_registered() + { + } + /** + * Retrieves a registered template by its name. + * + * @since 6.7.0 + * + * @param string $template_name Template name including namespace. + * @return WP_Block_Template|null The registered template, or null if it is not registered. + */ + public function get_registered($template_name) + { + } + /** + * Retrieves a registered template by its slug. + * + * @since 6.7.0 + * + * @param string $template_slug Slug of the template. + * @return WP_Block_Template|null The registered template, or null if it is not registered. + */ + public function get_by_slug($template_slug) + { + } + /** + * Retrieves registered templates matching a query. + * + * @since 6.7.0 + * + * @param array $query { + * Arguments to retrieve templates. Optional, empty by default. + * + * @type string[] $slug__in List of slugs to include. + * @type string[] $slug__not_in List of slugs to skip. + * @type string $post_type Post type to get the templates for. + * } + * @return WP_Block_Template[] Associative array of `$template_name => $template` pairs. + * @phpstan-param array{ + * slug__in?: string[], + * slug__not_in?: string[], + * post_type?: string, + * } $query + */ + public function get_by_query($query = array()) + { + } + /** + * Checks if a template is registered. + * + * @since 6.7.0 + * + * @param string $template_name Template name. + * @return bool True if the template is registered, false otherwise. + */ + public function is_registered($template_name) + { + } + /** + * Unregisters a template. + * + * @since 6.7.0 + * + * @param string $template_name Template name including namespace. + * @return WP_Block_Template|WP_Error The unregistered template on success, or WP_Error on failure. + */ + public function unregister($template_name) + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 6.7.0 + * + * @return WP_Block_Templates_Registry The main instance. + */ + public static function get_instance() + { + } + } /** * Core class used for interacting with block types. * @@ -30808,7 +32086,7 @@ class WP_Block * @since 5.5.0 * * @param array $block { - * A representative array of a single parsed block object. See WP_Block_Parser_Block. + * An associative array of a single parsed block object. See WP_Block_Parser_Block. * * @type string $blockName Name of block. * @type array $attrs Attributes from block comment delimiters. @@ -33467,8 +34745,7 @@ public function _sanitize_external_header_video($value) * This method exists because the partial object and context data are passed * into a partial's render_callback so we cannot use get_custom_logo() as * the render_callback directly since it expects a blog ID as the first - * argument. When WP no longer supports PHP 5.3, this method can be removed - * in favor of an anonymous function. + * argument. * * @see WP_Customize_Manager::register_controls() * @@ -36250,6 +37527,19 @@ public function query($handle, $status = 'registered') public function set_group($handle, $recursion, $group) { } + /** + * Get etag header for cache validation. + * + * @since 6.7.0 + * + * @global string $wp_version The WordPress version string. + * + * @param string[] $load Array of script or style handles to load. + * @return string Etag header. + */ + public function get_etag($load) + { + } } /** * Class _WP_Dependency @@ -37163,6 +38453,16 @@ protected static function copy_errors(\WP_Error $from, \WP_Error $to) { } } + /** + * Core base Exception class. + * + * Future, more specific, Exceptions should always extend this base class. + * + * @since 6.7.0 + */ + class WP_Exception extends \Exception + { + } /** * Core class used as the default shutdown handler for fatal errors. * @@ -37255,9 +38555,10 @@ protected function display_default_error_template($error, $handled) * Core class used to implement feed cache transients. * * @since 2.8.0 + * @since 6.7.0 Now properly implements the SimplePie\Cache\Base interface. */ #[\AllowDynamicProperties] - class WP_Feed_Cache_Transient + class WP_Feed_Cache_Transient implements \SimplePie\Cache\Base { /** * Holds the transient name. @@ -37283,35 +38584,38 @@ class WP_Feed_Cache_Transient */ public $lifetime = 43200; /** - * Constructor. + * Creates a new (transient) cache object. * * @since 2.8.0 * @since 3.2.0 Updated to use a PHP5 constructor. + * @since 6.7.0 Parameter names have been updated to be in line with the `SimplePie\Cache\Base` interface. * - * @param string $location URL location (scheme is used to determine handler). - * @param string $filename Unique identifier for cache object. - * @param string $extension 'spi' or 'spc'. + * @param string $location URL location (scheme is used to determine handler). + * @param string $name Unique identifier for cache object. + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either `TYPE_FEED` ('spc') for SimplePie data, + * or `TYPE_IMAGE` ('spi') for image data. */ - public function __construct($location, $filename, $extension) + public function __construct($location, $name, $type) { } /** - * Sets the transient. + * Saves data to the transient. * * @since 2.8.0 * - * @param SimplePie $data Data to save. + * @param array|SimplePie\SimplePie $data Data to save. If passed a SimplePie object, + * only cache the `$data` property. * @return true Always true. */ public function save($data) { } /** - * Gets the transient. + * Retrieves the data saved in the transient. * * @since 2.8.0 * - * @return mixed Transient value. + * @return array Data for `SimplePie::$data`. */ public function load() { @@ -37321,7 +38625,7 @@ public function load() * * @since 2.8.0 * - * @return mixed Transient value. + * @return int Timestamp. */ public function mtime() { @@ -37353,10 +38657,10 @@ public function unlink() * @since 2.8.0 */ #[\AllowDynamicProperties] - class WP_Feed_Cache extends \SimplePie_Cache + class WP_Feed_Cache extends \SimplePie\Cache { /** - * Creates a new SimplePie_Cache object. + * Creates a new SimplePie\Cache object. * * @since 2.8.0 * @@ -38649,8 +39953,21 @@ class WP_Http * @type int $limit_response_size Size in bytes to limit the response to. Default null. * * } - * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * @return array|WP_Error { + * Array of response data, or a WP_Error instance upon error. + * + * @type \WpOrg\Requests\Utility\CaseInsensitiveDictionary $headers Response headers keyed by name. + * @type string $body Response body. + * @type array $response { + * Array of HTTP response data. + * + * @type int|false $code HTTP response status code. + * @type string|false $message HTTP response message. + * } + * @type WP_HTTP_Cookie[] $cookies Array of cookies set by the server. + * @type string|null $filename Optional. Filename of the response. + * @type WP_HTTP_Requests_Response|null $http_response Response object. + * } * @phpstan-param array{ * method?: string, * timeout?: float, @@ -38670,6 +39987,17 @@ class WP_Http * filename?: string, * limit_response_size?: int, * } $args + * @phpstan-return \WP_Error|array{ + * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, + * body: string, + * response: array{ + * code: int|false, + * message: string|false, + * }, + * cookies: WP_HTTP_Cookie[], + * filename: string|null, + * http_response: WP_HTTP_Requests_Response|null, + * } * @phpstan-return array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int, message: string}, cookies: array, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error */ public function request($url, $args = array()) @@ -39556,6 +40884,17 @@ public function save($destfilename = \null, $mime_type = \null) protected function _save($image, $filename = \null, $mime_type = \null) { } + /** + * Sets Image Compression quality on a 1-100% scale. Handles WebP lossless images. + * + * @since 6.7.0 + * + * @param int $quality Compression Quality. Range: [1,100] + * @return true|WP_Error True if set successfully; WP_Error on failure. + */ + public function set_quality($quality = \null) + { + } /** * Returns stream of current image. * @@ -41411,7 +42750,7 @@ class WP_Object_Cache */ protected $global_groups = array(); /** - * Sets up object properties; PHP 5 style constructor. + * Sets up object properties. * * @since 2.0.8 */ @@ -41436,7 +42775,6 @@ public function __get($name) * * @param string $name Property to set. * @param mixed $value Property value. - * @return mixed Newly-set property. */ public function __set($name, $value) { @@ -46556,12 +47894,35 @@ public function print_script_module_preloads() * Prints the import map using a script tag with a type="importmap" attribute. * * @since 6.5.0 - * - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing the polyfill. */ public function print_import_map() { } + /** + * Print data associated with Script Modules. + * + * The data will be embedded in the page HTML and can be read by Script Modules on page load. + * + * @since 6.7.0 + * + * Data can be associated with a Script Module via the + * {@see "script_module_data_{$module_id}"} filter. + * + * The data for a Script Module will be serialized as JSON in a script tag with an ID of the + * form `wp-script-module-data-{$module_id}`. + */ + public function print_script_module_data() : void + { + } + /** + * @access private This is only intended to be called by the registered actions. + * + * @since 6.7.0 + * @phpstan-return void + */ + public function print_a11y_script_module_html() + { + } } /** * Core class used to register scripts. @@ -47150,7 +48511,7 @@ public static function drop_sessions() * @since 2.8.0 */ #[\AllowDynamicProperties] - class WP_SimplePie_File extends \SimplePie_File + class WP_SimplePie_File extends \SimplePie\File { /** * Timeout. @@ -47183,13 +48544,13 @@ public function __construct($url, $timeout = 10, $redirects = 5, $headers = \nul /** * Core class used to implement SimplePie feed sanitization. * - * Extends the SimplePie_Sanitize class to use KSES, because + * Extends the SimplePie\Sanitize class to use KSES, because * we cannot universally count on DOMDocument being available. * * @since 3.5.0 */ #[\AllowDynamicProperties] - class WP_SimplePie_Sanitize_KSES extends \SimplePie_Sanitize + class WP_SimplePie_Sanitize_KSES extends \SimplePie\Sanitize { /** * WordPress SimplePie sanitization using KSES. @@ -47472,8 +48833,8 @@ public function parse_query($query = '') * @since 4.6.0 * * @param string|array $query Array or URL query string of parameters. - * @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', - * or the number of sites when 'count' is passed as a query var. + * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', + * or the number of sites when 'count' is passed as a query var. */ public function query($query) { @@ -47485,8 +48846,8 @@ public function query($query) * * @global wpdb $wpdb WordPress database abstraction object. * - * @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', - * or the number of sites when 'count' is passed as a query var. + * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', + * or the number of sites when 'count' is passed as a query var. */ public function get_sites() { @@ -48701,8 +50062,6 @@ class WP_Term_Query * - 'id=>slug' Returns an associative array of term slugs, * keyed by term ID (`string[]`). * Default 'all'. - * @type bool $count Whether to return a term count. If true, will take precedence - * over `$fields`. Default false. * @type string|string[] $name Name or array of names to return term(s) for. * Default empty. * @type string|string[] $slug Slug or array of slugs to return term(s) for. @@ -48759,7 +50118,6 @@ class WP_Term_Query * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -48805,7 +50163,6 @@ public function __construct($query = '') * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -48843,7 +50200,7 @@ public function parse_query($query = '') * * @param string|array $query Array or URL query string of parameters. * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string - * when 'count' is passed as a query var. + * when 'count' is passed to `$args['fields']`. */ public function query($query) { @@ -48883,7 +50240,7 @@ public function query($query) * @global wpdb $wpdb WordPress database abstraction object. * * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string - * when 'count' is passed as a query var. + * when 'count' is passed to `$args['fields']`. */ public function get_terms() { @@ -49986,6 +51343,7 @@ public static function get_style_variations($scope = 'theme') * as the value of `_link` object in REST API responses. * * @since 6.6.0 + * @since 6.7.0 Resolve relative paths in block styles. * * @param WP_Theme_JSON $theme_json A theme json instance. * @return array An array of resolved paths. @@ -50180,10 +51538,11 @@ class WP_Theme_JSON * @since 6.4.0 Added `writing-mode` property. * @since 6.5.0 Added `aspect-ratio` property. * @since 6.6.0 Added `background-[image|position|repeat|size]` properties. + * @since 6.7.0 Added `background-attachment` property. * * @var array */ - const PROPERTIES_METADATA = array('aspect-ratio' => array('dimensions', 'aspectRatio'), 'background' => array('color', 'gradient'), 'background-color' => array('color', 'background'), 'background-image' => array('background', 'backgroundImage'), 'background-position' => array('background', 'backgroundPosition'), 'background-repeat' => array('background', 'backgroundRepeat'), 'background-size' => array('background', 'backgroundSize'), 'border-radius' => array('border', 'radius'), 'border-top-left-radius' => array('border', 'radius', 'topLeft'), 'border-top-right-radius' => array('border', 'radius', 'topRight'), 'border-bottom-left-radius' => array('border', 'radius', 'bottomLeft'), 'border-bottom-right-radius' => array('border', 'radius', 'bottomRight'), 'border-color' => array('border', 'color'), 'border-width' => array('border', 'width'), 'border-style' => array('border', 'style'), 'border-top-color' => array('border', 'top', 'color'), 'border-top-width' => array('border', 'top', 'width'), 'border-top-style' => array('border', 'top', 'style'), 'border-right-color' => array('border', 'right', 'color'), 'border-right-width' => array('border', 'right', 'width'), 'border-right-style' => array('border', 'right', 'style'), 'border-bottom-color' => array('border', 'bottom', 'color'), 'border-bottom-width' => array('border', 'bottom', 'width'), 'border-bottom-style' => array('border', 'bottom', 'style'), 'border-left-color' => array('border', 'left', 'color'), 'border-left-width' => array('border', 'left', 'width'), 'border-left-style' => array('border', 'left', 'style'), 'color' => array('color', 'text'), 'text-align' => array('typography', 'textAlign'), 'column-count' => array('typography', 'textColumns'), 'font-family' => array('typography', 'fontFamily'), 'font-size' => array('typography', 'fontSize'), 'font-style' => array('typography', 'fontStyle'), 'font-weight' => array('typography', 'fontWeight'), 'letter-spacing' => array('typography', 'letterSpacing'), 'line-height' => array('typography', 'lineHeight'), 'margin' => array('spacing', 'margin'), 'margin-top' => array('spacing', 'margin', 'top'), 'margin-right' => array('spacing', 'margin', 'right'), 'margin-bottom' => array('spacing', 'margin', 'bottom'), 'margin-left' => array('spacing', 'margin', 'left'), 'min-height' => array('dimensions', 'minHeight'), 'outline-color' => array('outline', 'color'), 'outline-offset' => array('outline', 'offset'), 'outline-style' => array('outline', 'style'), 'outline-width' => array('outline', 'width'), 'padding' => array('spacing', 'padding'), 'padding-top' => array('spacing', 'padding', 'top'), 'padding-right' => array('spacing', 'padding', 'right'), 'padding-bottom' => array('spacing', 'padding', 'bottom'), 'padding-left' => array('spacing', 'padding', 'left'), '--wp--style--root--padding' => array('spacing', 'padding'), '--wp--style--root--padding-top' => array('spacing', 'padding', 'top'), '--wp--style--root--padding-right' => array('spacing', 'padding', 'right'), '--wp--style--root--padding-bottom' => array('spacing', 'padding', 'bottom'), '--wp--style--root--padding-left' => array('spacing', 'padding', 'left'), 'text-decoration' => array('typography', 'textDecoration'), 'text-transform' => array('typography', 'textTransform'), 'filter' => array('filter', 'duotone'), 'box-shadow' => array('shadow'), 'writing-mode' => array('typography', 'writingMode')); + const PROPERTIES_METADATA = array('aspect-ratio' => array('dimensions', 'aspectRatio'), 'background' => array('color', 'gradient'), 'background-color' => array('color', 'background'), 'background-image' => array('background', 'backgroundImage'), 'background-position' => array('background', 'backgroundPosition'), 'background-repeat' => array('background', 'backgroundRepeat'), 'background-size' => array('background', 'backgroundSize'), 'background-attachment' => array('background', 'backgroundAttachment'), 'border-radius' => array('border', 'radius'), 'border-top-left-radius' => array('border', 'radius', 'topLeft'), 'border-top-right-radius' => array('border', 'radius', 'topRight'), 'border-bottom-left-radius' => array('border', 'radius', 'bottomLeft'), 'border-bottom-right-radius' => array('border', 'radius', 'bottomRight'), 'border-color' => array('border', 'color'), 'border-width' => array('border', 'width'), 'border-style' => array('border', 'style'), 'border-top-color' => array('border', 'top', 'color'), 'border-top-width' => array('border', 'top', 'width'), 'border-top-style' => array('border', 'top', 'style'), 'border-right-color' => array('border', 'right', 'color'), 'border-right-width' => array('border', 'right', 'width'), 'border-right-style' => array('border', 'right', 'style'), 'border-bottom-color' => array('border', 'bottom', 'color'), 'border-bottom-width' => array('border', 'bottom', 'width'), 'border-bottom-style' => array('border', 'bottom', 'style'), 'border-left-color' => array('border', 'left', 'color'), 'border-left-width' => array('border', 'left', 'width'), 'border-left-style' => array('border', 'left', 'style'), 'color' => array('color', 'text'), 'text-align' => array('typography', 'textAlign'), 'column-count' => array('typography', 'textColumns'), 'font-family' => array('typography', 'fontFamily'), 'font-size' => array('typography', 'fontSize'), 'font-style' => array('typography', 'fontStyle'), 'font-weight' => array('typography', 'fontWeight'), 'letter-spacing' => array('typography', 'letterSpacing'), 'line-height' => array('typography', 'lineHeight'), 'margin' => array('spacing', 'margin'), 'margin-top' => array('spacing', 'margin', 'top'), 'margin-right' => array('spacing', 'margin', 'right'), 'margin-bottom' => array('spacing', 'margin', 'bottom'), 'margin-left' => array('spacing', 'margin', 'left'), 'min-height' => array('dimensions', 'minHeight'), 'outline-color' => array('outline', 'color'), 'outline-offset' => array('outline', 'offset'), 'outline-style' => array('outline', 'style'), 'outline-width' => array('outline', 'width'), 'padding' => array('spacing', 'padding'), 'padding-top' => array('spacing', 'padding', 'top'), 'padding-right' => array('spacing', 'padding', 'right'), 'padding-bottom' => array('spacing', 'padding', 'bottom'), 'padding-left' => array('spacing', 'padding', 'left'), '--wp--style--root--padding' => array('spacing', 'padding'), '--wp--style--root--padding-top' => array('spacing', 'padding', 'top'), '--wp--style--root--padding-right' => array('spacing', 'padding', 'right'), '--wp--style--root--padding-bottom' => array('spacing', 'padding', 'bottom'), '--wp--style--root--padding-left' => array('spacing', 'padding', 'left'), 'text-decoration' => array('typography', 'textDecoration'), 'text-transform' => array('typography', 'textTransform'), 'filter' => array('filter', 'duotone'), 'box-shadow' => array('shadow'), 'writing-mode' => array('typography', 'writingMode')); /** * Indirect metadata for style properties that are not directly output. * @@ -50269,7 +51628,7 @@ class WP_Theme_JSON * * @var array */ - const VALID_STYLES = array('background' => array('backgroundImage' => 'top', 'backgroundPosition' => 'top', 'backgroundRepeat' => 'top', 'backgroundSize' => 'top'), 'border' => array('color' => \null, 'radius' => \null, 'style' => \null, 'width' => \null, 'top' => \null, 'right' => \null, 'bottom' => \null, 'left' => \null), 'color' => array('background' => \null, 'gradient' => \null, 'text' => \null), 'dimensions' => array('aspectRatio' => \null, 'minHeight' => \null), 'filter' => array('duotone' => \null), 'outline' => array('color' => \null, 'offset' => \null, 'style' => \null, 'width' => \null), 'shadow' => \null, 'spacing' => array('margin' => \null, 'padding' => \null, 'blockGap' => \null), 'typography' => array('fontFamily' => \null, 'fontSize' => \null, 'fontStyle' => \null, 'fontWeight' => \null, 'letterSpacing' => \null, 'lineHeight' => \null, 'textAlign' => \null, 'textColumns' => \null, 'textDecoration' => \null, 'textTransform' => \null, 'writingMode' => \null), 'css' => \null); + const VALID_STYLES = array('background' => array('backgroundImage' => \null, 'backgroundPosition' => \null, 'backgroundRepeat' => \null, 'backgroundSize' => \null, 'backgroundAttachment' => \null), 'border' => array('color' => \null, 'radius' => \null, 'style' => \null, 'width' => \null, 'top' => \null, 'right' => \null, 'bottom' => \null, 'left' => \null), 'color' => array('background' => \null, 'gradient' => \null, 'text' => \null), 'dimensions' => array('aspectRatio' => \null, 'minHeight' => \null), 'filter' => array('duotone' => \null), 'outline' => array('color' => \null, 'offset' => \null, 'style' => \null, 'width' => \null), 'shadow' => \null, 'spacing' => array('margin' => \null, 'padding' => \null, 'blockGap' => \null), 'typography' => array('fontFamily' => \null, 'fontSize' => \null, 'fontStyle' => \null, 'fontWeight' => \null, 'letterSpacing' => \null, 'lineHeight' => \null, 'textAlign' => \null, 'textColumns' => \null, 'textDecoration' => \null, 'textTransform' => \null, 'writingMode' => \null), 'css' => \null); /** * Defines which pseudo selectors are enabled for which elements. * @@ -50600,6 +51959,7 @@ protected function process_blocks_custom_css($css, $selector) * Returns the global styles custom CSS. * * @since 6.2.0 + * @deprecated 6.7.0 Use {@see 'get_stylesheet'} instead. * * @return string The global styles custom CSS. */ @@ -50936,7 +52296,7 @@ protected static function flatten_tree($tree, $prefix = '', $token = '--') * * array( * 'name' => 'property_name', - * 'value' => 'property_value, + * 'value' => 'property_value', * ) * * @since 5.8.0 @@ -50944,6 +52304,7 @@ protected static function flatten_tree($tree, $prefix = '', $token = '--') * @since 6.1.0 Added `$theme_json`, `$selector`, and `$use_root_padding` parameters. * @since 6.5.0 Output a `min-height: unset` rule when `aspect-ratio` is set. * @since 6.6.0 Pass current theme JSON settings to wp_get_typography_font_size_value(), and process background properties. + * @since 6.7.0 `ref` resolution of background properties, and assigning custom default values. * * @param array $styles Styles to process. * @param array $settings Theme settings. @@ -50970,6 +52331,7 @@ protected static function compute_style_properties($styles, $settings = array(), * to the standard form "--wp--preset--color--secondary". * This is already done by the sanitize method, * so every property will be in the standard form. + * @since 6.7.0 Added support for background image refs. * * @param array $styles Styles subtree. * @param array $path Which property to process. @@ -51106,6 +52468,7 @@ protected static function get_metadata_boolean($data, $path, $default_value = \f * * @since 5.8.0 * @since 5.9.0 Duotone preset also has origins. + * @since 6.7.0 Replace background image objects during merge. * * @param WP_Theme_JSON $incoming Data to merge. */ @@ -52113,7 +53476,7 @@ class WP_Token_Map * * @return WP_Token_Map|null Token map, unless unable to create it. */ - public static function from_array($mappings, $key_length = 2) + public static function from_array(array $mappings, int $key_length = 2) : ?\WP_Token_Map { } /** @@ -52146,7 +53509,7 @@ public static function from_array($mappings, $key_length = 2) * small_mappings?: array, * } $state */ - public static function from_precomputed_table($state) + public static function from_precomputed_table($state) : ?\WP_Token_Map { } /** @@ -52163,7 +53526,7 @@ public static function from_precomputed_table($state) * @param string $case_sensitivity Optional. Pass 'ascii-case-insensitive' to ignore ASCII case when matching. Default 'case-sensitive'. * @return bool Whether there's an entry for the given word in the map. */ - public function contains($word, $case_sensitivity = 'case-sensitive') + public function contains(string $word, string $case_sensitivity = 'case-sensitive') : bool { } /** @@ -52202,13 +53565,14 @@ public function contains($word, $case_sensitivity = 'case-sensitive') * * @since 6.6.0 * - * @param string $text String in which to search for a lookup key. - * @param int $offset Optional. How many bytes into the string where the lookup key ought to start. Default 0. - * @param ?int &$matched_token_byte_length Optional. Holds byte-length of found token matched, otherwise not set. Default null. - * @param string $case_sensitivity Optional. Pass 'ascii-case-insensitive' to ignore ASCII case when matching. Default 'case-sensitive'. + * @param string $text String in which to search for a lookup key. + * @param int $offset Optional. How many bytes into the string where the lookup key ought to start. Default 0. + * @param int|null &$matched_token_byte_length Optional. Holds byte-length of found token matched, otherwise not set. Default null. + * @param string $case_sensitivity Optional. Pass 'ascii-case-insensitive' to ignore ASCII case when matching. Default 'case-sensitive'. + * * @return string|null Mapped value of lookup key if found, otherwise `null`. */ - public function read_token($text, $offset = 0, &$matched_token_byte_length = \null, $case_sensitivity = 'case-sensitive') + public function read_token(string $text, int $offset = 0, &$matched_token_byte_length = \null, $case_sensitivity = 'case-sensitive') : ?string { } /** @@ -52225,7 +53589,7 @@ public function read_token($text, $offset = 0, &$matched_token_byte_length = \nu * * @return array The lookup key/substitution values as an associate array. */ - public function to_array() + public function to_array() : array { } /** @@ -52256,7 +53620,7 @@ public function to_array() * @param string $indent Optional. Use this string for indentation, or rely on the default horizontal tab character. Default "\t". * @return string Value which can be pasted into a PHP source file for quick loading of table. */ - public function precomputed_php_source_table($indent = "\t") + public function precomputed_php_source_table(string $indent = "\t") : string { } } @@ -53547,7 +54911,7 @@ public function update($new_instance, $old_instance) * * @since 2.8.0 * - * @param array $instance Current settings. + * @param array $instance The settings for the particular instance of the widget. * @return string Default return is 'noform'. * @phpstan-param T $instance */ @@ -58122,7 +59486,6 @@ public function close() * * @since 2.5.0 * - * @global string $wp_version The WordPress version string. * @global string $required_mysql_version The required MySQL version string. * @return void|WP_Error */ @@ -61086,6 +62449,16 @@ class WP_Font_Face_Resolver public static function get_fonts_from_theme_json() { } + /** + * Gets fonts defined in style variations. + * + * @since 6.7.0 + * + * @return array Returns an array of font-families. + */ + public static function get_fonts_from_style_variations() + { + } } /** * Font Face generates and prints `@font-face` styles for given fonts. @@ -61342,7 +62715,7 @@ class WP_HTML_Active_Formatting_Elements * @param WP_HTML_Token $token Look for this node in the stack. * @return bool Whether the referenced node is in the stack of active formatting elements. */ - public function contains_node($token) + public function contains_node(\WP_HTML_Token $token) { } /** @@ -61366,6 +62739,21 @@ public function count() public function current_node() { } + /** + * Inserts a "marker" at the end of the list of active formatting elements. + * + * > The markers are inserted when entering applet, object, marquee, + * > template, td, th, and caption elements, and are used to prevent + * > formatting from "leaking" into applet, object, marquee, template, + * > td, th, and caption elements. + * + * @see https://html.spec.whatwg.org/#concept-parser-marker + * + * @since 6.7.0 + */ + public function insert_marker() : void + { + } /** * Pushes a node onto the stack of active formatting elements. * @@ -61375,7 +62763,7 @@ public function current_node() * * @param WP_HTML_Token $token Push this node onto the stack. */ - public function push($token) + public function push(\WP_HTML_Token $token) { } /** @@ -61386,7 +62774,7 @@ public function push($token) * @param WP_HTML_Token $token Remove this node from the stack, if it's there already. * @return bool Whether the node was found and removed from the stack of active formatting elements. */ - public function remove_node($token) + public function remove_node(\WP_HTML_Token $token) { } /** @@ -61433,6 +62821,26 @@ public function walk_down() public function walk_up() { } + /** + * Clears the list of active formatting elements up to the last marker. + * + * > When the steps below require the UA to clear the list of active formatting elements up to + * > the last marker, the UA must perform the following steps: + * > + * > 1. Let entry be the last (most recently added) entry in the list of active + * > formatting elements. + * > 2. Remove entry from the list of active formatting elements. + * > 3. If entry was a marker, then stop the algorithm at this point. + * > The list has been cleared up to the last marker. + * > 4. Go to step 1. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker + * + * @since 6.7.0 + */ + public function clear_up_to_last_marker() : void + { + } } /** * Core class used by the HTML tag processor as a data structure for the attribute token, @@ -61563,7 +62971,7 @@ class WP_HTML_Decoder * Default 'case-sensitive'. * @return bool Whether the attribute value starts with the given string. */ - public static function attribute_starts_with($haystack, $search_text, $case_sensitivity = 'case-sensitive') + public static function attribute_starts_with($haystack, $search_text, $case_sensitivity = 'case-sensitive') : bool { } /** @@ -61583,7 +62991,7 @@ public static function attribute_starts_with($haystack, $search_text, $case_sens * @param string $text Text containing raw and non-decoded text node to decode. * @return string Decoded UTF-8 value of given text node. */ - public static function decode_text_node($text) + public static function decode_text_node($text) : string { } /** @@ -61602,7 +63010,7 @@ public static function decode_text_node($text) * @param string $text Text containing raw and non-decoded attribute value to decode. * @return string Decoded UTF-8 value of given attribute value. */ - public static function decode_attribute($text) + public static function decode_attribute($text) : string { } /** @@ -61624,7 +63032,7 @@ public static function decode_attribute($text) * @param string $text Text document containing span of text to decode. * @return string Decoded UTF-8 string. */ - public static function decode($context, $text) + public static function decode($context, $text) : string { } /** @@ -61654,6 +63062,8 @@ public static function decode($context, $text) * * @since 6.6.0 * + * @global WP_Token_Map $html5_named_character_references Mappings for HTML5 named character references. + * * @param string $context `attribute` for decoding attribute values, `data` otherwise. * @param string $text Text document containing span of text to decode. * @param int $at Optional. Byte offset into text where span begins, defaults to the beginning (0). @@ -61685,7 +63095,186 @@ public static function read_character_reference($context, $text, $at = 0, &$matc * @param int $code_point Which code point to convert. * @return string Converted code point, or `�` if invalid. */ - public static function code_point_to_utf8_bytes($code_point) + public static function code_point_to_utf8_bytes($code_point) : string + { + } + } + /** + * Core class used by the HTML API to represent a DOCTYPE declaration. + * + * This class parses DOCTYPE tokens for the full parser in the HTML Processor. + * Most code interacting with HTML won't need to parse DOCTYPE declarations; + * the HTML Processor is one exception. Consult the HTML Processor for proper + * parsing of an HTML document. + * + * A DOCTYPE declaration may indicate its document compatibility mode, which impacts + * the structure of the following HTML as well as the behavior of CSS class selectors. + * There are three possible modes: + * + * - "no-quirks" and "limited-quirks" modes (also called "standards mode"). + * - "quirks" mode. + * + * These modes mostly determine whether CSS class name selectors match values in the + * HTML `class` attribute in an ASCII-case-insensitive way (quirks mode), or whether + * they match only when byte-for-byte identical (no-quirks mode). + * + * All HTML documents should start with the standard HTML5 DOCTYPE: ``. + * + * > DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different + * > rendering mode that is incompatible with some specifications. Including the DOCTYPE in a + * > document ensures that the browser makes a best-effort attempt at following the + * > relevant specifications. + * + * @see https://html.spec.whatwg.org/#the-doctype + * + * DOCTYPE declarations comprise four properties: a name, public identifier, system identifier, + * and an indication of which document compatability mode they would imply if an HTML parser + * hadn't already determined it from other information. + * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * + * Historically, the DOCTYPE declaration was used in SGML documents to instruct a parser how + * to interpret the various tags and entities within a document. Its role in HTML diverged + * from how it was used in SGML and no meaning should be back-read into HTML based on how it + * is used in SGML, XML, or XHTML documents. + * + * @see https://www.iso.org/standard/16387.html + * + * @since 6.7.0 + * + * @see WP_HTML_Processor + */ + class WP_HTML_Doctype_Info + { + /** + * Name of the DOCTYPE: should be "html" for HTML documents. + * + * This value should be considered "read only" and not modified. + * + * Historically the DOCTYPE name indicates name of the document's root element. + * + * + * ╰──┴── name is "html". + * + * @see https://html.spec.whatwg.org/#tokenization + * + * @since 6.7.0 + * + * @var string|null + */ + public $name = \null; + /** + * Public identifier of the DOCTYPE. + * + * This value should be considered "read only" and not modified. + * + * The public identifier is optional and should not appear in HTML documents. + * A `null` value indicates that no public identifier was present in the DOCTYPE. + * + * Historically the presence of the public identifier indicated that a document + * was meant to be shared between computer systems and the value indicated to a + * knowledgeable parser how to find the relevant document type definition (DTD). + * + * + * │ │ ╰─── public identifier ─────╯ + * ╰──┴── name is "html". + * + * @see https://html.spec.whatwg.org/#tokenization + * + * @since 6.7.0 + * + * @var string|null + */ + public $public_identifier = \null; + /** + * System identifier of the DOCTYPE. + * + * This value should be considered "read only" and not modified. + * + * The system identifier is optional and should not appear in HTML documents. + * A `null` value indicates that no system identifier was present in the DOCTYPE. + * + * Historically the system identifier specified where a relevant document type + * declaration for the given document is stored and may be retrieved. + * + * + * │ │ ╰──── system identifier ────╯ + * ╰──┴── name is "html". + * + * If a public identifier were provided it would indicate to a knowledgeable + * parser how to interpret the system identifier. + * + * + * │ │ ╰─── public identifier ─────╯ ╰──── system identifier ────╯ + * ╰──┴── name is "html". + * + * @see https://html.spec.whatwg.org/#tokenization + * + * @since 6.7.0 + * + * @var string|null + */ + public $system_identifier = \null; + /** + * Which document compatability mode this DOCTYPE declaration indicates. + * + * This value should be considered "read only" and not modified. + * + * When an HTML parser has not already set the document compatability mode, + * (e.g. "quirks" or "no-quirks" mode), it will infer if from the properties + * of the appropriate DOCTYPE declaration, if one exists. The DOCTYPE can + * indicate one of three possible document compatability modes: + * + * - "no-quirks" and "limited-quirks" modes (also called "standards" mode). + * - "quirks" mode (also called `CSS1Compat` mode). + * + * An appropriate DOCTYPE is one encountered in the "initial" insertion mode, + * before the HTML element has been opened and before finding any other + * DOCTYPE declaration tokens. + * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * + * @since 6.7.0 + * + * @var string One of "no-quirks", "limited-quirks", or "quirks". + */ + public $indicated_compatability_mode; + /** + * Creates a WP_HTML_Doctype_Info instance by parsing a raw DOCTYPE declaration token. + * + * Use this method to parse a DOCTYPE declaration token and get access to its properties + * via the returned WP_HTML_Doctype_Info class instance. The provided input must parse + * properly as a DOCTYPE declaration, though it must not represent a valid DOCTYPE. + * + * Example: + * + * // Normative HTML DOCTYPE declaration. + * $doctype = WP_HTML_Doctype_Info::from_doctype_token( '' ); + * 'no-quirks' === $doctype->indicated_compatability_mode; + * + * // A nonsensical DOCTYPE is still valid, and will indicate "quirks" mode. + * $doctype = WP_HTML_Doctype_Info::from_doctype_token( '' ); + * 'quirks' === $doctype->indicated_compatability_mode; + * + * // Textual quirks present in raw HTML are handled appropriately. + * $doctype = WP_HTML_Doctype_Info::from_doctype_token( "" ); + * 'no-quirks' === $doctype->indicated_compatability_mode; + * + * // Anything other than a proper DOCTYPE declaration token fails to parse. + * null === WP_HTML_Doctype_Info::from_doctype_token( ' ' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( '

' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( '' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( 'html' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( '' ); + * + * @since 6.7.0 + * + * @param string $doctype_html The complete raw DOCTYPE HTML string, e.g. ``. + * + * @return WP_HTML_Doctype_Info|null A WP_HTML_Doctype_Info instance will be returned if the + * provided DOCTYPE HTML is a valid DOCTYPE. Otherwise, null. + */ + public static function from_doctype_token(string $doctype_html) : ?self { } } @@ -61729,7 +63318,7 @@ class WP_HTML_Open_Elements * * @param Closure $handler The handler function. */ - public function set_pop_handler(\Closure $handler) + public function set_pop_handler(\Closure $handler) : void { } /** @@ -61742,7 +63331,36 @@ public function set_pop_handler(\Closure $handler) * * @param Closure $handler The handler function. */ - public function set_push_handler(\Closure $handler) + public function set_push_handler(\Closure $handler) : void + { + } + /** + * Returns the name of the node at the nth position on the stack + * of open elements, or `null` if no such position exists. + * + * Note that this uses a 1-based index, which represents the + * "nth item" on the stack, counting from the top, where the + * top-most element is the 1st, the second is the 2nd, etc... + * + * @since 6.7.0 + * + * @param int $nth Retrieve the nth item on the stack, with 1 being + * the top element, 2 being the second, etc... + * @return WP_HTML_Token|null Name of the node on the stack at the given location, + * or `null` if the location isn't on the stack. + */ + public function at(int $nth) : ?\WP_HTML_Token + { + } + /** + * Reports if a node of a given name is in the stack of open elements. + * + * @since 6.7.0 + * + * @param string $node_name Name of node for which to check. + * @return bool Whether a node of the given name is in the stack of open elements. + */ + public function contains(string $node_name) : bool { } /** @@ -61753,7 +63371,7 @@ public function set_push_handler(\Closure $handler) * @param WP_HTML_Token $token Look for this node in the stack. * @return bool Whether the referenced node is in the stack of open elements. */ - public function contains_node($token) + public function contains_node(\WP_HTML_Token $token) : bool { } /** @@ -61763,7 +63381,7 @@ public function contains_node($token) * * @return int How many node are in the stack of open elements. */ - public function count() + public function count() : int { } /** @@ -61774,16 +63392,41 @@ public function count() * * @return WP_HTML_Token|null Last node in the stack of open elements, if one exists, otherwise null. */ - public function current_node() + public function current_node() : ?\WP_HTML_Token { } /** - * Returns whether an element is in a specific scope. + * Indicates if the current node is of a given type or name. * - * ## HTML Support + * It's possible to pass either a node type or a node name to this function. + * In the case there is no current element it will always return `false`. + * + * Example: * - * This function skips checking for the termination list because there - * are no supported elements which appear in the termination list. + * // Is the current node a text node? + * $stack->current_node_is( '#text' ); + * + * // Is the current node a DIV element? + * $stack->current_node_is( 'DIV' ); + * + * // Is the current node any element/tag? + * $stack->current_node_is( '#tag' ); + * + * @see WP_HTML_Tag_Processor::get_token_type + * @see WP_HTML_Tag_Processor::get_token_name + * + * @since 6.7.0 + * + * @access private + * + * @param string $identity Check if the current node has this name or type (depending on what is provided). + * @return bool Whether there is a current element that matches the given identity, whether a token name or type. + */ + public function current_node_is(string $identity) : bool + { + } + /** + * Returns whether an element is in a specific scope. * * @since 6.4.0 * @@ -61793,77 +63436,133 @@ public function current_node() * @param string[] $termination_list List of elements that terminate the search. * @return bool Whether the element was found in a specific scope. */ - public function has_element_in_specific_scope($tag_name, $termination_list) + public function has_element_in_specific_scope(string $tag_name, $termination_list) : bool { } /** * Returns whether a particular element is in scope. * + * > The stack of open elements is said to have a particular element in + * > scope when it has that element in the specific scope consisting of + * > the following element types: + * > + * > - applet + * > - caption + * > - html + * > - table + * > - td + * > - th + * > - marquee + * > - object + * > - template + * > - MathML mi + * > - MathML mo + * > - MathML mn + * > - MathML ms + * > - MathML mtext + * > - MathML annotation-xml + * > - SVG foreignObject + * > - SVG desc + * > - SVG title + * * @since 6.4.0 + * @since 6.7.0 Full support. * * @see https://html.spec.whatwg.org/#has-an-element-in-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ - public function has_element_in_scope($tag_name) + public function has_element_in_scope(string $tag_name) : bool { } /** * Returns whether a particular element is in list item scope. * + * > The stack of open elements is said to have a particular element + * > in list item scope when it has that element in the specific scope + * > consisting of the following element types: + * > + * > - All the element types listed above for the has an element in scope algorithm. + * > - ol in the HTML namespace + * > - ul in the HTML namespace + * * @since 6.4.0 * @since 6.5.0 Implemented: no longer throws on every invocation. + * @since 6.7.0 Supports all required HTML elements. * * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ - public function has_element_in_list_item_scope($tag_name) + public function has_element_in_list_item_scope(string $tag_name) : bool { } /** * Returns whether a particular element is in button scope. * + * > The stack of open elements is said to have a particular element + * > in button scope when it has that element in the specific scope + * > consisting of the following element types: + * > + * > - All the element types listed above for the has an element in scope algorithm. + * > - button in the HTML namespace + * * @since 6.4.0 + * @since 6.7.0 Supports all required HTML elements. * * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ - public function has_element_in_button_scope($tag_name) + public function has_element_in_button_scope(string $tag_name) : bool { } /** * Returns whether a particular element is in table scope. * + * > The stack of open elements is said to have a particular element + * > in table scope when it has that element in the specific scope + * > consisting of the following element types: + * > + * > - html in the HTML namespace + * > - table in the HTML namespace + * > - template in the HTML namespace + * * @since 6.4.0 + * @since 6.7.0 Full implementation. * * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope * - * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. - * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ - public function has_element_in_table_scope($tag_name) + public function has_element_in_table_scope(string $tag_name) : bool { } /** * Returns whether a particular element is in select scope. * - * @since 6.4.0 + * This test differs from the others like it, in that its rules are inverted. + * Instead of arriving at a match when one of any tag in a termination group + * is reached, this one terminates if any other tag is reached. * - * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope + * > The stack of open elements is said to have a particular element in select scope when it has + * > that element in the specific scope consisting of all element types except the following: + * > - optgroup in the HTML namespace + * > - option in the HTML namespace * - * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. + * @since 6.4.0 Stub implementation (throws). + * @since 6.7.0 Full implementation. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope * * @param string $tag_name Name of tag to check. - * @return bool Whether given element is in scope. + * @return bool Whether the given element is in SELECT scope. */ - public function has_element_in_select_scope($tag_name) + public function has_element_in_select_scope(string $tag_name) : bool { } /** @@ -61875,7 +63574,7 @@ public function has_element_in_select_scope($tag_name) * * @return bool Whether a P is in BUTTON scope. */ - public function has_p_in_button_scope() + public function has_p_in_button_scope() : bool { } /** @@ -61887,20 +63586,20 @@ public function has_p_in_button_scope() * * @return bool Whether a node was popped off of the stack. */ - public function pop() + public function pop() : bool { } /** - * Pops nodes off of the stack of open elements until one with the given tag name has been popped. + * Pops nodes off of the stack of open elements until an HTML tag with the given name has been popped. * * @since 6.4.0 * * @see WP_HTML_Open_Elements::pop * - * @param string $tag_name Name of tag that needs to be popped off of the stack of open elements. + * @param string $html_tag_name Name of tag that needs to be popped off of the stack of open elements. * @return bool Whether a tag of the given name was found and popped off of the stack of open elements. */ - public function pop_until($tag_name) + public function pop_until(string $html_tag_name) : bool { } /** @@ -61912,7 +63611,7 @@ public function pop_until($tag_name) * * @param WP_HTML_Token $stack_item Item to add onto stack. */ - public function push($stack_item) + public function push(\WP_HTML_Token $stack_item) : void { } /** @@ -61923,7 +63622,7 @@ public function push($stack_item) * @param WP_HTML_Token $token The node to remove from the stack of open elements. * @return bool Whether the node was found and removed from the stack of open elements. */ - public function remove_node($token) + public function remove_node(\WP_HTML_Token $token) : bool { } /** @@ -61968,9 +63667,10 @@ public function walk_down() * @since 6.4.0 * @since 6.5.0 Accepts $above_this_node to start traversal above a given node, if it exists. * - * @param ?WP_HTML_Token $above_this_node Start traversing above this node, if provided and if the node exists. + * @param WP_HTML_Token|null $above_this_node Optional. Start traversing above this node, + * if provided and if the node exists. */ - public function walk_up($above_this_node = \null) + public function walk_up(?\WP_HTML_Token $above_this_node = \null) { } /** @@ -61986,7 +63686,7 @@ public function walk_up($above_this_node = \null) * * @param WP_HTML_Token $item Element that was added to the stack of open elements. */ - public function after_element_push($item) + public function after_element_push(\WP_HTML_Token $item) : void { } /** @@ -62002,7 +63702,49 @@ public function after_element_push($item) * * @param WP_HTML_Token $item Element that was removed from the stack of open elements. */ - public function after_element_pop($item) + public function after_element_pop(\WP_HTML_Token $item) : void + { + } + /** + * Clear the stack back to a table context. + * + * > When the steps above require the UA to clear the stack back to a table context, it means + * > that the UA must, while the current node is not a table, template, or html element, pop + * > elements from the stack of open elements. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context + * + * @since 6.7.0 + */ + public function clear_to_table_context() : void + { + } + /** + * Clear the stack back to a table body context. + * + * > When the steps above require the UA to clear the stack back to a table body context, it + * > means that the UA must, while the current node is not a tbody, tfoot, thead, template, or + * > html element, pop elements from the stack of open elements. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context + * + * @since 6.7.0 + */ + public function clear_to_table_body_context() : void + { + } + /** + * Clear the stack back to a table row context. + * + * > When the steps above require the UA to clear the stack back to a table row context, it + * > means that the UA must, while the current node is not a tr, template, or html element, pop + * > elements from the stack of open elements. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context + * + * @since 6.7.0 + */ + public function clear_to_table_row_context() : void { } /** @@ -62053,6 +63795,61 @@ class WP_HTML_Processor_State * @var string */ const INSERTION_MODE_INITIAL = 'insertion-mode-initial'; + /** + * Before HTML insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_BEFORE_HTML = 'insertion-mode-before-html'; + /** + * Before head insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-beforehead + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_BEFORE_HEAD = 'insertion-mode-before-head'; + /** + * In head insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inhead + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_HEAD = 'insertion-mode-in-head'; + /** + * In head noscript insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_HEAD_NOSCRIPT = 'insertion-mode-in-head-noscript'; + /** + * After head insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-afterhead + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_HEAD = 'insertion-mode-after-head'; /** * In body insertion mode for full HTML parser. * @@ -62064,6 +63861,181 @@ class WP_HTML_Processor_State * @var string */ const INSERTION_MODE_IN_BODY = 'insertion-mode-in-body'; + /** + * In table insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intable + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TABLE = 'insertion-mode-in-table'; + /** + * In table text insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intabletext + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TABLE_TEXT = 'insertion-mode-in-table-text'; + /** + * In caption insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-incaption + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_CAPTION = 'insertion-mode-in-caption'; + /** + * In column group insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-incolumngroup + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_COLUMN_GROUP = 'insertion-mode-in-column-group'; + /** + * In table body insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intablebody + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TABLE_BODY = 'insertion-mode-in-table-body'; + /** + * In row insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inrow + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_ROW = 'insertion-mode-in-row'; + /** + * In cell insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-incell + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_CELL = 'insertion-mode-in-cell'; + /** + * In select insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inselect + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_SELECT = 'insertion-mode-in-select'; + /** + * In select in table insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inselectintable + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_SELECT_IN_TABLE = 'insertion-mode-in-select-in-table'; + /** + * In template insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intemplate + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TEMPLATE = 'insertion-mode-in-template'; + /** + * After body insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-afterbody + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_BODY = 'insertion-mode-after-body'; + /** + * In frameset insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inframeset + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_FRAMESET = 'insertion-mode-in-frameset'; + /** + * After frameset insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-afterframeset + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_FRAMESET = 'insertion-mode-after-frameset'; + /** + * After after body insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_AFTER_BODY = 'insertion-mode-after-after-body'; + /** + * After after frameset insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_AFTER_FRAMESET = 'insertion-mode-after-after-frameset'; + /** + * The stack of template insertion modes. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes + * + * @var array + */ + public $stack_of_template_insertion_modes = array(); /** * Tracks open elements while scanning HTML. * @@ -62075,7 +64047,7 @@ class WP_HTML_Processor_State * * @var WP_HTML_Open_Elements */ - public $stack_of_open_elements = \null; + public $stack_of_open_elements; /** * Tracks open formatting elements, used to handle mis-nested formatting element tags. * @@ -62087,7 +64059,7 @@ class WP_HTML_Processor_State * * @var WP_HTML_Active_Formatting_Elements */ - public $active_formatting_elements = \null; + public $active_formatting_elements; /** * Refers to the currently-matched tag, if any. * @@ -62116,6 +64088,63 @@ class WP_HTML_Processor_State * @var [string, array]|null */ public $context_node = \null; + /** + * The recognized encoding of the input byte stream. + * + * > The stream of code points that comprises the input to the tokenization + * > stage will be initially seen by the user agent as a stream of bytes + * > (typically coming over the network or from the local file system). + * > The bytes encode the actual characters according to a particular character + * > encoding, which the user agent uses to decode the bytes into characters. + * + * @since 6.7.0 + * + * @var string|null + */ + public $encoding = \null; + /** + * The parser's confidence in the input encoding. + * + * > When the HTML parser is decoding an input byte stream, it uses a character + * > encoding and a confidence. The confidence is either tentative, certain, or + * > irrelevant. The encoding used, and whether the confidence in that encoding + * > is tentative or certain, is used during the parsing to determine whether to + * > change the encoding. If no encoding is necessary, e.g. because the parser is + * > operating on a Unicode stream and doesn't have to use a character encoding + * > at all, then the confidence is irrelevant. + * + * @since 6.7.0 + * + * @var string + */ + public $encoding_confidence = 'tentative'; + /** + * HEAD element pointer. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer + * + * @var WP_HTML_Token|null + */ + public $head_element = \null; + /** + * FORM element pointer. + * + * > points to the last form element that was opened and whose end tag has + * > not yet been seen. It is used to make form controls associate with + * > forms in the face of dramatically bad markup, for historical reasons. + * > It is ignored inside template elements. + * + * @todo This may be invalidated by a seek operation. + * + * @see https://html.spec.whatwg.org/#form-element-pointer + * + * @since 6.7.0 + * + * @var WP_HTML_Token|null + */ + public $form_element = \null; /** * The frameset-ok flag indicates if a `FRAMESET` element is allowed in the current state. * @@ -62247,7 +64276,7 @@ public function __construct() * $processor = new WP_HTML_Tag_Processor( '

' ); * true === $processor->next_tag( 'DIV' ); * - * #### Special elements + * #### Special self-contained elements * * Some HTML elements are handled in a special way; their start and end tags * act like a void tag. These are special because their contents can't contain @@ -62586,6 +64615,31 @@ class WP_HTML_Tag_Processor * @var string */ protected $parser_state = self::STATE_READY; + /** + * Indicates if the document is in quirks mode or no-quirks mode. + * + * Impact on HTML parsing: + * + * - In `NO_QUIRKS_MODE` (also known as "standard mode"): + * - CSS class and ID selectors match byte-for-byte (case-sensitively). + * - A TABLE start tag `` implicitly closes any open `P` element. + * + * - In `QUIRKS_MODE`: + * - CSS class and ID selectors match match in an ASCII case-insensitive manner. + * - A TABLE start tag `
` opens a `TABLE` element as a child of a `P` + * element if one is open. + * + * Quirks and no-quirks mode are thus mostly about styling, but have an impact when + * tables are found inside paragraph elements. + * + * @see self::QUIRKS_MODE + * @see self::NO_QUIRKS_MODE + * + * @since 6.7.0 + * + * @var string + */ + protected $compat_mode = self::NO_QUIRKS_MODE; /** * What kind of syntax token became an HTML comment. * @@ -62598,6 +64652,19 @@ class WP_HTML_Tag_Processor * @var string|null */ protected $comment_type = \null; + /** + * What kind of text the matched text node represents, if it was subdivided. + * + * @see self::TEXT_IS_NULL_SEQUENCE + * @see self::TEXT_IS_WHITESPACE + * @see self::TEXT_IS_GENERIC + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + * + * @var string + */ + protected $text_node_classification = self::TEXT_IS_GENERIC; /** * Tracks a semantic location in the original HTML which * shifts with updates as they are applied to the document. @@ -62671,6 +64738,20 @@ class WP_HTML_Tag_Processor public function __construct($html) { } + /** + * Switches parsing mode into a new namespace, such as when + * encountering an SVG tag and entering foreign content. + * + * @since 6.7.0 + * + * @param string $new_namespace One of 'html', 'svg', or 'math' indicating into what + * namespace the next tokens will be processed. + * @return bool Whether the namespace was valid and changed. + * @phpstan-param 'html'|'svg'|'math' $new_namespace + */ + public function change_parsing_namespace(string $new_namespace) : bool + { + } /** * Finds the next tag matching the $query. * @@ -62695,7 +64776,7 @@ public function __construct($html) * tag_closers?: string|null, * } $query */ - public function next_tag($query = \null) + public function next_tag($query = \null) : bool { } /** @@ -62722,10 +64803,11 @@ public function next_tag($query = \null) * The Tag Processor currently only supports the tag token. * * @since 6.5.0 + * @since 6.7.0 Recognizes CDATA sections within foreign content. * * @return bool Whether a token was parsed. */ - public function next_token() + public function next_token() : bool { } /** @@ -62742,7 +64824,7 @@ public function next_token() * * @return bool Whether the parse paused at the start of an incomplete token. */ - public function paused_at_incomplete_token() + public function paused_at_incomplete_token() : bool { } /** @@ -62773,7 +64855,7 @@ public function class_list() * @param string $wanted_class Look for this CSS class name, ASCII case-insensitive. * @return bool|null Whether the matched tag contains the given class name, or null if not matched. */ - public function has_class($wanted_class) + public function has_class($wanted_class) : ?bool { } /** @@ -62856,7 +64938,7 @@ public function has_class($wanted_class) * @param string $name Identifies this particular bookmark. * @return bool Whether the bookmark was successfully created. */ - public function set_bookmark($name) + public function set_bookmark($name) : bool { } /** @@ -62868,7 +64950,7 @@ public function set_bookmark($name) * @param string $name Name of the bookmark to remove. * @return bool Whether the bookmark already existed before removal. */ - public function release_bookmark($name) + public function release_bookmark($name) : bool { } /** @@ -62879,7 +64961,7 @@ public function release_bookmark($name) * @param string $bookmark_name Name to identify a bookmark that potentially exists. * @return bool Whether that bookmark exists. */ - public function has_bookmark($bookmark_name) + public function has_bookmark($bookmark_name) : bool { } /** @@ -62893,7 +64975,7 @@ public function has_bookmark($bookmark_name) * @param string $bookmark_name Jump to the place in the document identified by this bookmark name. * @return bool Whether the internal cursor was successfully moved to the bookmark's location. */ - public function seek($bookmark_name) + public function seek($bookmark_name) : bool { } /** @@ -62944,7 +65026,18 @@ public function get_attribute($name) * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. */ - public function get_attribute_names_with_prefix($prefix) + public function get_attribute_names_with_prefix($prefix) : ?array + { + } + /** + * Returns the namespace of the matched token. + * + * @since 6.7.0 + * + * @return string One of 'html', 'math', or 'svg'. + * @phpstan-return 'html'|'math'|'svg' + */ + public function get_namespace() : string { } /** @@ -62963,7 +65056,31 @@ public function get_attribute_names_with_prefix($prefix) * * @return string|null Name of currently matched tag in input HTML, or `null` if none found. */ - public function get_tag() + public function get_tag() : ?string + { + } + /** + * Returns the adjusted tag name for a given token, taking into + * account the current parsing context, whether HTML, SVG, or MathML. + * + * @since 6.7.0 + * + * @return string|null Name of current tag name. + */ + public function get_qualified_tag_name() : ?string + { + } + /** + * Returns the adjusted attribute name for a given attribute, taking into + * account the current parsing context, whether HTML, SVG, or MathML. + * + * @since 6.7.0 + * + * @param string $attribute_name Which attribute to adjust. + * + * @return string|null + */ + public function get_qualified_attribute_name($attribute_name) : ?string { } /** @@ -62983,7 +65100,7 @@ public function get_tag() * * @return bool Whether the currently matched tag contains the self-closing flag. */ - public function has_self_closing_flag() + public function has_self_closing_flag() : bool { } /** @@ -62999,10 +65116,11 @@ public function has_self_closing_flag() * $p->is_tag_closer() === true; * * @since 6.2.0 + * @since 6.7.0 Reports all BR tags as opening tags. * * @return bool Whether the current tag is a tag closer. */ - public function is_tag_closer() + public function is_tag_closer() : bool { } /** @@ -63027,7 +65145,7 @@ public function is_tag_closer() * * @return string|null What kind of token is matched, or null. */ - public function get_token_type() + public function get_token_type() : ?string { } /** @@ -63050,7 +65168,7 @@ public function get_token_type() * * @return string|null Name of the matched token. */ - public function get_token_name() + public function get_token_name() : ?string { } /** @@ -63072,7 +65190,62 @@ public function get_token_name() * * @return string|null */ - public function get_comment_type() + public function get_comment_type() : ?string + { + } + /** + * Returns the text of a matched comment or null if not on a comment type node. + * + * This method returns the entire text content of a comment node as it + * would appear in the browser. + * + * This differs from {@see ::get_modifiable_text()} in that certain comment + * types in the HTML API cannot allow their entire comment text content to + * be modified. Namely, "bogus comments" of the form `` + * will create a comment whose text content starts with `?`. Note that if + * that character were modified, it would be possible to change the node + * type. + * + * @since 6.7.0 + * + * @return string|null The comment text as it would appear in the browser or null + * if not on a comment type node. + */ + public function get_full_comment_text() : ?string + { + } + /** + * Subdivides a matched text node, splitting NULL byte sequences and decoded whitespace as + * distinct nodes prefixes. + * + * Note that once anything that's neither a NULL byte nor decoded whitespace is + * encountered, then the remainder of the text node is left intact as generic text. + * + * - The HTML Processor uses this to apply distinct rules for different kinds of text. + * - Inter-element whitespace can be detected and skipped with this method. + * + * Text nodes aren't eagerly subdivided because there's no need to split them unless + * decisions are being made on NULL byte sequences or whitespace-only text. + * + * Example: + * + * $processor = new WP_HTML_Tag_Processor( "\x00Apples & Oranges" ); + * true === $processor->next_token(); // Text is "Apples & Oranges". + * true === $processor->subdivide_text_appropriately(); // Text is "". + * true === $processor->next_token(); // Text is "Apples & Oranges". + * false === $processor->subdivide_text_appropriately(); + * + * $processor = new WP_HTML_Tag_Processor( " \r\n\tMore" ); + * true === $processor->next_token(); // Text is "␤ ␤␉More". + * true === $processor->subdivide_text_appropriately(); // Text is "␤ ␤␉". + * true === $processor->next_token(); // Text is "More". + * false === $processor->subdivide_text_appropriately(); + * + * @since 6.7.0 + * + * @return bool Whether the text node was subdivided. + */ + public function subdivide_text_appropriately() : bool { } /** @@ -63091,11 +65264,68 @@ public function get_comment_type() * that a token has modifiable text, and a token with modifiable text may * have an empty string (e.g. a comment with no contents). * + * Limitations: + * + * - This function will not strip the leading newline appropriately + * after seeking into a LISTING or PRE element. To ensure that the + * newline is treated properly, seek to the LISTING or PRE opening + * tag instead of to the first text node inside the element. + * * @since 6.5.0 + * @since 6.7.0 Replaces NULL bytes (U+0000) and newlines appropriately. * * @return string */ - public function get_modifiable_text() + public function get_modifiable_text() : string + { + } + /** + * Sets the modifiable text for the matched token, if matched. + * + * Modifiable text is text content that may be read and changed without + * changing the HTML structure of the document around it. This includes + * the contents of `#text` nodes in the HTML as well as the inner + * contents of HTML comments, Processing Instructions, and others, even + * though these nodes aren't part of a parsed DOM tree. They also contain + * the contents of SCRIPT and STYLE tags, of TEXTAREA tags, and of any + * other section in an HTML document which cannot contain HTML markup (DATA). + * + * Not all modifiable text may be set by this method, and not all content + * may be set as modifiable text. In the case that this fails it will return + * `false` indicating as much. For instance, it will not allow inserting the + * string `next_tag( 'STYLE' ) ) { + * $style = $processor->get_modifiable_text(); + * $processor->set_modifiable_text( "// Made with love on the World Wide Web\n{$style}" ); + * } + * + * // Replace smiley text with Emoji smilies. + * while ( $processor->next_token() ) { + * if ( '#text' !== $processor->get_token_name() ) { + * continue; + * } + * + * $chunk = $processor->get_modifiable_text(); + * if ( ! str_contains( $chunk, ':)' ) ) { + * continue; + * } + * + * $processor->set_modifiable_text( str_replace( ':)', '🙂', $chunk ) ); + * } + * + * @since 6.7.0 + * + * @param string $plaintext_content New text content to represent in the matched token. + * + * @return bool Whether the text was able to update. + */ + public function set_modifiable_text(string $plaintext_content) : bool { } /** @@ -63114,7 +65344,7 @@ public function get_modifiable_text() * @param string|bool $value The new attribute value. * @return bool Whether an attribute value was set. */ - public function set_attribute($name, $value) + public function set_attribute($name, $value) : bool { } /** @@ -63125,7 +65355,7 @@ public function set_attribute($name, $value) * @param string $name The attribute name to remove. * @return bool Whether an attribute was removed. */ - public function remove_attribute($name) + public function remove_attribute($name) : bool { } /** @@ -63136,7 +65366,7 @@ public function remove_attribute($name) * @param string $class_name The class name to add. * @return bool Whether the class was set to be added. */ - public function add_class($class_name) + public function add_class($class_name) : bool { } /** @@ -63147,7 +65377,7 @@ public function add_class($class_name) * @param string $class_name The class name to remove. * @return bool Whether the class was set to be removed. */ - public function remove_class($class_name) + public function remove_class($class_name) : bool { } /** @@ -63159,7 +65389,7 @@ public function remove_class($class_name) * * @return string The processed HTML. */ - public function __toString() + public function __toString() : string { } /** @@ -63171,7 +65401,23 @@ public function __toString() * * @return string The processed HTML. */ - public function get_updated_html() + public function get_updated_html() : string + { + } + /** + * Gets DOCTYPE declaration info from a DOCTYPE token. + * + * DOCTYPE tokens may appear in many places in an HTML document. In most places, they are + * simply ignored. The main parsing functions find the basic shape of DOCTYPE tokens but + * do not perform detailed parsing. + * + * This method can be called to perform a full parse of the DOCTYPE token and retrieve + * its information. + * + * @return WP_HTML_Doctype_Info|null The DOCTYPE declaration information or `null` if not + * currently at a DOCTYPE node. + */ + public function get_doctype_info() : ?\WP_HTML_Doctype_Info { } /** @@ -63258,7 +65504,7 @@ public function get_updated_html() const STATE_COMMENT = 'STATE_COMMENT'; /** * Indicates that the parser has found a DOCTYPE node and it's - * possible to read and modify its modifiable text. + * possible to read its DOCTYPE information via `get_doctype_info()`. * * @since 6.5.0 * @@ -63361,6 +65607,63 @@ public function get_updated_html() * @since 6.5.0 */ const COMMENT_AS_INVALID_HTML = 'COMMENT_AS_INVALID_HTML'; + /** + * No-quirks mode document compatability mode. + * + * > In no-quirks mode, the behavior is (hopefully) the desired behavior + * > described by the modern HTML and CSS specifications. + * + * @see self::$compat_mode + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * + * @since 6.7.0 + * + * @var string + */ + const NO_QUIRKS_MODE = 'no-quirks-mode'; + /** + * Quirks mode document compatability mode. + * + * > In quirks mode, layout emulates behavior in Navigator 4 and Internet + * > Explorer 5. This is essential in order to support websites that were + * > built before the widespread adoption of web standards. + * + * @see self::$compat_mode + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * + * @since 6.7.0 + * + * @var string + */ + const QUIRKS_MODE = 'quirks-mode'; + /** + * Indicates that a span of text may contain any combination of significant + * kinds of characters: NULL bytes, whitespace, and others. + * + * @see self::$text_node_classification + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + */ + const TEXT_IS_GENERIC = 'TEXT_IS_GENERIC'; + /** + * Indicates that a span of text comprises a sequence only of NULL bytes. + * + * @see self::$text_node_classification + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + */ + const TEXT_IS_NULL_SEQUENCE = 'TEXT_IS_NULL_SEQUENCE'; + /** + * Indicates that a span of decoded text comprises only whitespace. + * + * @see self::$text_node_classification + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + */ + const TEXT_IS_WHITESPACE = 'TEXT_IS_WHITESPACE'; } /** * Core class used to safely parse and modify an HTML document. @@ -63452,22 +65755,11 @@ public function get_updated_html() * will abort early and stop all processing. This draconian measure ensures * that the HTML Processor won't break any HTML it doesn't fully understand. * - * The following list specifies the HTML tags that _are_ supported: - * - * - Containers: ADDRESS, BLOCKQUOTE, DETAILS, DIALOG, DIV, FOOTER, HEADER, MAIN, MENU, SPAN, SUMMARY. - * - Custom elements: All custom elements are supported. :) - * - Form elements: BUTTON, DATALIST, FIELDSET, INPUT, LABEL, LEGEND, METER, PROGRESS, SEARCH. - * - Formatting elements: B, BIG, CODE, EM, FONT, I, PRE, SMALL, STRIKE, STRONG, TT, U, WBR. - * - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. - * - Links: A. - * - Lists: DD, DL, DT, LI, OL, UL. - * - Media elements: AUDIO, CANVAS, EMBED, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, SOURCE, TRACK, VIDEO. - * - Paragraph: BR, P. - * - Phrasing elements: ABBR, AREA, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. - * - Sectioning elements: ARTICLE, ASIDE, HR, NAV, SECTION. - * - Templating elements: SLOT. - * - Text decoration: RUBY. - * - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, KEYGEN, LISTING, MULTICOL, NEXTID, PARAM, SPACER. + * The HTML Processor supports all elements other than a specific set: + * + * - Any element inside a TABLE. + * - Any element inside foreign content, including SVG and MATH. + * - Any element outside the IN BODY insertion mode, e.g. doctype declarations, meta, links. * * ### Supported markup * @@ -63476,15 +65768,30 @@ public function get_updated_html() * may in fact belong _before_ the table in the DOM. If the HTML Processor encounters * such a case it will stop processing. * - * The following list specifies HTML markup that _is_ supported: + * The following list illustrates some common examples of unexpected HTML inputs that + * the HTML Processor properly parses and represents: + * + * - HTML with optional tags omitted, e.g. `

one

two`. + * - HTML with unexpected tag closers, e.g. `

one more

`. + * - Non-void tags with self-closing flag, e.g. `
the DIV is still open.
`. + * - Heading elements which close open heading elements of another level, e.g. `

Closed by

`. + * - Elements containing text that looks like other tags but isn't, e.g. `The <img> is plaintext`. + * - SCRIPT and STYLE tags containing text that looks like HTML but isn't, e.g. ``. + * - SCRIPT content which has been escaped, e.g. ``. + * + * ### Unsupported Features + * + * This parser does not report parse errors. * - * - Markup involving only those tags listed above. - * - Fully-balanced and non-overlapping tags. - * - HTML with unexpected tag closers. - * - Some unbalanced or overlapping tags. - * - P tags after unclosed P tags. - * - BUTTON tags after unclosed BUTTON tags. - * - A tags after unclosed A tags that don't involve any active formatting elements. + * Normally, when additional HTML or BODY tags are encountered in a document, if there + * are any additional attributes on them that aren't found on the previous elements, + * the existing HTML and BODY elements adopt those missing attribute values. This + * parser does not add those additional attributes. + * + * In certain situations, elements are moved to a different part of the document in + * a process called "adoption" and "fostering." Because the nodes move to a location + * in the document that the parser had already processed, this parser does not support + * these situations and will bail. * * @since 6.4.0 * @@ -63539,6 +65846,25 @@ class WP_HTML_Processor extends \WP_HTML_Tag_Processor public static function create_fragment($html, $context = '', $encoding = 'UTF-8') { } + /** + * Creates an HTML processor in the full parsing mode. + * + * It's likely that a fragment parser is more appropriate, unless sending an + * entire HTML document from start to finish. Consider a fragment parser with + * a context node of ``. + * + * Since UTF-8 is the only currently-accepted charset, if working with a + * document that isn't UTF-8, it's important to convert the document before + * creating the processor: pass in the converted HTML. + * + * @param string $html Input HTML document to process. + * @param string|null $known_definite_encoding Optional. If provided, specifies the charset used + * in the input byte stream. Currently must be UTF-8. + * @return static|null The created processor if successful, otherwise null. + */ + public static function create_full_parser($html, $known_definite_encoding = 'UTF-8') + { + } /** * Constructor. * @@ -63579,7 +65905,21 @@ public function __construct($html, $use_the_static_create_methods_instead = \nul * * @return string|null The last error, if one exists, otherwise null. */ - public function get_last_error() + public function get_last_error() : ?string + { + } + /** + * Returns context for why the parser aborted due to unsupported HTML, if it did. + * + * This is meant for debugging purposes, not for production use. + * + * @since 6.7.0 + * + * @see self::$unsupported_exception + * + * @return WP_HTML_Unsupported_Exception|null + */ + public function get_unsupported_exception() { } /** @@ -63613,7 +65953,7 @@ public function get_last_error() * breadcrumbs?: string[], * } $query */ - public function next_tag($query = \null) + public function next_tag($query = \null) : bool { } /** @@ -63630,7 +65970,7 @@ public function next_tag($query = \null) * * @return bool */ - public function next_token() + public function next_token() : bool { } /** @@ -63649,7 +65989,7 @@ public function next_token() * * @return bool Whether the current tag is a tag closer. */ - public function is_tag_closer() + public function is_tag_closer() : bool { } /** @@ -63677,7 +66017,7 @@ public function is_tag_closer() * May also contain the wildcard `*` which matches a single element, e.g. `array( 'SECTION', '*' )`. * @return bool Whether the currently-matched tag is found at the given nested structure. */ - public function matches_breadcrumbs($breadcrumbs) + public function matches_breadcrumbs($breadcrumbs) : bool { } /** @@ -63693,15 +66033,12 @@ public function matches_breadcrumbs($breadcrumbs) * * @since 6.6.0 * - * @todo When adding support for foreign content, ensure that - * this returns false for self-closing elements in the - * SVG and MathML namespace. - * - * @param ?WP_HTML_Token $node Node to examine instead of current node, if provided. - * @return bool Whether to expect a closer for the currently-matched node, - * or `null` if not matched on any token. + * @param WP_HTML_Token|null $node Optional. Node to examine, if provided. + * Default is to examine current node. + * @return bool|null Whether to expect a closer for the currently-matched node, + * or `null` if not matched on any token. */ - public function expects_closer($node = \null) + public function expects_closer(?\WP_HTML_Token $node = \null) : ?bool { } /** @@ -63717,7 +66054,7 @@ public function expects_closer($node = \null) * @param string $node_to_process Whether to parse the next node or reprocess the current node. * @return bool Whether a tag was matched. */ - public function step($node_to_process = self::PROCESS_NEXT_NODE) + public function step($node_to_process = self::PROCESS_NEXT_NODE) : bool { } /** @@ -63740,7 +66077,7 @@ public function step($node_to_process = self::PROCESS_NEXT_NODE) * * @return string[]|null Array of tag names representing path to matched node, if matched, otherwise NULL. */ - public function get_breadcrumbs() + public function get_breadcrumbs() : ?array { } /** @@ -63768,7 +66105,114 @@ public function get_breadcrumbs() * * @return int Nesting-depth of current location in the document. */ - public function get_current_depth() + public function get_current_depth() : int + { + } + /** + * Normalizes an HTML fragment by serializing it. + * + * This method assumes that the given HTML snippet is found in BODY context. + * For normalizing full documents or fragments found in other contexts, create + * a new processor using {@see WP_HTML_Processor::create_fragment} or + * {@see WP_HTML_Processor::create_full_parser} and call {@see WP_HTML_Processor::serialize} + * on the created instances. + * + * Many aspects of an input HTML fragment may be changed during normalization. + * + * - Attribute values will be double-quoted. + * - Duplicate attributes will be removed. + * - Omitted tags will be added. + * - Tag and attribute name casing will be lower-cased, + * except for specific SVG and MathML tags or attributes. + * - Text will be re-encoded, null bytes handled, + * and invalid UTF-8 replaced with U+FFFD. + * - Any incomplete syntax trailing at the end will be omitted, + * for example, an unclosed comment opener will be removed. + * + * Example: + * + * echo WP_HTML_Processor::normalize( 'One syntax < <> "oddities" + * + * @since 6.7.0 + * + * @param string $html Input HTML to normalize. + * + * @return string|null Normalized output, or `null` if unable to normalize. + */ + public static function normalize(string $html) : ?string + { + } + /** + * Returns normalized HTML for a fragment by serializing it. + * + * This differs from {@see WP_HTML_Processor::normalize} in that it starts with + * a specific HTML Processor, which _must_ not have already started scanning; + * it must be in the initial ready state and will be in the completed state once + * serialization is complete. + * + * Many aspects of an input HTML fragment may be changed during normalization. + * + * - Attribute values will be double-quoted. + * - Duplicate attributes will be removed. + * - Omitted tags will be added. + * - Tag and attribute name casing will be lower-cased, + * except for specific SVG and MathML tags or attributes. + * - Text will be re-encoded, null bytes handled, + * and invalid UTF-8 replaced with U+FFFD. + * - Any incomplete syntax trailing at the end will be omitted, + * for example, an unclosed comment opener will be removed. + * + * Example: + * + * $processor = WP_HTML_Processor::create_fragment( 'One syntax < <> "oddities" + * + * @since 6.7.0 + * + * @return string|null Normalized HTML markup represented by processor, + * or `null` if unable to generate serialization. + */ + public function serialize() : ?string + { + } + /** + * Serializes the currently-matched token. + * + * This method produces a fully-normative HTML string for the currently-matched token, + * if able. If not matched at any token or if the token doesn't correspond to any HTML + * it will return an empty string (for example, presumptuous end tags are ignored). + * + * @see static::serialize() + * + * @since 6.7.0 + * + * @return string Serialization of token, or empty string if no serialization exists. + */ + protected function serialize_token() : string + { + } + /** + * Indicates the namespace of the current token, or "html" if there is none. + * + * @return string One of "html", "math", or "svg". + */ + public function get_namespace() : string { } /** @@ -63792,7 +66236,7 @@ public function get_current_depth() * * @return string|null Name of currently matched tag in input HTML, or `null` if none found. */ - public function get_tag() + public function get_tag() : ?string { } /** @@ -63812,7 +66256,7 @@ public function get_tag() * * @return bool Whether the currently matched tag contains the self-closing flag. */ - public function has_self_closing_flag() + public function has_self_closing_flag() : bool { } /** @@ -63835,7 +66279,7 @@ public function has_self_closing_flag() * * @return string|null Name of the matched token. */ - public function get_token_name() + public function get_token_name() : ?string { } /** @@ -63860,7 +66304,7 @@ public function get_token_name() * * @return string|null What kind of token is matched, or null. */ - public function get_token_type() + public function get_token_type() : ?string { } /** @@ -63900,7 +66344,7 @@ public function get_attribute($name) * @param string|bool $value The new attribute value. * @return bool Whether an attribute value was set. */ - public function set_attribute($name, $value) + public function set_attribute($name, $value) : bool { } /** @@ -63911,7 +66355,7 @@ public function set_attribute($name, $value) * @param string $name The attribute name to remove. * @return bool Whether an attribute was removed. */ - public function remove_attribute($name) + public function remove_attribute($name) : bool { } /** @@ -63940,7 +66384,7 @@ public function remove_attribute($name) * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. */ - public function get_attribute_names_with_prefix($prefix) + public function get_attribute_names_with_prefix($prefix) : ?array { } /** @@ -63951,7 +66395,7 @@ public function get_attribute_names_with_prefix($prefix) * @param string $class_name The class name to add. * @return bool Whether the class was set to be added. */ - public function add_class($class_name) + public function add_class($class_name) : bool { } /** @@ -63962,7 +66406,7 @@ public function add_class($class_name) * @param string $class_name The class name to remove. * @return bool Whether the class was set to be removed. */ - public function remove_class($class_name) + public function remove_class($class_name) : bool { } /** @@ -63970,10 +66414,14 @@ public function remove_class($class_name) * * @since 6.6.0 Subclassed for the HTML Processor. * + * @todo When reconstructing active formatting elements with attributes, find a way + * to indicate if the virtually-reconstructed formatting elements contain the + * wanted class name. + * * @param string $wanted_class Look for this CSS class name, ASCII case-insensitive. * @return bool|null Whether the matched tag contains the given class name, or null if not matched. */ - public function has_class($wanted_class) + public function has_class($wanted_class) : ?bool { } /** @@ -64015,7 +66463,7 @@ public function class_list() * * @return string */ - public function get_modifiable_text() + public function get_modifiable_text() : string { } /** @@ -64037,7 +66485,7 @@ public function get_modifiable_text() * * @return string|null */ - public function get_comment_type() + public function get_comment_type() : ?string { } /** @@ -64051,7 +66499,7 @@ public function get_comment_type() * @param string $bookmark_name Name of the bookmark to remove. * @return bool Whether the bookmark already existed before removal. */ - public function release_bookmark($bookmark_name) + public function release_bookmark($bookmark_name) : bool { } /** @@ -64071,7 +66519,7 @@ public function release_bookmark($bookmark_name) * @param string $bookmark_name Jump to the place in the document identified by this bookmark name. * @return bool Whether the internal cursor was successfully moved to the bookmark's location. */ - public function seek($bookmark_name) + public function seek($bookmark_name) : bool { } /** @@ -64154,7 +66602,7 @@ public function seek($bookmark_name) * @param string $bookmark_name Identifies this particular bookmark. * @return bool Whether the bookmark was successfully created. */ - public function set_bookmark($bookmark_name) + public function set_bookmark($bookmark_name) : bool { } /** @@ -64165,7 +66613,7 @@ public function set_bookmark($bookmark_name) * @param string $bookmark_name Name to identify a bookmark that potentially exists. * @return bool Whether that bookmark exists. */ - public function has_bookmark($bookmark_name) + public function has_bookmark($bookmark_name) : bool { } /** @@ -64175,10 +66623,10 @@ public function has_bookmark($bookmark_name) * * @see https://html.spec.whatwg.org/#special * - * @param string $tag_name Name of element to check. + * @param WP_HTML_Token|string $tag_name Node to check, or only its name if in the HTML namespace. * @return bool Whether the element of the given name is in the special category. */ - public static function is_special($tag_name) + public static function is_special($tag_name) : bool { } /** @@ -64193,7 +66641,33 @@ public static function is_special($tag_name) * @param string $tag_name Name of HTML tag to check. * @return bool Whether the given tag is an HTML Void Element. */ - public static function is_void($tag_name) + public static function is_void($tag_name) : bool + { + } + /** + * Gets an encoding from a given string. + * + * This is an algorithm defined in the WHAT-WG specification. + * + * Example: + * + * 'UTF-8' === self::get_encoding( 'utf8' ); + * 'UTF-8' === self::get_encoding( " \tUTF-8 " ); + * null === self::get_encoding( 'UTF-7' ); + * null === self::get_encoding( 'utf8; charset=' ); + * + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * + * @todo As this parser only supports UTF-8, only the UTF-8 + * encodings are detected. Add more as desired, but the + * parser will bail on non-UTF-8 encodings. + * + * @since 6.7.0 + * + * @param string $label A string which may specify a known encoding. + * @return string|null Known encoding if matched, otherwise null. + */ + protected static function get_encoding(string $label) : ?string { } /* @@ -64294,7 +66768,7 @@ class WP_HTML_Span * @param int $start Byte offset into document where replacement span begins. * @param int $length Byte length of span. */ - public function __construct($start, $length) + public function __construct(int $start, int $length) { } } @@ -64361,7 +66835,7 @@ class WP_HTML_Stack_Event * @param string $operation One of self::PUSH or self::POP. * @param string $provenance "virtual" or "real". */ - public function __construct($token, $operation, $provenance) + public function __construct(\WP_HTML_Token $token, string $operation, string $provenance) { } } @@ -64412,7 +66886,7 @@ class WP_HTML_Text_Replacement * @param int $length Byte length of span in document being replaced. * @param string $text Span of text to insert in document to replace existing content from start to end. */ - public function __construct($start, $length, $text) + public function __construct(int $start, int $length, string $text) { } } @@ -64467,6 +66941,22 @@ class WP_HTML_Token * @var bool */ public $has_self_closing_flag = \false; + /** + * Indicates if the element is an HTML element or if it's inside foreign content. + * + * @since 6.7.0 + * + * @var string 'html', 'svg', or 'math'. + */ + public $namespace = 'html'; + /** + * Indicates which kind of integration point the element is, if any. + * + * @since 6.7.0 + * + * @var string|null 'math', 'html', or null if not an integration point. + */ + public $integration_node_type = \null; /** * Called when token is garbage-collected or otherwise destroyed. * @@ -64478,12 +66968,13 @@ class WP_HTML_Token * * @since 6.4.0 * - * @param string $bookmark_name Name of bookmark corresponding to location in HTML where token is found. - * @param string $node_name Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker". - * @param bool $has_self_closing_flag Whether the source token contains the self-closing flag, regardless of whether it's valid. - * @param callable $on_destroy Function to call when destroying token, useful for releasing the bookmark. + * @param string|null $bookmark_name Name of bookmark corresponding to location in HTML where token is found, + * or `null` for markers and nodes without a bookmark. + * @param string $node_name Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker". + * @param bool $has_self_closing_flag Whether the source token contains the self-closing flag, regardless of whether it's valid. + * @param callable|null $on_destroy Optional. Function to call when destroying token, useful for releasing the bookmark. */ - public function __construct($bookmark_name, $node_name, $has_self_closing_flag, $on_destroy = \null) + public function __construct(?string $bookmark_name, string $node_name, bool $has_self_closing_flag, ?callable $on_destroy = \null) { } /** @@ -64517,6 +67008,7 @@ public function __wakeup() * operation and signify that the given HTML cannot be processed. * * @since 6.4.0 + * @since 6.7.0 Gained contextual information for use in debugging parse failures. * * @access private * @@ -64524,6 +67016,78 @@ public function __wakeup() */ class WP_HTML_Unsupported_Exception extends \Exception { + /** + * Name of the matched token when the exception was raised, + * if matched on a token. + * + * This does not imply that the token itself was unsupported, but it + * may have been the case that the token triggered part of the HTML + * parsing that isn't supported, such as the adoption agency algorithm. + * + * @since 6.7.0 + * + * @var string + */ + public $token_name; + /** + * Number of bytes into the input HTML document where the parser was + * parsing when the exception was raised. + * + * Use this to reconstruct context for the failure. + * + * @since 6.7.0 + * + * @var int + */ + public $token_at; + /** + * Full raw text of the matched token when the exception was raised, + * if matched on a token. + * + * Whereas the `$token_name` will be normalized, this contains the full + * raw text of the token, including original casing, duplicated attributes, + * and other syntactic variations that are normally abstracted in the HTML API. + * + * @since 6.7.0 + * + * @var string + */ + public $token; + /** + * Stack of open elements when the exception was raised. + * + * Use this to trace the parsing circumstances which led to the exception. + * + * @since 6.7.0 + * + * @var string[] + */ + public $stack_of_open_elements = array(); + /** + * List of active formatting elements when the exception was raised. + * + * Use this to trace the parsing circumstances which led to the exception. + * + * @since 6.7.0 + * + * @var string[] + */ + public $active_formatting_elements = array(); + /** + * Constructor function. + * + * @since 6.7.0 + * + * @param string $message Brief message explaining what is unsupported, the reason this exception was raised. + * @param string $token_name Normalized name of matched token when this exception was raised. + * @param int $token_at Number of bytes into source HTML document where matched token starts. + * @param string $token Full raw text of matched token when this exception was raised. + * @param string[] $stack_of_open_elements Stack of open elements when this exception was raised. + * @param string[] $active_formatting_elements List of active formatting elements when this exception was raised. + */ + public function __construct(string $message, string $token_name, int $token_at, string $token, array $stack_of_open_elements, array $active_formatting_elements) + { + } } /** * Class used to iterate over the tags of an HTML string and help process the @@ -64690,11 +67254,40 @@ public function config(string $store_namespace, array $config = array()) : array * configuration will be available using a `getConfig` utility. * * @since 6.5.0 - * @phpstan-return void + * + * @deprecated 6.7.0 Client data passing is handled by the {@see "script_module_data_{$module_id}"} filter. */ public function print_client_interactivity_data() { } + /** + * Set client-side interactivity-router data. + * + * Once in the browser, the state will be parsed and used to hydrate the client-side + * interactivity stores and the configuration will be available using a `getConfig` utility. + * + * @since 6.7.0 + * + * @param array $data Data to filter. + * @return array Data for the Interactivity Router script module. + */ + public function filter_script_module_interactivity_router_data(array $data) : array + { + } + /** + * Set client-side interactivity data. + * + * Once in the browser, the state will be parsed and used to hydrate the client-side + * interactivity stores and the configuration will be available using a `getConfig` utility. + * + * @since 6.7.0 + * + * @param array $data Data to filter. + * @return array Data for the Interactivity API script module. + */ + public function filter_script_module_interactivity_data(array $data) : array + { + } /** * Returns the latest value on the context stack with the passed namespace. * @@ -64708,9 +67301,23 @@ public function print_client_interactivity_data() public function get_context(?string $store_namespace = \null) : array { } + /** + * Returns an array representation of the current element being processed. + * + * The returned array contains a copy of the element attributes. + * + * @since 6.7.0 + * + * @return array{attributes: array}|null Current element. + */ + public function get_element() : ?array + { + } /** * Registers the `@wordpress/interactivity` script modules. * + * @deprecated 6.7.0 Script Modules registration is handled by {@see wp_default_script_modules()}. + * * @since 6.5.0 */ public function register_script_modules() @@ -64737,18 +67344,25 @@ public function process_directives(string $html) : string { } /** - * Outputs the markup for the top loading indicator and the screen reader - * notifications during client-side navigations. - * - * This method prints a div element representing a loading bar visible during - * navigation, as well as an aria-live region that can be read by screen - * readers to announce navigation status. + * Deprecated. * * @since 6.5.0 + * @deprecated 6.7.0 Use {@see WP_Interactivity_API::print_router_markup} instead. */ public function print_router_loading_and_screen_reader_markup() { } + /** + * Outputs markup for the @wordpress/interactivity-router script module. + * + * This method prints a div element representing a loading bar visible during + * navigation. + * + * @since 6.7.0 + */ + public function print_router_markup() + { + } } /** * Class WP_Translation_Controller. @@ -64902,6 +67516,19 @@ public function get_headers(string $textdomain = 'default') : array public function get_entries(string $textdomain = 'default') : array { } + /** + * Returns a boolean to indicate whether a translation exists for a given string with optional text domain and locale. + * + * @since 6.7.0 + * + * @param string $singular Singular translation to check. + * @param string $textdomain Optional. Text domain. Default 'default'. + * @param ?string $locale Optional. Locale. Default current locale. + * @return bool True if the translation exists, false otherwise. + */ + public function has_translation(string $singular, string $textdomain = 'default', ?string $locale = \null) : bool + { + } } /** * Class WP_Translation_File. @@ -66489,7 +69116,7 @@ public function get_headers() * Canonicalizes the header name. * * Ensures that header names are always treated the same regardless of - * source. Header names are always case insensitive. + * source. Header names are always case-insensitive. * * Note that we treat `-` (dashes) and `_` (underscores) as the same * character, as per header parsing rules in both Apache and nginx. @@ -66837,7 +69464,7 @@ protected function parse_json_params() * Parses the request body parameters. * * Parses out URL-encoded bodies for request methods that aren't supported - * natively by PHP. In PHP 5.x, only POST has these parsed automatically. + * natively by PHP. * * @since 4.4.0 * @phpstan-return void @@ -67354,6 +69981,18 @@ public function response_to_data($response, $embed) public static function get_response_links($response) { } + /** + * Gets the target links for a REST API Link. + * + * @since 6.7.0 + * + * @param array $link + * + * @return array|null + */ + protected static function get_target_hints_for_link($link) + { + } /** * Retrieves the CURIEs (compact URIs) used for relations. * @@ -68418,7 +71057,7 @@ public function get_items_permissions_check($request) * * @param bool $required Whether the post requires a password check. * @param WP_Post $post The post been password checked. - * @return bool Result of password check taking in to account REST API considerations. + * @return bool Result of password check taking into account REST API considerations. */ public function check_password_required($required, $post) { @@ -68745,15 +71384,15 @@ public function prepare_item_for_response($item, $request) { } /** - * Overwrites the default protected title format. + * Overwrites the default protected and private title format. * - * By default, WordPress will show password protected posts with a title of - * "Protected: %s", as the REST API communicates the protected status of a post - * in a machine readable format, we remove the "Protected: " prefix. + * By default, WordPress will show password protected or private posts with a title of + * "Protected: %s" or "Private: %s", as the REST API communicates the status of a post + * in a machine-readable format, we remove the prefix. * * @since 4.7.0 * - * @return string Protected title format. + * @return string Title format. */ public function protected_title_format() { @@ -68924,7 +71563,7 @@ public function update_item($request) { } /** - * Performs post processing on an attachment. + * Performs post-processing on an attachment. * * @since 5.3.0 * @@ -68935,7 +71574,7 @@ public function post_process_item($request) { } /** - * Checks if a given request can perform post processing on an attachment. + * Checks if a given request can perform post-processing on an attachment. * * @since 5.3.0 * @@ -69597,7 +72236,7 @@ public function get_items_permissions_check($request) * @since 6.0.0 * * @param WP_REST_Request $request Full details about the request. - * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_items($request) { @@ -70327,7 +72966,7 @@ public function register_routes() * * @since 5.9.0 * - * @return WP_Error|true True if the request has access, or WP_Error object. + * @return true|WP_Error True if the request has access, or WP_Error object. */ public function permissions_check() { @@ -70338,7 +72977,7 @@ public function permissions_check() * * @since 5.9.0 * - * @return WP_Error|void + * @return void|WP_Error */ public function export() { @@ -71062,6 +73701,7 @@ public function get_item_schema() * Checks if a given request has access to read a single theme global styles config. * * @since 5.9.0 + * @since 6.7.0 Allow users with edit post capabilities to view theme global styles. * * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise. @@ -71085,6 +73725,7 @@ public function get_theme_item($request) * Checks if a given request has access to read a single theme global styles config. * * @since 6.0.0 + * @since 6.7.0 Allow users with edit post capabilities to view theme global styles. * * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise. @@ -71282,7 +73923,7 @@ protected function check_has_read_only_access($request) { } /** - * Creates a single post. + * Creates a single nav menu item. * * @since 5.9.0 * @@ -71304,7 +73945,7 @@ public function update_item($request) { } /** - * Deletes a single menu item. + * Deletes a single nav menu item. * * @since 5.9.0 * @@ -71315,7 +73956,7 @@ public function delete_item($request) { } /** - * Prepares a single post for create or update. + * Prepares a single nav menu item for create or update. * * @since 5.9.0 * @@ -71327,7 +73968,7 @@ protected function prepare_item_for_database($request) { } /** - * Prepares a single post output for response. + * Prepares a single nav menu item output for response. * * @since 5.9.0 * @@ -71350,7 +73991,7 @@ protected function prepare_links($post) { } /** - * Retrieves Link Description Objects that should be added to the Schema for the posts collection. + * Retrieves Link Description Objects that should be added to the Schema for the nav menu items collection. * * @since 5.9.0 * @@ -71360,7 +74001,7 @@ protected function get_schema_links() { } /** - * Retrieves the term's schema, conforming to JSON Schema. + * Retrieves the nav menu item's schema, conforming to JSON Schema. * * @since 5.9.0 * @@ -71370,7 +74011,7 @@ public function get_item_schema() { } /** - * Retrieves the query params for the posts collection. + * Retrieves the query params for the nav menu items collection. * * @since 5.9.0 * @@ -71437,7 +74078,7 @@ public function register_routes() * @since 5.9.0 * * @param WP_REST_Request $request Full details about the request. - * @return WP_Error|bool True if the request has read access, WP_Error object otherwise. + * @return true|WP_Error True if the request has read access, WP_Error object otherwise. */ public function get_items_permissions_check($request) { @@ -71448,7 +74089,7 @@ public function get_items_permissions_check($request) * @since 5.9.0 * * @param WP_REST_Request $request Full details about the request. - * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_items($request) { @@ -71470,7 +74111,7 @@ public function get_item_permissions_check($request) * @since 5.9.0 * * @param WP_REST_Request $request Full details about the request. - * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. + * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_item($request) { @@ -71656,7 +74297,7 @@ public function get_item($request) * @since 4.7.0 * * @param WP_REST_Request $request Full details about the request. - * @return true|WP_Error True if the request has access to create items, false or WP_Error object otherwise. + * @return bool|WP_Error True if the request has access to create items, otherwise false or WP_Error object. */ public function create_item_permissions_check($request) { @@ -72116,6 +74757,20 @@ public function get_item_schema() public function get_collection_params() { } + /** + * Include a hash of the query args, so that different requests are stored in + * separate caches. + * + * MD5 is chosen for its speed, low-collision rate, universal availability, and to stay + * under the character limit for `_site_transient_timeout_{...}` keys. + * + * @link https://stackoverflow.com/questions/3665247/fastest-hash-for-non-cryptographic-uses + * + * @since 6.0.0 + * + * @param array $query_args Query arguments to generate a transient key from. + * @return string Transient key. + */ protected function get_transient_key($query_args) { } @@ -73281,7 +75936,7 @@ public function get_items($request) * @since 4.7.0 * * @param WP_REST_Request $request Full details about the request. - * @return true|WP_Error True if the request has read access for the item, otherwise false or WP_Error object. + * @return bool|WP_Error True if the request has read access for the item, otherwise false or WP_Error object. */ public function get_item_permissions_check($request) { @@ -74007,7 +76662,7 @@ public function parse_url_details($request) * * @since 5.9.0 * - * @return WP_Error|bool True if the request has permission, else WP_Error. + * @return true|WP_Error True if the request has permission, else WP_Error. */ public function permissions_check() { @@ -74590,7 +77245,7 @@ public function get_items_permissions_check($request) * @since 5.8.0 * * @param WP_REST_Request $request Full details about the request. - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. + * @return WP_REST_Response Response object. */ public function get_items($request) { @@ -74888,6 +77543,7 @@ protected function delete_meta_value($object_id, $meta_key, $name) * Alters the list of values in the database to match the list of provided values. * * @since 4.7.0 + * @since 6.7.0 Stores values into DB even if provided registered default value. * * @param int $object_id Object ID to update. * @param string $meta_key Key for the custom field. @@ -74902,6 +77558,7 @@ protected function update_multi_meta_value($object_id, $meta_key, $name, $values * Updates a meta value for an object. * * @since 4.7.0 + * @since 6.7.0 Stores values into DB even if provided registered default value. * * @param int $object_id Object ID to update. * @param string $meta_key Key for the custom field. @@ -75431,15 +78088,15 @@ public function prepare_item_links($id) { } /** - * Overwrites the default protected title format. + * Overwrites the default protected and private title format. * - * By default, WordPress will show password protected posts with a title of - * "Protected: %s". As the REST API communicates the protected status of a post - * in a machine readable format, we remove the "Protected: " prefix. + * By default, WordPress will show password protected or private posts with a title of + * "Protected: %s" or "Private: %s", as the REST API communicates the status of a post + * in a machine-readable format, we remove the prefix. * * @since 5.0.0 * - * @return string Protected title format. + * @return string Title format. */ public function protected_title_format() { @@ -75954,6 +78611,7 @@ public function render_sitemaps() * Redirects a URL to the wp-sitemap.xml * * @since 5.5.0 + * @deprecated 6.7.0 Deprecated in favor of {@see WP_Rewrite::rewrite_rules()} * * @param bool $bypass Pass-through of the pre_handle_404 filter value. * @param WP_Query $query The WP_Query object. @@ -76629,6 +79287,7 @@ public function get_css($options = array()) * @since 6.4.0 Added support for background.backgroundImage. * @since 6.5.0 Added support for background.backgroundPosition, * background.backgroundRepeat and dimensions.aspectRatio. + * @since 6.7.0 Added support for typography.writingMode. */ #[\AllowDynamicProperties] final class WP_Style_Engine @@ -76653,7 +79312,7 @@ final class WP_Style_Engine * @since 6.1.0 * @var array */ - const BLOCK_STYLE_DEFINITIONS_METADATA = array('background' => array('backgroundImage' => array('property_keys' => array('default' => 'background-image'), 'value_func' => array(self::class, 'get_url_or_value_css_declaration'), 'path' => array('background', 'backgroundImage')), 'backgroundPosition' => array('property_keys' => array('default' => 'background-position'), 'path' => array('background', 'backgroundPosition')), 'backgroundRepeat' => array('property_keys' => array('default' => 'background-repeat'), 'path' => array('background', 'backgroundRepeat')), 'backgroundSize' => array('property_keys' => array('default' => 'background-size'), 'path' => array('background', 'backgroundSize'))), 'color' => array('text' => array('property_keys' => array('default' => 'color'), 'path' => array('color', 'text'), 'css_vars' => array('color' => '--wp--preset--color--$slug'), 'classnames' => array('has-text-color' => \true, 'has-$slug-color' => 'color')), 'background' => array('property_keys' => array('default' => 'background-color'), 'path' => array('color', 'background'), 'css_vars' => array('color' => '--wp--preset--color--$slug'), 'classnames' => array('has-background' => \true, 'has-$slug-background-color' => 'color')), 'gradient' => array('property_keys' => array('default' => 'background'), 'path' => array('color', 'gradient'), 'css_vars' => array('gradient' => '--wp--preset--gradient--$slug'), 'classnames' => array('has-background' => \true, 'has-$slug-gradient-background' => 'gradient'))), 'border' => array('color' => array('property_keys' => array('default' => 'border-color', 'individual' => 'border-%s-color'), 'path' => array('border', 'color'), 'classnames' => array('has-border-color' => \true, 'has-$slug-border-color' => 'color')), 'radius' => array('property_keys' => array('default' => 'border-radius', 'individual' => 'border-%s-radius'), 'path' => array('border', 'radius')), 'style' => array('property_keys' => array('default' => 'border-style', 'individual' => 'border-%s-style'), 'path' => array('border', 'style')), 'width' => array('property_keys' => array('default' => 'border-width', 'individual' => 'border-%s-width'), 'path' => array('border', 'width')), 'top' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'top'), 'css_vars' => array('color' => '--wp--preset--color--$slug')), 'right' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'right'), 'css_vars' => array('color' => '--wp--preset--color--$slug')), 'bottom' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'bottom'), 'css_vars' => array('color' => '--wp--preset--color--$slug')), 'left' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'left'), 'css_vars' => array('color' => '--wp--preset--color--$slug'))), 'shadow' => array('shadow' => array('property_keys' => array('default' => 'box-shadow'), 'path' => array('shadow'), 'css_vars' => array('shadow' => '--wp--preset--shadow--$slug'))), 'dimensions' => array('aspectRatio' => array('property_keys' => array('default' => 'aspect-ratio'), 'path' => array('dimensions', 'aspectRatio'), 'classnames' => array('has-aspect-ratio' => \true)), 'minHeight' => array('property_keys' => array('default' => 'min-height'), 'path' => array('dimensions', 'minHeight'), 'css_vars' => array('spacing' => '--wp--preset--spacing--$slug'))), 'spacing' => array('padding' => array('property_keys' => array('default' => 'padding', 'individual' => 'padding-%s'), 'path' => array('spacing', 'padding'), 'css_vars' => array('spacing' => '--wp--preset--spacing--$slug')), 'margin' => array('property_keys' => array('default' => 'margin', 'individual' => 'margin-%s'), 'path' => array('spacing', 'margin'), 'css_vars' => array('spacing' => '--wp--preset--spacing--$slug'))), 'typography' => array('fontSize' => array('property_keys' => array('default' => 'font-size'), 'path' => array('typography', 'fontSize'), 'css_vars' => array('font-size' => '--wp--preset--font-size--$slug'), 'classnames' => array('has-$slug-font-size' => 'font-size')), 'fontFamily' => array('property_keys' => array('default' => 'font-family'), 'css_vars' => array('font-family' => '--wp--preset--font-family--$slug'), 'path' => array('typography', 'fontFamily'), 'classnames' => array('has-$slug-font-family' => 'font-family')), 'fontStyle' => array('property_keys' => array('default' => 'font-style'), 'path' => array('typography', 'fontStyle')), 'fontWeight' => array('property_keys' => array('default' => 'font-weight'), 'path' => array('typography', 'fontWeight')), 'lineHeight' => array('property_keys' => array('default' => 'line-height'), 'path' => array('typography', 'lineHeight')), 'textColumns' => array('property_keys' => array('default' => 'column-count'), 'path' => array('typography', 'textColumns')), 'textDecoration' => array('property_keys' => array('default' => 'text-decoration'), 'path' => array('typography', 'textDecoration')), 'textTransform' => array('property_keys' => array('default' => 'text-transform'), 'path' => array('typography', 'textTransform')), 'letterSpacing' => array('property_keys' => array('default' => 'letter-spacing'), 'path' => array('typography', 'letterSpacing')))); + const BLOCK_STYLE_DEFINITIONS_METADATA = array('background' => array('backgroundImage' => array('property_keys' => array('default' => 'background-image'), 'value_func' => array(self::class, 'get_url_or_value_css_declaration'), 'path' => array('background', 'backgroundImage')), 'backgroundPosition' => array('property_keys' => array('default' => 'background-position'), 'path' => array('background', 'backgroundPosition')), 'backgroundRepeat' => array('property_keys' => array('default' => 'background-repeat'), 'path' => array('background', 'backgroundRepeat')), 'backgroundSize' => array('property_keys' => array('default' => 'background-size'), 'path' => array('background', 'backgroundSize')), 'backgroundAttachment' => array('property_keys' => array('default' => 'background-attachment'), 'path' => array('background', 'backgroundAttachment'))), 'color' => array('text' => array('property_keys' => array('default' => 'color'), 'path' => array('color', 'text'), 'css_vars' => array('color' => '--wp--preset--color--$slug'), 'classnames' => array('has-text-color' => \true, 'has-$slug-color' => 'color')), 'background' => array('property_keys' => array('default' => 'background-color'), 'path' => array('color', 'background'), 'css_vars' => array('color' => '--wp--preset--color--$slug'), 'classnames' => array('has-background' => \true, 'has-$slug-background-color' => 'color')), 'gradient' => array('property_keys' => array('default' => 'background'), 'path' => array('color', 'gradient'), 'css_vars' => array('gradient' => '--wp--preset--gradient--$slug'), 'classnames' => array('has-background' => \true, 'has-$slug-gradient-background' => 'gradient'))), 'border' => array('color' => array('property_keys' => array('default' => 'border-color', 'individual' => 'border-%s-color'), 'path' => array('border', 'color'), 'classnames' => array('has-border-color' => \true, 'has-$slug-border-color' => 'color')), 'radius' => array('property_keys' => array('default' => 'border-radius', 'individual' => 'border-%s-radius'), 'path' => array('border', 'radius')), 'style' => array('property_keys' => array('default' => 'border-style', 'individual' => 'border-%s-style'), 'path' => array('border', 'style')), 'width' => array('property_keys' => array('default' => 'border-width', 'individual' => 'border-%s-width'), 'path' => array('border', 'width')), 'top' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'top'), 'css_vars' => array('color' => '--wp--preset--color--$slug')), 'right' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'right'), 'css_vars' => array('color' => '--wp--preset--color--$slug')), 'bottom' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'bottom'), 'css_vars' => array('color' => '--wp--preset--color--$slug')), 'left' => array('value_func' => array(self::class, 'get_individual_property_css_declarations'), 'path' => array('border', 'left'), 'css_vars' => array('color' => '--wp--preset--color--$slug'))), 'shadow' => array('shadow' => array('property_keys' => array('default' => 'box-shadow'), 'path' => array('shadow'), 'css_vars' => array('shadow' => '--wp--preset--shadow--$slug'))), 'dimensions' => array('aspectRatio' => array('property_keys' => array('default' => 'aspect-ratio'), 'path' => array('dimensions', 'aspectRatio'), 'classnames' => array('has-aspect-ratio' => \true)), 'minHeight' => array('property_keys' => array('default' => 'min-height'), 'path' => array('dimensions', 'minHeight'), 'css_vars' => array('spacing' => '--wp--preset--spacing--$slug'))), 'spacing' => array('padding' => array('property_keys' => array('default' => 'padding', 'individual' => 'padding-%s'), 'path' => array('spacing', 'padding'), 'css_vars' => array('spacing' => '--wp--preset--spacing--$slug')), 'margin' => array('property_keys' => array('default' => 'margin', 'individual' => 'margin-%s'), 'path' => array('spacing', 'margin'), 'css_vars' => array('spacing' => '--wp--preset--spacing--$slug'))), 'typography' => array('fontSize' => array('property_keys' => array('default' => 'font-size'), 'path' => array('typography', 'fontSize'), 'css_vars' => array('font-size' => '--wp--preset--font-size--$slug'), 'classnames' => array('has-$slug-font-size' => 'font-size')), 'fontFamily' => array('property_keys' => array('default' => 'font-family'), 'css_vars' => array('font-family' => '--wp--preset--font-family--$slug'), 'path' => array('typography', 'fontFamily'), 'classnames' => array('has-$slug-font-family' => 'font-family')), 'fontStyle' => array('property_keys' => array('default' => 'font-style'), 'path' => array('typography', 'fontStyle')), 'fontWeight' => array('property_keys' => array('default' => 'font-weight'), 'path' => array('typography', 'fontWeight')), 'lineHeight' => array('property_keys' => array('default' => 'line-height'), 'path' => array('typography', 'lineHeight')), 'textColumns' => array('property_keys' => array('default' => 'column-count'), 'path' => array('typography', 'textColumns')), 'textDecoration' => array('property_keys' => array('default' => 'text-decoration'), 'path' => array('typography', 'textDecoration')), 'textTransform' => array('property_keys' => array('default' => 'text-transform'), 'path' => array('typography', 'textTransform')), 'letterSpacing' => array('property_keys' => array('default' => 'letter-spacing'), 'path' => array('typography', 'letterSpacing')), 'writingMode' => array('property_keys' => array('default' => 'writing-mode'), 'path' => array('typography', 'writingMode')))); /** * Stores a CSS rule using the provided CSS selector and CSS declarations. * @@ -81815,6 +84474,7 @@ function wp_copy_parent_attachment_properties($cropped, $parent_attachment_id, $ * * @since 2.1.0 * @since 6.0.0 The `$filesize` value was added to the returned array. + * @since 6.7.0 The 'image/heic' mime type is supported. * * @param int $attachment_id Attachment ID to process. * @param string $file Filepath of the attached image. @@ -84153,34 +86813,33 @@ function options_reading_blog_charset() * * The second filter, {@see 'plugins_api'}, allows a plugin to override the WordPress.org * Plugin Installation API entirely. If `$action` is 'query_plugins' or 'plugin_information', - * an object MUST be passed. If `$action` is 'hot_tags' or 'hot_categories', an array MUST - * be passed. + * an object MUST be passed. If `$action` is 'hot_tags', an array MUST be passed. * * Finally, the third filter, {@see 'plugins_api_result'}, makes it possible to filter the * response object or array, depending on the `$action` type. * * Supported arguments per action: * - * | Argument Name | query_plugins | plugin_information | hot_tags | hot_categories | - * | -------------------- | :-----------: | :----------------: | :------: | :------------: | - * | `$slug` | No | Yes | No | No | - * | `$per_page` | Yes | No | No | No | - * | `$page` | Yes | No | No | No | - * | `$number` | No | No | Yes | Yes | - * | `$search` | Yes | No | No | No | - * | `$tag` | Yes | No | No | No | - * | `$author` | Yes | No | No | No | - * | `$user` | Yes | No | No | No | - * | `$browse` | Yes | No | No | No | - * | `$locale` | Yes | Yes | No | No | - * | `$installed_plugins` | Yes | No | No | No | - * | `$is_ssl` | Yes | Yes | No | No | - * | `$fields` | Yes | Yes | No | No | + * | Argument Name | query_plugins | plugin_information | hot_tags | + * | -------------------- | :-----------: | :----------------: | :------: | + * | `$slug` | No | Yes | No | + * | `$per_page` | Yes | No | No | + * | `$page` | Yes | No | No | + * | `$number` | No | No | Yes | + * | `$search` | Yes | No | No | + * | `$tag` | Yes | No | No | + * | `$author` | Yes | No | No | + * | `$user` | Yes | No | No | + * | `$browse` | Yes | No | No | + * | `$locale` | Yes | Yes | No | + * | `$installed_plugins` | Yes | No | No | + * | `$is_ssl` | Yes | Yes | No | + * | `$fields` | Yes | Yes | No | * * @since 2.7.0 * * @param string $action API action to perform: 'query_plugins', 'plugin_information', - * 'hot_tags' or 'hot_categories'. + * or 'hot_tags'. * @param array|object $args { * Optional. Array or object of arguments to serialize for the Plugin Info API. * @@ -84224,14 +86883,13 @@ function options_reading_blog_charset() * @type bool $banners Whether to return the banner images links. Default false. * @type bool $icons Whether to return the icon links. Default false. * @type bool $active_installs Whether to return the number of active installations. Default false. - * @type bool $group Whether to return the assigned group. Default false. * @type bool $contributors Whether to return the list of contributors. Default false. * } * } * @return object|array|WP_Error Response object or array on success, WP_Error on failure. See the * {@link https://developer.wordpress.org/reference/functions/plugins_api/ function reference article} * for more information on the make-up of possible return values depending on the value of `$action`. - * @phpstan-param 'query_plugins'|'plugin_information'|'hot_tags'|'hot_categories' $action + * @phpstan-param 'query_plugins'|'plugin_information'|'hot_tags' $action * @phpstan-param object|array{ * slug?: string, * per_page?: int, @@ -84267,7 +86925,6 @@ function options_reading_blog_charset() * banners?: bool, * icons?: bool, * active_installs?: bool, - * group?: bool, * contributors?: bool, * }, * } $args @@ -85847,7 +88504,7 @@ function wp_create_post_autosave($post_data) { } /** - * Autosave the revisioned meta fields. + * Autosaves the revisioned meta fields. * * Iterates through the revisioned meta fields and checks each to see if they are set, * and have a changed value. If so, the meta value is saved and attached to the autosave. @@ -87815,7 +90472,36 @@ function paused_themes_notice() * * @param string $type Type of translations. Accepts 'plugins', 'themes', 'core'. * @param array|object $args Translation API arguments. Optional. - * @return array|WP_Error On success an associative array of translations, WP_Error on failure. + * @return array|WP_Error { + * On success an associative array of translations, WP_Error on failure. + * + * @type array $translations { + * List of translations, each an array of data. + * + * @type array ...$0 { + * @type string $language Language code. + * @type string $version WordPress version. + * @type string $updated Date the translation was last updated, in MySQL datetime format. + * @type string $english_name English name of the language. + * @type string $native_name Native name of the language. + * @type string $package URL to download the translation package. + * @type string[] $iso Array of ISO language codes. + * @type array $strings Array of translated strings used in the installation process. + * } + * } + * } + * @phpstan-return \WP_Error|array{ + * translations: array, + * } */ function translations_api($type, $args = \null) { @@ -87827,8 +90513,31 @@ function translations_api($type, $args = \null) * * @see translations_api() * - * @return array[] Array of translations, each an array of data, keyed by the language. If the API response results - * in an error, an empty array will be returned. + * @return array { + * Array of translations keyed by the language code, each an associative array of data. + * If the API response results in an error, an empty array will be returned. + * + * @type array ...$0 { + * @type string $language Language code. + * @type string $version WordPress version. + * @type string $updated Date the translation was last updated, in MySQL datetime format. + * @type string $english_name English name of the language. + * @type string $native_name Native name of the language. + * @type string $package URL to download the translation package. + * @type string[] $iso Array of ISO language codes. + * @type array $strings Array of translated strings used in the installation process. + * } + * } + * @phpstan-return array */ function wp_get_available_translations() { @@ -88379,8 +91088,8 @@ function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) * * @since 2.1.0 * - * @global int $wp_current_db_version The old (current) database version. - * @global int $wp_db_version The new database version. + * @global int $wp_current_db_version The old (current) database version. + * @global int $wp_db_version The new database version. * @phpstan-return void */ function wp_upgrade() @@ -88862,6 +91571,17 @@ function upgrade_640() function upgrade_650() { } + /** + * Executes changes made in WordPress 6.7.0. + * + * @ignore + * @since 6.7.0 + * + * @global int $wp_current_db_version The old (current) database version. + */ + function upgrade_670() + { + } /** * Executes network-level upgrade routines. * @@ -90705,6 +93425,7 @@ function wp_register_background_support($block_type) * @since 6.4.0 * @since 6.5.0 Added support for `backgroundPosition` and `backgroundRepeat` output. * @since 6.6.0 Removed requirement for `backgroundImage.source`. A file/url is the default. + * @since 6.7.0 Added support for `backgroundAttachment` output. * * @access private * @@ -90715,20 +93436,6 @@ function wp_register_background_support($block_type) function wp_render_background_support($block_content, $block) { } - /** - * Generate block style variation instance name. - * - * @since 6.6.0 - * @access private - * - * @param array $block Block object. - * @param string $variation Slug for the block style variation. - * - * @return string The unique variation name. - */ - function wp_create_block_style_variation_instance_name($block, $variation) - { - } /** * Determines the block style variation names within a CSS class string. * @@ -91126,6 +93833,7 @@ function wp_add_parent_layout_to_parsed_block($parsed_block, $source_block, $par * to avoid breaking styles relying on that div. * * @since 5.8.0 + * @since 6.6.1 Removed inner container from Grid variations. * @access private * * @param string $block_content Rendered block content. @@ -91401,6 +94109,7 @@ function wp_get_computed_fluid_typography_value($args = array()) * @since 6.3.0 Using layout.wideSize as max viewport width, and logarithmic scale factor to calculate minimum font scale. * @since 6.4.0 Added configurable min and max viewport width values to the typography.fluid theme.json schema. * @since 6.6.0 Deprecated bool argument $should_use_fluid_typography. + * @since 6.7.0 Font size presets can enable fluid typography individually, even if it’s disabled globally. * * @param array $preset { * Required. fontSizes preset value as seen in theme.json. @@ -91589,7 +94298,7 @@ function _get_block_template_file($template_type, $slug) * @type string $post_type Post type to get the templates for. * } * - * @return array Template + * @return array|null Template files on success, null if `$template_type` is not matched. * @phpstan-param 'wp_template'|'wp_template_part' $template_type * @phpstan-param array{ * slug__in?: string[], @@ -91842,8 +94551,6 @@ function wp_is_theme_directory_ignored($path) * @since 5.9.0 * @since 6.0.0 Adds the whole theme to the export archive. * - * @global string $wp_version The WordPress version string. - * * @return WP_Error|string Path of the ZIP file or error on failure. */ function wp_generate_block_templates_export_file() @@ -92008,6 +94715,46 @@ function _block_template_render_without_post_block_context($context) function _resolve_template_for_new_post($wp_query) { } + /** + * Register a block template. + * + * @since 6.7.0 + * + * @param string $template_name Template name in the form of `plugin_uri//template_name`. + * @param array|string $args { + * @type string $title Optional. Title of the template as it will be shown in the Site Editor + * and other UI elements. + * @type string $description Optional. Description of the template as it will be shown in the Site + * Editor. + * @type string $content Optional. Default content of the template that will be used when the + * template is rendered or edited in the editor. + * @type string[] $post_types Optional. Array of post types to which the template should be available. + * @type string $plugin Optional. Slug of the plugin that registers the template. + * } + * @return WP_Block_Template|WP_Error The registered template object on success, WP_Error object on failure. + * @phpstan-param array{ + * title?: string, + * description?: string, + * content?: string, + * post_types?: string[], + * plugin?: string, + * } $args + */ + function register_block_template($template_name, $args = array()) + { + } + /** + * Unregister a block template. + * + * @since 6.7.0 + * + * @param string $template_name Template name in the form of `plugin_uri//template_name`. + * @return WP_Block_Template|WP_Error The unregistered template object on success, WP_Error object on failure or if the + * template doesn't exist. + */ + function unregister_block_template($template_name) + { + } /** * Removes the block asset's path prefix if provided. * @@ -92113,6 +94860,21 @@ function register_block_style_handle($metadata, $field_name, $index = 0) function get_block_metadata_i18n_schema() { } + /** + * Registers a block metadata collection. + * + * This function allows core and third-party plugins to register their block metadata + * collections in a centralized location. Registering collections can improve performance + * by avoiding multiple reads from the filesystem and parsing JSON. + * + * @since 6.7.0 + * + * @param string $path The base path in which block files for the collection reside. + * @param string $manifest The path to the manifest file for the collection. + */ + function wp_register_block_metadata_collection($path, $manifest) + { + } /** * Registers a block type from the metadata stored in the `block.json` file. * @@ -92123,6 +94885,7 @@ function get_block_metadata_i18n_schema() * @since 6.3.0 Added `selectors` field. * @since 6.4.0 Added support for `blockHooks` field. * @since 6.5.0 Added support for `allowedBlocks`, `viewScriptModule`, and `viewStyle` fields. + * @since 6.7.0 Allow PHP filename as `variations` argument. * * @param string $file_or_folder Path to the JSON file with metadata definition for * the block or path to the folder where the `block.json` file is located. @@ -92324,6 +95087,7 @@ function set_ignored_hooked_blocks_metadata(&$parsed_anchor_block, $relative_pos * Runs the hooked blocks algorithm on the given content. * * @since 6.6.0 + * @since 6.7.0 Injects the `theme` attribute into Template Part blocks, even if no hooked blocks are registered. * @access private * * @param string $content Serialized content. @@ -92349,6 +95113,20 @@ function apply_block_hooks_to_content($content, $context, $callback = 'insert_ho function remove_serialized_parent_block($serialized_block) { } + /** + * Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the wrapper block. + * + * @since 6.7.0 + * @access private + * + * @see remove_serialized_parent_block() + * + * @param string $serialized_block The serialized markup of a block and its inner blocks. + * @return string The serialized markup of the wrapper block. + */ + function extract_serialized_parent_block($serialized_block) + { + } /** * Updates the wp_postmeta with the list of ignored hooked blocks where the inner blocks are stored as post content. * Currently only supports `wp_navigation` post types. @@ -92503,7 +95281,7 @@ function get_comment_delimited_block_content($block_name, $block_attributes, $bl * @since 5.3.1 * * @param array $block { - * A representative array of a single parsed block object. See WP_Block_Parser_Block. + * An associative array of a single parsed block object. See WP_Block_Parser_Block. * * @type string $blockName Name of block. * @type array $attrs Attributes from block comment delimiters. @@ -92535,7 +95313,7 @@ function serialize_block($block) * Array of block structures. * * @type array ...$0 { - * A representative array of a single parsed block object. See WP_Block_Parser_Block. + * An associative array of a single parsed block object. See WP_Block_Parser_Block. * * @type string $blockName Name of block. * @type array $attrs Attributes from block comment delimiters. @@ -92583,7 +95361,7 @@ function serialize_blocks($blocks) * * @see serialize_block() * - * @param array $block A representative array of a single parsed block object. See WP_Block_Parser_Block. + * @param array $block An associative array of a single parsed block object. See WP_Block_Parser_Block. * @param callable $pre_callback Callback to run on each block in the tree before it is traversed and serialized. * It is called with the following arguments: &$block, $parent_block, $previous_block. * Its string return value will be prepended to the serialized block markup. @@ -92773,7 +95551,7 @@ function _excerpt_render_inner_blocks($parsed_block, $allowed_blocks) * @global WP_Post $post The post to edit. * * @param array $parsed_block { - * A representative array of the block being rendered. See WP_Block_Parser_Block. + * An associative array of the block being rendered. See WP_Block_Parser_Block. * * @type string $blockName Name of block. * @type array $attrs Attributes from block comment delimiters. @@ -92805,7 +95583,7 @@ function render_block($parsed_block) * Array of block structures. * * @type array ...$0 { - * A representative array of a single parsed block object. See WP_Block_Parser_Block. + * An associative array of a single parsed block object. See WP_Block_Parser_Block. * * @type string $blockName Name of block. * @type array $attrs Attributes from block comment delimiters. @@ -92938,6 +95716,7 @@ function wp_migrate_old_typography_shape($metadata) * * @since 5.8.0 * @since 6.1.0 Added `query_loop_block_query_vars` filter and `parents` support in query. + * @since 6.7.0 Added support for the `format` property in query. * * @param WP_Block $block Block instance. * @param int $page Current query's page. @@ -93230,12 +96009,15 @@ function block_core_calendar_update_has_published_post_on_transition_post_status * Renders the `core/categories` block on server. * * @since 5.0.0 + * @since 6.7.0 Enable client-side rendering if enhancedPagination context is true. * - * @param array $attributes The block attributes. + * @param array $attributes The block attributes. + * @param string $content Block default content. + * @param WP_Block $block Block instance. * * @return string Returns the categories list/dropdown markup. */ - function render_block_core_categories($attributes) + function render_block_core_categories($attributes, $content, $block) { } /** @@ -93862,8 +96644,6 @@ function register_block_core_image() * avoids unnecessary logic and filesystem lookups in the other function. * * @since 6.3.0 - * - * @global string $wp_version The WordPress version string. */ function register_core_block_style_handles() { @@ -93877,6 +96657,18 @@ function register_core_block_style_handles() function register_core_block_types_from_metadata() { } + /** + * Registers the core block metadata collection. + * + * This function is hooked into the 'init' action with a priority of 9, + * ensuring that the core block metadata is registered before the regular + * block initialization that happens at priority 10. + * + * @since 6.7.0 + */ + function wp_register_core_block_metadata_collection() + { + } /** * Get the post title. * @@ -95420,6 +98212,8 @@ function _sync_custom_logo_to_site_logo($value) * * @since 5.8.0 * + * @global array $_ignore_site_logo_changes + * * @param array $old_value Previous theme mod settings. * @param array $value Updated theme mod settings. * @phpstan-return void @@ -95431,6 +98225,8 @@ function _delete_site_logo_on_remove_custom_logo($old_value, $value) * Deletes the site logo when all theme mods are being removed. * * @since 5.8.0 + * + * @global array $_ignore_site_logo_changes * @phpstan-return void */ function _delete_site_logo_on_remove_theme_mods() @@ -95451,6 +98247,8 @@ function _delete_site_logo_on_remove_custom_logo_on_setup_theme() * Removes the custom_logo theme-mod when the site_logo option gets deleted. * * @since 5.9.0 + * + * @global array $_ignore_site_logo_changes */ function _delete_custom_logo_on_remove_site_logo() { @@ -96442,6 +99240,7 @@ function wp_redirect_admin_locations() * @since 5.7.0 Added the `create_app_password`, `list_app_passwords`, `read_app_password`, * `edit_app_password`, `delete_app_passwords`, `delete_app_password`, * and `update_https` capabilities. + * @since 6.7.0 Added the `edit_block_binding` capability. * * @global array $post_type_meta_caps Used to get post type meta capabilities. * @@ -96494,23 +99293,22 @@ function current_user_can($capability, ...$args) * capabilities such as `edit_post` and `edit_user` are capabilities used by the `map_meta_cap()` function to * map to primitive capabilities that a user or role has, such as `edit_posts` and `edit_others_posts`. * + * This function replaces the current_user_can_for_blog() function. + * * Example usage: * - * current_user_can_for_blog( $blog_id, 'edit_posts' ); - * current_user_can_for_blog( $blog_id, 'edit_post', $post->ID ); - * current_user_can_for_blog( $blog_id, 'edit_post_meta', $post->ID, $meta_key ); + * current_user_can_for_site( $site_id, 'edit_posts' ); + * current_user_can_for_site( $site_id, 'edit_post', $post->ID ); + * current_user_can_for_site( $site_id, 'edit_post_meta', $post->ID, $meta_key ); * - * @since 3.0.0 - * @since 5.3.0 Formalized the existing and already documented `...$args` parameter - * by adding it to the function signature. - * @since 5.8.0 Wraps current_user_can() after switching to blog. + * @since 6.7.0 * - * @param int $blog_id Site ID. + * @param int $site_id Site ID. * @param string $capability Capability name. * @param mixed ...$args Optional further parameters, typically starting with an object ID. * @return bool Whether the user has the given capability. */ - function current_user_can_for_blog($blog_id, $capability, ...$args) + function current_user_can_for_site($site_id, $capability, ...$args) { } /** @@ -96563,6 +99361,30 @@ function author_can($post, $capability, ...$args) function user_can($user, $capability, ...$args) { } + /** + * Returns whether a particular user has the specified capability for a given site. + * + * This function also accepts an ID of an object to check against if the capability is a meta capability. Meta + * capabilities such as `edit_post` and `edit_user` are capabilities used by the `map_meta_cap()` function to + * map to primitive capabilities that a user or role has, such as `edit_posts` and `edit_others_posts`. + * + * Example usage: + * + * user_can_for_site( $user->ID, $site_id, 'edit_posts' ); + * user_can_for_site( $user->ID, $site_id, 'edit_post', $post->ID ); + * user_can_for_site( $user->ID, $site_id, 'edit_post_meta', $post->ID, $meta_key ); + * + * @since 6.7.0 + * + * @param int|WP_User $user User ID or object. + * @param int $site_id Site ID. + * @param string $capability Capability name. + * @param mixed ...$args Optional further parameters, typically starting with an object ID. + * @return bool Whether the user has the given capability. + */ + function user_can_for_site($user, $site_id, $capability, ...$args) + { + } /** * Retrieves the global WP_Roles instance and instantiates it if necessary. * @@ -96921,7 +99743,6 @@ function category_description($category = 0) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -97663,9 +100484,9 @@ function _make_cat_compat(&$category) * WordPress autoloader for SimplePie. * * @since 3.5.0 + * @deprecated 6.7.0 Use `SimplePie_Autoloader` instead. * * @param string $class Class name. - * @phpstan-return void */ function wp_simplepie_autoload($class) { @@ -98416,19 +101237,23 @@ function comments_popup_link($zero = \false, $one = \false, $more = \false, $css * @param array $args { * Optional. Override default arguments. * - * @type string $add_below The first part of the selector used to identify the comment to respond below. - * The resulting value is passed as the first parameter to addComment.moveForm(), - * concatenated as $add_below-$comment->comment_ID. Default 'comment'. - * @type string $respond_id The selector identifying the responding comment. Passed as the third parameter - * to addComment.moveForm(), and appended to the link URL as a hash value. - * Default 'respond'. - * @type string $reply_text The text of the Reply link. Default 'Reply'. - * @type string $login_text The text of the link to reply if logged out. Default 'Log in to Reply'. - * @type int $max_depth The max depth of the comment tree. Default 0. - * @type int $depth The depth of the new comment. Must be greater than 0 and less than the value - * of the 'thread_comments_depth' option set in Settings > Discussion. Default 0. - * @type string $before The text or HTML to add before the reply link. Default empty. - * @type string $after The text or HTML to add after the reply link. Default empty. + * @type string $add_below The first part of the selector used to identify the comment to respond below. + * The resulting value is passed as the first parameter to addComment.moveForm(), + * concatenated as $add_below-$comment->comment_ID. Default 'comment'. + * @type string $respond_id The selector identifying the responding comment. Passed as the third parameter + * to addComment.moveForm(), and appended to the link URL as a hash value. + * Default 'respond'. + * @type string $reply_text The visible text of the Reply link. Default 'Reply'. + * @type string $reply_to_text The accessible name of the Reply link, using `%s` as a placeholder + * for the comment author's name. Default 'Reply to %s'. + * Should start with the visible `reply_text` value. + * @type bool $show_reply_to_text Whether to use `reply_to_text` as visible link text. Default false. + * @type string $login_text The text of the link to reply if logged out. Default 'Log in to Reply'. + * @type int $max_depth The max depth of the comment tree. Default 0. + * @type int $depth The depth of the new comment. Must be greater than 0 and less than the value + * of the 'thread_comments_depth' option set in Settings > Discussion. Default 0. + * @type string $before The text or HTML to add before the reply link. Default empty. + * @type string $after The text or HTML to add after the reply link. Default empty. * } * @param int|WP_Comment $comment Optional. Comment being replied to. Default current comment. * @param int|WP_Post $post Optional. Post ID or WP_Post object the comment is going to be displayed on. @@ -98438,6 +101263,8 @@ function comments_popup_link($zero = \false, $one = \false, $more = \false, $css * add_below?: string, * respond_id?: string, * reply_text?: string, + * reply_to_text?: string, + * show_reply_to_text?: bool, * login_text?: string, * max_depth?: int, * depth?: int, @@ -98582,15 +101409,15 @@ function comment_id_fields($post = \null) * * @global WP_Comment $comment Global comment object. * - * @param string|false $no_reply_text Optional. Text to display when not replying to a comment. - * Default false. - * @param string|false $reply_text Optional. Text to display when replying to a comment. - * Default false. Accepts "%s" for the author of the comment - * being replied to. - * @param bool $link_to_parent Optional. Boolean to control making the author's name a link - * to their comment. Default true. - * @param int|WP_Post|null $post Optional. The post that the comment form is being displayed for. - * Defaults to the current global post. + * @param string|false $no_reply_text Optional. Text to display when not replying to a comment. + * Default false. + * @param string|false $reply_text Optional. Text to display when replying to a comment. + * Default false. Accepts "%s" for the author of the comment + * being replied to. + * @param bool $link_to_parent Optional. Boolean to control making the author's name a link + * to their comment. Default true. + * @param int|WP_Post|null $post Optional. The post that the comment form is being displayed for. + * Defaults to the current global post. * @phpstan-return void */ function comment_form_title($no_reply_text = \false, $reply_text = \false, $link_to_parent = \true, $post = \null) @@ -99090,7 +101917,8 @@ function delete_comment_meta($comment_id, $meta_key, $meta_value = '') * @return mixed An array of values if `$single` is false. * The value of meta data field if `$single` is true. * False for an invalid `$comment_id` (non-numeric, zero, or negative value). - * An empty string if a valid but non-existing comment ID is passed. + * An empty array if a valid but non-existing comment ID is passed and `$single` is false. + * An empty string if a valid but non-existing comment ID is passed and `$single` is true. */ function get_comment_meta($comment_id, $key = '', $single = \false) { @@ -99295,6 +102123,20 @@ function wp_get_comment_fields_max_lengths() function wp_check_comment_data_max_lengths($comment_data) { } + /** + * Checks whether comment data passes internal checks or has disallowed content. + * + * @since 6.7.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $comment_data Array of arguments for inserting a comment. + * @return int|string|WP_Error The approval status on success (0|1|'spam'|'trash'), + * WP_Error otherwise. + */ + function wp_check_comment_data($comment_data) + { + } /** * Checks if a comment contains disallowed characters or words. * @@ -104069,6 +106911,60 @@ function wp_render_elements_support($block_content, $block) function wp_interactivity_process_directives_of_interactive_blocks(array $parsed_block) : array { } + /** + * Gets the global styles custom CSS from theme.json. + * + * @since 6.2.0 + * @deprecated 6.7.0 Use {@see 'wp_get_global_stylesheet'} instead. + * + * @return string The global styles custom CSS. + */ + function wp_get_global_styles_custom_css() + { + } + /** + * Enqueues the global styles custom css defined via theme.json. + * + * @since 6.2.0 + * @deprecated 6.7.0 Use {@see 'wp_enqueue_global_styles'} instead. + * @phpstan-return void + */ + function wp_enqueue_global_styles_custom_css() + { + } + /** + * Generate block style variation instance name. + * + * @since 6.6.0 + * @deprecated 6.7.0 Use `wp_unique_id( $variation . '--' )` instead. + * + * @access private + * + * @param array $block Block object. + * @param string $variation Slug for the block style variation. + * + * @return string The unique variation name. + */ + function wp_create_block_style_variation_instance_name($block, $variation) + { + } + /** + * Returns whether the current user has the specified capability for a given site. + * + * @since 3.0.0 + * @since 5.3.0 Formalized the existing and already documented `...$args` parameter + * by adding it to the function signature. + * @since 5.8.0 Wraps current_user_can() after switching to blog. + * @deprecated 6.7.0 Use current_user_can_for_site() instead. + * + * @param int $blog_id Site ID. + * @param string $capability Capability name. + * @param mixed ...$args Optional further parameters, typically starting with an object ID. + * @return bool Whether the user has the given capability. + */ + function current_user_can_for_blog($blog_id, $capability, ...$args) + { + } /** * Registers an embed handler. * @@ -105011,7 +107907,7 @@ function feed_content_type($type = '') * @param string|string[] $url URL of feed to retrieve. If an array of URLs, the feeds are merged * using SimplePie's multifeed feature. * See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas} - * @return SimplePie|WP_Error SimplePie object on success or WP_Error object on failure. + * @return SimplePie\SimplePie|WP_Error SimplePie object on success or WP_Error object on failure. */ function fetch_feed($url) { @@ -105071,6 +107967,16 @@ function fetch_feed($url) function wp_print_font_faces($fonts = array()) { } + /** + * Generates and prints font-face styles defined the the theme style variations. + * + * @since 6.7.0 + * + * @phpstan-return void + */ + function wp_print_font_faces_from_style_variations() + { + } /** * Registers a new font collection in the font library. * @@ -106401,6 +109307,7 @@ function wp_rel_ugc($text) * * @since 5.1.0 * @since 5.6.0 Removed 'noreferrer' relationship. + * @deprecated 6.7.0 * * @param string $text Content that may contain HTML A elements. * @return string Converted content. @@ -106415,6 +109322,7 @@ function wp_targeted_link_rel($text) * * @since 5.1.0 * @since 5.6.0 Removed 'noreferrer' relationship. + * @deprecated 6.7.0 * * @param array $matches Single match. * @return string HTML A Element with `rel="noopener"` in addition to any existing values. @@ -106426,6 +109334,7 @@ function wp_targeted_link_rel_callback($matches) * Adds all filters modifying the rel attribute of targeted links. * * @since 5.1.0 + * @deprecated 6.7.0 */ function wp_init_targeted_link_rel_filters() { @@ -106434,6 +109343,7 @@ function wp_init_targeted_link_rel_filters() * Removes all filters modifying the rel attribute of targeted links. * * @since 5.1.0 + * @deprecated 6.7.0 */ function wp_remove_targeted_link_rel_filters() { @@ -106577,7 +109487,7 @@ function sanitize_email($email) * Determines the difference between two timestamps. * * The difference is returned in a human-readable format such as "1 hour", - * "5 mins", "2 days". + * "5 minutes", "2 days". * * @since 1.5.0 * @since 5.3.0 Added support for showing a difference in seconds. @@ -106994,9 +109904,9 @@ function wp_html_excerpt($str, $count, $more = \null) * * @global string $_links_add_base * - * @param string $content String to search for links in. - * @param string $base The base URL to prefix to links. - * @param array $attrs The attributes which should be processed. + * @param string $content String to search for links in. + * @param string $base The base URL to prefix to links. + * @param string[] $attrs The attributes which should be processed. * @return string The processed content. */ function links_add_base_url($content, $base, $attrs = array('src', 'href')) @@ -107062,11 +109972,11 @@ function normalize_whitespace($str) { } /** - * Properly strips all HTML tags including script and style + * Properly strips all HTML tags including 'script' and 'style'. * * This differs from strip_tags() because it removes the contents of * the `' )` - * will return 'something'. wp_strip_all_tags will return '' + * will return 'something'. wp_strip_all_tags() will return an empty string. * * @since 2.9.0 * @@ -108572,6 +111482,7 @@ function wp_check_filetype_and_ext($file, $filename, $mimes = \null) * @since 4.7.1 * @since 5.8.0 Added support for WebP images. * @since 6.5.0 Added support for AVIF images. + * @since 6.7.0 Added support for HEIC images. * * @param string $file Full path to the file. * @return string|false The actual mime type or false if the type cannot be determined. @@ -109445,20 +112356,6 @@ function wp_ob_end_flush_all() function dead_db() { } - /** - * Converts a value to non-negative integer. - * - * @since 2.5.0 - * - * @param mixed $maybeint Data you wish to have converted to a non-negative integer. - * @return int A non-negative integer. - * @phpstan-template T of int - * @phpstan-param T|scalar|array|resource|null $maybeint - * @phpstan-return ($maybeint is T&int<0, max> ? T : ($maybeint is int ? int<1, max> : ($maybeint is empty ? 0 : ($maybeint is numeric-string ? int<0, max> : ($maybeint is string ? 0 : ($maybeint is true|non-empty-array ? 1 : ($maybeint is bool ? 0|1 : int<0, max>))))))) - */ - function absint($maybeint) - { - } /** * Marks a function as deprecated and inform when it has been used. * @@ -110326,8 +113223,10 @@ function wp_validate_boolean($value) * Deletes a file. * * @since 4.2.0 + * @since 6.7.0 A return value was added. * * @param string $file The path to the file to delete. + * @return bool True on success, false on failure. */ function wp_delete_file($file) { @@ -110744,12 +113643,26 @@ function recurse_dirsize($directory, $exclude = \null, $max_execution_time = \nu function clean_dirsize_cache($path) { } + /** + * Returns the current WordPress version. + * + * Returns an unmodified value of `$wp_version`. Some plugins modify the global + * in an attempt to improve security through obscurity. This practice can cause + * errors in WordPress, so the ability to get an unmodified version is needed. + * + * @since 6.7.0 + * + * @return string The current WordPress version. + */ + function wp_get_wp_version() + { + } /** * Checks compatibility with the current WordPress version. * * @since 5.2.0 * - * @global string $wp_version The WordPress version string. + * @global string $_wp_tests_wp_version The WordPress version string. Used only in Core tests. * * @param string $required Minimum required WordPress version. * @return bool True if required version is compatible or empty, false if not. @@ -110844,6 +113757,17 @@ function wp_get_admin_notice($message, $args = array()) function wp_admin_notice($message, $args = array()) { } + /** + * Checks if a mime type is for a HEIC/HEIF image. + * + * @since 6.7.0 + * + * @param string $mime_type The mime type to check. + * @return bool Whether the mime type is for a HEIC/HEIF image. + */ + function wp_is_heic_image_mime_type($mime_type) + { + } /** * Initializes $wp_scripts if it has not been set. * @@ -111695,7 +114619,6 @@ function wp_get_document_title() /** * Displays title tag with content. * - * @ignore * @since 4.1.0 * @since 4.4.0 Improved title output replaced `wp_title()`. * @access private @@ -113067,20 +115990,11 @@ function wp_get_global_styles($path = array(), $context = array()) function wp_get_global_stylesheet($types = array()) { } - /** - * Gets the global styles custom CSS from theme.json. - * - * @since 6.2.0 - * - * @return string The global styles custom CSS. - */ - function wp_get_global_styles_custom_css() - { - } /** * Adds global style rules to the inline style for each block. * * @since 6.1.0 + * @since 6.7.0 Resolve relative paths in block styles. * * @global WP_Styles $wp_styles */ @@ -113195,6 +116109,7 @@ function _wp_http_get_object() * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113238,6 +116153,7 @@ function wp_safe_remote_request($url, $args = array()) * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113281,6 +116197,7 @@ function wp_safe_remote_get($url, $args = array()) * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113324,6 +116241,7 @@ function wp_safe_remote_post($url, $args = array()) * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113364,30 +116282,8 @@ function wp_safe_remote_head($url, $args = array()) * @param string $url URL to retrieve. * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. - * @return array|WP_Error { - * The response array or a WP_Error on failure. - * - * @type string[] $headers Array of response headers keyed by their name. - * @type string $body Response body. - * @type array $response { - * Data about the HTTP response. - * - * @type int|false $code HTTP response code. - * @type string|false $message HTTP response message. - * } - * @type WP_HTTP_Cookie[] $cookies Array of response cookies. - * @type WP_HTTP_Requests_Response|null $http_response Raw HTTP response object. - * } - * @phpstan-return \WP_Error|array{ - * headers: string[], - * body: string, - * response: array{ - * code: int|false, - * message: string|false, - * }, - * cookies: WP_HTTP_Cookie[], - * http_response: WP_HTTP_Requests_Response|null, - * } + * @return array|WP_Error The response array or a WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113424,6 +116320,7 @@ function wp_remote_request($url, $args = array()) * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113460,6 +116357,7 @@ function wp_remote_get($url, $args = array()) * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113496,6 +116394,7 @@ function wp_remote_post($url, $args = array()) * @param array $args Optional. Request arguments. Default empty array. * See WP_Http::request() for information on accepted arguments. * @return array|WP_Error The response or WP_Error on failure. + * See WP_Http::request() for information on return value. * @phpstan-param array{ * method?: string, * timeout?: float, @@ -113692,7 +116591,7 @@ function send_origin_headers() * - ftp://example.com/caniload.php - Invalid protocol - only http and https are allowed. * - http:///example.com/caniload.php - Malformed URL. * - http://user:pass@example.com/caniload.php - Login information. - * - http://exampleeeee.com/caniload.php - Invalid hostname, as the IP cannot be looked up in DNS. + * - http://example.invalid/caniload.php - Invalid hostname, as the IP cannot be looked up in DNS. * * Examples of URLs that are considered unsafe by default: * @@ -113744,12 +116643,8 @@ function ms_allowed_http_request_hosts($is_external, $host) * A wrapper for PHP's parse_url() function that handles consistency in the return values * across PHP versions. * - * PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute URLs, including - * schemeless and relative URLs with "://" in the path. This function works around - * those limitations providing a standard output on PHP 5.2~5.4+. - * - * Secondly, across various PHP versions, schemeless URLs containing a ":" in the query - * are being handled inconsistently. This function works around those differences as well. + * Across various PHP versions, schemeless URLs containing a ":" in the query + * are being handled inconsistently. This function works around those differences. * * @since 4.4.0 * @since 4.7.0 The `$component` parameter was added for parity with PHP's `parse_url()`. @@ -114046,6 +116941,18 @@ function wp_interactivity_data_wp_context(array $context, string $store_namespac function wp_interactivity_get_context(?string $store_namespace = \null) : array { } + /** + * Returns an array representation of the current element being processed. + * + * The function should be used only during directive processing. + * + * @since 6.7.0 + * + * @return array{attributes: array}|null Current element. + */ + function wp_interactivity_get_element() : ?array + { + } function get_file($path) { } @@ -115275,6 +118182,7 @@ function load_default_textdomain($locale = \null) * * @since 1.5.0 * @since 4.6.0 The function now tries to load the .mo file from the languages directory first. + * @since 6.7.0 Translations are no longer immediately loaded, but handed off to the just-in-time loading mechanism. * * @param string $domain Unique identifier for retrieving translated strings * @param string|false $deprecated Optional. Deprecated. Use the $plugin_rel_path parameter instead. @@ -115291,6 +118199,7 @@ function load_plugin_textdomain($domain, $deprecated = \false, $plugin_rel_path * * @since 3.0.0 * @since 4.6.0 The function now tries to load the .mo file from the languages directory first. + * @since 6.7.0 Translations are no longer immediately loaded, but handed off to the just-in-time loading mechanism. * * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry. * @@ -115312,6 +118221,7 @@ function load_muplugin_textdomain($domain, $mu_plugin_rel_path = '') * * @since 1.5.0 * @since 4.6.0 The function now tries to load the .mo file from the languages directory first. + * @since 6.7.0 Translations are no longer immediately loaded, but handed off to the just-in-time loading mechanism. * * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry. * @@ -115666,6 +118576,19 @@ function wp_get_list_item_separator() function wp_get_word_count_type() { } + /** + * Returns a boolean to indicate whether a translation exists for a given string with optional text domain and locale. + * + * @since 6.7.0 + * + * @param string $singular Singular translation to check. + * @param string $textdomain Optional. Text domain. Default 'default'. + * @param ?string $locale Optional. Locale. Default current locale. + * @return bool True if the translation exists, false otherwise. + */ + function has_translation(string $singular, string $textdomain = 'default', ?string $locale = \null) : bool + { + } /** * Displays the permalink for the current post. * @@ -116184,11 +119107,15 @@ function get_delete_post_link($post = 0, $deprecated = '', $force_delete = \fals * Retrieves the edit comment link. * * @since 2.3.0 + * @since 6.7.0 The $context parameter was added. * * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object. - * @return string|void The edit comment link URL for the given comment. + * @param string $context Optional. Context in which the URL should be used. Either 'display', + * to include HTML entities, or 'url'. Default 'display'. + * @return string|void The edit comment link URL for the given comment, or void if the comment id does not exist or + * the current user is not allowed to edit it. */ - function get_edit_comment_link($comment_id = 0) + function get_edit_comment_link($comment_id = 0, $context = 'display') { } /** @@ -116792,8 +119719,8 @@ function the_posts_navigation($args = array()) * Optional. Default pagination arguments, see paginate_links(). * * @type string $screen_reader_text Screen reader text for navigation element. - * Default 'Posts navigation'. - * @type string $aria_label ARIA label text for the nav element. Default 'Posts'. + * Default 'Posts pagination'. + * @type string $aria_label ARIA label text for the nav element. Default 'Posts pagination'. * @type string $class Custom class for the nav element. Default 'pagination'. * } * @return string Markup for pagination links. @@ -116891,14 +119818,16 @@ function get_comments_pagenum_link($pagenum = 1, $max_page = 0) * Retrieves the link to the next comments page. * * @since 2.7.1 + * @since 6.7.0 Added the `page` parameter. * * @global WP_Query $wp_query WordPress Query object. * - * @param string $label Optional. Label for link text. Default empty. - * @param int $max_page Optional. Max page. Default 0. + * @param string $label Optional. Label for link text. Default empty. + * @param int $max_page Optional. Max page. Default 0. + * @param int|null $page Optional. Page number. Default null. * @return string|void HTML-formatted link for the next page of comments. */ - function get_next_comments_link($label = '', $max_page = 0) + function get_next_comments_link($label = '', $max_page = 0, $page = \null) { } /** @@ -116916,11 +119845,13 @@ function next_comments_link($label = '', $max_page = 0) * Retrieves the link to the previous comments page. * * @since 2.7.1 + * @since 6.7.0 Added the `page` parameter. * - * @param string $label Optional. Label for comments link text. Default empty. + * @param string $label Optional. Label for comments link text. Default empty. + * @param int|null $page Optional. Page number. Default null. * @return string|void HTML-formatted link for the previous page of comments. */ - function get_previous_comments_link($label = '') + function get_previous_comments_link($label = '', $page = \null) { } /** @@ -117027,8 +119958,8 @@ function the_comments_navigation($args = array()) * @param array $args { * Optional. Default pagination arguments. * - * @type string $screen_reader_text Screen reader text for the nav element. Default 'Comments navigation'. - * @type string $aria_label ARIA label text for the nav element. Default 'Comments'. + * @type string $screen_reader_text Screen reader text for the nav element. Default 'Comments pagination'. + * @type string $aria_label ARIA label text for the nav element. Default 'Comments pagination'. * @type string $class Custom class for the nav element. Default 'comments-pagination'. * } * @return string Markup for pagination links. @@ -117470,6 +120401,7 @@ function is_avatar_comment_type($comment_type) * Retrieves default data about the avatar. * * @since 4.2.0 + * @since 6.7.0 Gravatar URLs always use HTTPS. * * @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, * user email, WP_User object, WP_Post object, or WP_Comment object. @@ -117500,6 +120432,9 @@ function is_avatar_comment_type($comment_type) * - 'X' (even more mature than above) * Default is the value of the 'avatar_rating' option. * @type string $scheme URL scheme to use. See set_url_scheme() for accepted values. + * For Gravatars this setting is ignored and HTTPS is used to avoid + * unnecessary redirects. The setting is retained for systems using + * the {@see 'pre_get_avatar_data'} filter to customize avatars. * Default null. * @type array $processed_args When the function returns, the value will be the processed/sanitized $args * plus a "found_avatar" guess. Pass as a reference. Default null. @@ -117798,8 +120733,6 @@ function wp_is_maintenance_mode() /** * Gets the time elapsed so far during this PHP script. * - * Uses REQUEST_TIME_FLOAT that appeared in PHP 5.4.0. - * * @since 5.8.0 * * @return float Seconds since the PHP script started. @@ -118206,6 +121139,20 @@ function is_user_admin() function is_multisite() { } + /** + * Converts a value to non-negative integer. + * + * @since 2.5.0 + * + * @param mixed $maybeint Data you wish to have converted to a non-negative integer. + * @return int A non-negative integer. + * @phpstan-template T of int + * @phpstan-param T|scalar|array|resource|null $maybeint + * @phpstan-return ($maybeint is T&int<0, max> ? T : ($maybeint is int ? int<1, max> : ($maybeint is empty ? 0 : ($maybeint is numeric-string ? int<0, max> : ($maybeint is string ? 0 : ($maybeint is true|non-empty-array ? 1 : ($maybeint is bool ? 0|1 : int<0, max>))))))) + */ + function absint($maybeint) + { + } /** * Retrieves the current site ID. * @@ -119129,6 +122076,30 @@ function wp_lazy_loading_enabled($tag_name, $context) function wp_filter_content_tags($content, $context = \null) { } + /** + * Adds 'auto' to the sizes attribute to the image, if the image is lazy loaded and does not already include it. + * + * @since 6.7.0 + * + * @param string $image The image tag markup being filtered. + * @return string The filtered image tag markup. + */ + function wp_img_tag_add_auto_sizes(string $image) : string + { + } + /** + * Checks whether the given 'sizes' attribute includes the 'auto' keyword as the first item in the list. + * + * Per the HTML spec, if present it must be the first entry. + * + * @since 6.7.0 + * + * @param string $sizes_attr The 'sizes' attribute value. + * @return bool True if the 'auto' keyword is present, false otherwise. + */ + function wp_sizes_attribute_includes_valid_auto(string $sizes_attr) : bool + { + } /** * Adds optimization attributes to an `img` HTML tag. * @@ -120056,6 +123027,8 @@ function _wp_add_additional_image_sizes() * Callback to enable showing of the user error when uploading .heic images. * * @since 5.5.0 + * @since 6.7.0 The default behavior is to enable heic uploads as long as the server + * supports the format. The uploads are converted to JPEG's by default. * * @param array[] $plupload_settings The settings for Plupload.js. * @return array[] Modified settings for Plupload.js. @@ -120202,6 +123175,19 @@ function wp_maybe_add_fetchpriority_high_attr($loading_attrs, $tag_name, $attr) function wp_high_priority_element_flag($value = \null) { } + /** + * Determines the output format for the image editor. + * + * @since 6.7.0 + * @access private + * + * @param string $filename Path to the image. + * @param string $mime_type The source image mime type. + * @return string[] An array of mime type mappings. + */ + function wp_get_image_editor_output_format($filename, $mime_type) + { + } /** * Adds metadata for the specified object. * @@ -120298,7 +123284,8 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d * The value of the meta field if `$single` is true. * False for an invalid `$object_id` (non-numeric, zero, or negative value), * or if `$meta_type` is not specified. - * An empty string if a valid but non-existing object ID is passed. + * An empty array if a valid but non-existing object ID is passed and `$single` is false. + * An empty string if a valid but non-existing object ID is passed and `$single` is true. */ function get_metadata($meta_type, $object_id, $meta_key = '', $single = \false) { @@ -120539,6 +123526,7 @@ function sanitize_meta($meta_key, $meta_value, $object_type, $object_subtype = ' * @since 5.3.0 Valid meta types expanded to include "array" and "object". * @since 5.5.0 The `$default` argument was added to the arguments array. * @since 6.4.0 The `$revisions_enabled` argument was added to the arguments array. + * @since 6.7.0 The `label` argument was added to the arguments array. * * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', * or any other object type with an associated meta table. @@ -120550,6 +123538,7 @@ function sanitize_meta($meta_key, $meta_value, $object_type, $object_subtype = ' * the meta key will be registered on the entire object type. Default empty. * @type string $type The type of data associated with this meta key. * Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'. + * @type string $label A human-readable label of the data attached to this meta key. * @type string $description A description of the data attached to this meta key. * @type bool $single Whether the meta key has one value per object, or an array of values per object. * @type mixed $default The default value returned from get_metadata() if no value has been set yet. @@ -120574,6 +123563,7 @@ function sanitize_meta($meta_key, $meta_value, $object_type, $object_subtype = ' * @phpstan-param array{ * object_subtype?: string, * type?: string, + * label?: string, * description?: string, * single?: bool, * default?: mixed, @@ -122856,8 +125846,8 @@ function update_sitemeta_cache($site_ids) * * @param string|array $args Optional. Array or string of arguments. See WP_Site_Query::__construct() * for information on accepted arguments. Default empty array. - * @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', - * or the number of sites when 'count' is passed as a query var. + * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', + * or the number of sites when 'count' is passed as a query var. * @phpstan-param array{ * site__in?: int[], * site__not_in?: int[], @@ -123124,7 +126114,8 @@ function delete_site_meta($site_id, $meta_key, $meta_value = '') * @return mixed An array of values if `$single` is false. * The value of meta data field if `$single` is true. * False for an invalid `$site_id` (non-numeric, zero, or negative value). - * An empty string if a valid but non-existing site ID is passed. + * An empty array if a valid but non-existing site ID is passed and `$single` is false. + * An empty string if a valid but non-existing site ID is passed and `$single` is true. */ function get_site_meta($site_id, $key = '', $single = \false) { @@ -123871,12 +126862,13 @@ function get_options($options) * by the plugin which are generally autoloaded can be set to not autoload when the plugin is inactive. * * @since 6.4.0 + * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @global wpdb $wpdb WordPress database abstraction object. * * @param array $options Associative array of option names and their autoload values to set. The option names are - * expected to not be SQL-escaped. The autoload values accept 'yes'|true to enable or 'no'|false - * to disable. + * expected to not be SQL-escaped. The autoload values should be boolean values. For backward + * compatibility 'yes' and 'no' are also accepted, though using these values is deprecated. * @return array Associative array of all provided $options as keys and boolean values for whether their autoload value * was updated. */ @@ -123890,12 +126882,14 @@ function wp_set_option_autoload_values(array $options) * each option at once. * * @since 6.4.0 + * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @see wp_set_option_autoload_values() * - * @param string[] $options List of option names. Expected to not be SQL-escaped. - * @param string|bool $autoload Autoload value to control whether to load the options when WordPress starts up. - * Accepts 'yes'|true to enable or 'no'|false to disable. + * @param string[] $options List of option names. Expected to not be SQL-escaped. + * @param bool $autoload Autoload value to control whether to load the options when WordPress starts up. + * For backward compatibility 'yes' and 'no' are also accepted, though using these values is + * deprecated. * @return array Associative array of all provided $options as keys and boolean values for whether their autoload value * was updated. */ @@ -123909,12 +126903,14 @@ function wp_set_options_autoload(array $options, $autoload) * multiple options at once. * * @since 6.4.0 + * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @see wp_set_option_autoload_values() * - * @param string $option Name of the option. Expected to not be SQL-escaped. - * @param string|bool $autoload Autoload value to control whether to load the option when WordPress starts up. - * Accepts 'yes'|true to enable or 'no'|false to disable. + * @param string $option Name of the option. Expected to not be SQL-escaped. + * @param bool $autoload Autoload value to control whether to load the option when WordPress starts up. + * For backward compatibility 'yes' and 'no' are also accepted, though using these values is + * deprecated. * @return bool True if the autoload value was modified, false otherwise. */ function wp_set_option_autoload($option, $autoload) @@ -124018,17 +127014,19 @@ function wp_load_core_site_options($network_id = \null) * * @since 1.0.0 * @since 4.2.0 The `$autoload` parameter was added. + * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $option Name of the option to update. Expected to not be SQL-escaped. * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. - * Accepts a boolean, or `null` to stick with the initial value or, if no initial value is set, - * to leave the decision up to default heuristics in WordPress. - * For existing options, - * `$autoload` can only be updated using `update_option()` if `$value` is also changed. - * For backward compatibility 'yes' and 'no' are also accepted. + * Accepts a boolean, or `null` to stick with the initial value or, if no initial value is + * set, to leave the decision up to default heuristics in WordPress. + * For existing options, `$autoload` can only be updated using `update_option()` if `$value` + * is also changed. + * For backward compatibility 'yes' and 'no' are also accepted, though using these values is + * deprecated. * Autoloading too many options can lead to performance problems, especially if the * options are not frequently used. For options which are accessed across several places * in the frontend, it is recommended to autoload them, by using true. @@ -124055,6 +127053,7 @@ function update_option($option, $value, $autoload = \null) * * @since 1.0.0 * @since 6.6.0 The $autoload parameter's default value was changed to null. + * @since 6.7.0 The autoload values 'yes' and 'no' are deprecated. * * @global wpdb $wpdb WordPress database abstraction object. * @@ -124063,11 +127062,12 @@ function update_option($option, $value, $autoload = \null) * Expected to not be SQL-escaped. * @param string $deprecated Optional. Description. Not used anymore. * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. - * Accepts a boolean, or `null` to leave the decision up to default heuristics in WordPress. - * For backward compatibility 'yes' and 'no' are also accepted. + * Accepts a boolean, or `null` to leave the decision up to default heuristics in + * WordPress. For backward compatibility 'yes' and 'no' are also accepted, though using + * these values is deprecated. * Autoloading too many options can lead to performance problems, especially if the * options are not frequently used. For options which are accessed across several places - * in the frontend, it is recommended to autoload them, by using 'yes'|true. + * in the frontend, it is recommended to autoload them, by using true. * For options which are accessed only on few specific URLs, it is recommended * to not autoload them, by using false. * Default is null, which means WordPress will determine the autoload value. @@ -125247,10 +128247,10 @@ function wp_hash($data, $scheme = 'auth') { } /** - * Creates a hash (encrypt) of a plain text password. + * Creates a hash of a plain text password. * * For integration with other applications, this function can be overwritten to - * instead use the other package password checking algorithm. + * instead use the other package password hashing algorithm. * * @since 2.5.0 * @@ -125263,7 +128263,7 @@ function wp_hash_password($password) { } /** - * Checks the plaintext password against the encrypted Password. + * Checks a plaintext password against a hashed password. * * Maintains compatibility between old version and the new cookie authentication * protocol using PHPass library. The $hash parameter is the encrypted password @@ -125271,7 +128271,7 @@ function wp_hash_password($password) * against the already encrypted password to see if they match. * * For integration with other applications, this function can be overwritten to - * instead use the other package password checking algorithm. + * instead use the other package password hashing algorithm. * * @since 2.5.0 * @@ -125324,7 +128324,7 @@ function wp_rand($min = \null, $max = \null) { } /** - * Updates the user's password with a new encrypted one. + * Updates the user's password with a new hashed one. * * For integration with other applications, this function can be overwritten to * instead use the other package password checking algorithm. @@ -127880,7 +130880,7 @@ function _post_type_meta_capabilities($capabilities = \null) * - `name` - General name for the post type, usually plural. The same and overridden * by `$post_type_object->label`. Default is 'Posts' / 'Pages'. * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'. - * - `add_new` - Label for adding a new item. Default is 'Add New Post' / 'Add New Page'. + * - `add_new` - Label for adding a new item. Default is 'Add New' / 'Add New'. * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'. * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'. * - `new_item` - Label for the new item page title. Default is 'New Post' / 'New Page'. @@ -127942,6 +130942,8 @@ function _post_type_meta_capabilities($capabilities = \null) * @since 6.4.0 Changed default values for the `add_new` label to include the type of content. * This matches `add_new_item` and provides more context for better accessibility. * @since 6.6.0 Added the `template_name` label. + * @since 6.7.0 Restored pre-6.4.0 defaults for the `add_new` label and updated documentation. + * Updated core usage to reference `add_new_item`. * * @access private * @@ -128302,7 +131304,8 @@ function delete_post_meta($post_id, $meta_key, $meta_value = '') * @return mixed An array of values if `$single` is false. * The value of the meta field if `$single` is true. * False for an invalid `$post_id` (non-numeric, zero, or negative value). - * An empty string if a valid but non-existing post ID is passed. + * An empty array if a valid but non-existing post ID is passed and `$single` is false. + * An empty string if a valid but non-existing post ID is passed and `$single` is true. */ function get_post_meta($post_id, $key = '', $single = \false) { @@ -128357,6 +131360,7 @@ function delete_post_meta_by_key($post_meta_key) * @phpstan-param array{ * object_subtype?: string, * type?: string, + * label?: string, * description?: string, * single?: bool, * default?: mixed, @@ -128735,7 +131739,6 @@ function wp_untrash_post_comments($post = \null) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -128791,7 +131794,6 @@ function wp_get_post_categories($post_id = 0, $args = array()) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -128849,7 +131851,6 @@ function wp_get_post_tags($post_id = 0, $args = array()) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -129997,7 +132998,10 @@ function wp_check_post_hierarchy_for_loops($post_parent, $post_id) * * @param int|WP_Post $post Post ID or post object where thumbnail should be attached. * @param int $thumbnail_id Thumbnail to attach. - * @return int|bool True on success, false on failure. + * @return int|bool Post meta ID if the key didn't exist (ie. this is the first time that + * a thumbnail has been saved for the post), true on successful update, + * false on failure or if the value passed is the same as the one that + * is already in the database. */ function set_post_thumbnail($post, $thumbnail_id) { @@ -131480,6 +134484,9 @@ function rest_get_avatar_sizes() /** * Parses an RFC3339 time into a Unix timestamp. * + * Explicitly check for `false` to detect failure, as zero is a valid return + * value on success. + * * @since 4.4.0 * * @param string $date RFC3339 timestamp. @@ -132488,7 +135495,7 @@ function _wp_upgrade_revisions_of_post($post, $revisions) * @param mixed $value Meta value to filter. * @param int $object_id Object ID. * @param string $meta_key Meta key to filter a value for. - * @param bool $single Whether to return a single value. Default false. + * @param bool $single Whether to return a single value. * @return mixed Original meta value if the meta key isn't revisioned, the object doesn't exist, * the post type is a revision or the post ID doesn't match the object ID. * Otherwise, the revisioned meta value is returned for the preview. @@ -132596,7 +135603,7 @@ function remove_permastruct($name) * * @global WP_Rewrite $wp_rewrite WordPress rewrite component. * - * @param string $feedname Feed name. + * @param string $feedname Feed name. Should not start with '_'. * @param callable $callback Callback to run on feed display. * @return string Feed action name. */ @@ -133239,15 +136246,6 @@ function wp_filter_out_block_nodes($nodes) function wp_enqueue_global_styles() { } - /** - * Enqueues the global styles custom css defined via theme.json. - * - * @since 6.2.0 - * @phpstan-return void - */ - function wp_enqueue_global_styles_custom_css() - { - } /** * Checks if the editor scripts and styles for all registered block types * should be enqueued on the current screen. @@ -133682,6 +136680,14 @@ function wp_dequeue_script_module(string $id) function wp_deregister_script_module(string $id) { } + /** + * Registers all the default WordPress Script Modules. + * + * @since 6.7.0 + */ + function wp_default_script_modules() + { + } /** * Adds a new shortcode. * @@ -134866,7 +137872,6 @@ function get_term_to_edit($id, $taxonomy) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -134940,7 +137945,8 @@ function delete_term_meta($term_id, $meta_key, $meta_value = '') * @return mixed An array of values if `$single` is false. * The value of the meta field if `$single` is true. * False for an invalid `$term_id` (non-numeric, zero, or negative value). - * An empty string if a valid but non-existing term ID is passed. + * An empty array if a valid but non-existing term ID is passed and `$single` is false. + * An empty string if a valid but non-existing term ID is passed and `$single` is true. */ function get_term_meta($term_id, $key = '', $single = \false) { @@ -135020,6 +138026,7 @@ function has_term_meta($term_id) * @phpstan-param array{ * object_subtype?: string, * type?: string, + * label?: string, * description?: string, * single?: bool, * default?: mixed, @@ -135170,7 +138177,6 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -135290,7 +138296,6 @@ function wp_delete_category($cat_id) * number?: int|string, * offset?: int, * fields?: string, - * count?: bool, * name?: string|string[], * slug?: string|string[], * term_taxonomy_id?: int|int[], @@ -138111,8 +141116,7 @@ function wp_delete_all_temp_backups() * @access private * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. - * - * @return void|WP_Error Void on success, or a WP_Error object on failure. + * @phpstan-return void */ function _wp_delete_all_temp_backups() { @@ -138364,6 +141368,18 @@ function update_user_option($user_id, $option_name, $newvalue, $is_global = \fal function delete_user_option($user_id, $option_name, $is_global = \false) { } + /** + * Retrieves user info by user ID. + * + * @since 6.7.0 + * + * @param int $user_id User ID. + * + * @return WP_User|false WP_User object on success, false on failure. + */ + function get_user($user_id) + { + } /** * Retrieves list of users matching criteria. * @@ -138544,7 +141560,8 @@ function delete_user_meta($user_id, $meta_key, $meta_value = '') * @return mixed An array of values if `$single` is false. * The value of meta data field if `$single` is true. * False for an invalid `$user_id` (non-numeric, zero, or negative value). - * An empty string if a valid but non-existing user ID is passed. + * An empty array if a valid but non-existing user ID is passed and `$single` is false. + * An empty string if a valid but non-existing user ID is passed and `$single` is true. */ function get_user_meta($user_id, $key = '', $single = \false) { @@ -138690,12 +141707,10 @@ function setup_userdata($for_user_id = 0) /** * Creates dropdown HTML content of users. * - * The content can either be displayed, which it is by default or retrieved by - * setting the 'echo' argument. The 'include' and 'exclude' arguments do not - * need to be used; all users will be displayed in that case. Only one can be - * used, either 'include' or 'exclude', but not both. - * - * The available arguments are as follows: + * The content can either be displayed, which it is by default, or retrieved by + * setting the 'echo' argument to false. The 'include' and 'exclude' arguments + * are optional; if they are not specified, all users will be displayed. Only one + * can be used in a single call, either 'include' or 'exclude', but not both. * * @since 2.3.0 * @since 4.5.0 Added the 'display_name_with_login' value for 'show'.