Docs: Update various class @var tags to indicate nullability.
This updates various `@var` tags on class properties to correctly indicate that the props may be `null` or unset: * `WP_Dependencies::$all_queued_deps` is nullable by both `::enqueue()` and `::dequeue`. Also, the types of the keys and values are specified. * `WP_Duotone::$global_styles_presets` and `::$global_styles_block_names` start off unset and are only initialized by static classes. * `WP_Query::init()` and `WP_Rewrite::init()` are public methods that `unset()`s many class props. * `WP_Theme::cache_delete()` sets many props to `null`. Developed in https://github.com/WordPress/wordpress-develop/pull/8953 Props justlevine, westonruter. See #64238, #64224. Built from https://develop.svn.wordpress.org/trunk@61299 git-svn-id: http://core.svn.wordpress.org/trunk@60611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -91,7 +91,7 @@ class WP_Dependencies {
|
||||
*
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @var array
|
||||
* @var ?array<string, true>
|
||||
*/
|
||||
private $all_queued_deps;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class WP_Duotone {
|
||||
*
|
||||
* @since 6.3.0
|
||||
*
|
||||
* @var array
|
||||
* @var ?array
|
||||
*/
|
||||
private static $global_styles_block_names;
|
||||
|
||||
@@ -76,7 +76,7 @@ class WP_Duotone {
|
||||
*
|
||||
* @since 6.3.0
|
||||
*
|
||||
* @var array
|
||||
* @var ?array
|
||||
*/
|
||||
private static $global_styles_presets;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class WP_Query {
|
||||
* Query vars set by the user.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var array
|
||||
* @var ?array
|
||||
*/
|
||||
public $query;
|
||||
|
||||
@@ -72,7 +72,7 @@ class WP_Query {
|
||||
* The ID of the queried object.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var int
|
||||
* @var ?int
|
||||
*/
|
||||
public $queried_object_id;
|
||||
|
||||
@@ -80,7 +80,7 @@ class WP_Query {
|
||||
* SQL for the database query.
|
||||
*
|
||||
* @since 2.0.1
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $request;
|
||||
|
||||
@@ -88,7 +88,7 @@ class WP_Query {
|
||||
* Array of post objects or post IDs.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var WP_Post[]|int[]
|
||||
* @var WP_Post[]|int[]|null
|
||||
*/
|
||||
public $posts;
|
||||
|
||||
@@ -139,7 +139,7 @@ class WP_Query {
|
||||
* The list of comments for current post.
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @var WP_Comment[]
|
||||
* @var ?WP_Comment[]
|
||||
*/
|
||||
public $comments;
|
||||
|
||||
@@ -163,7 +163,7 @@ class WP_Query {
|
||||
* Current comment object.
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @var WP_Comment
|
||||
* @var ?WP_Comment
|
||||
*/
|
||||
public $comment;
|
||||
|
||||
@@ -466,7 +466,7 @@ class WP_Query {
|
||||
* Cached list of search stopwords.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @var array
|
||||
* @var ?array
|
||||
*/
|
||||
private $stopwords;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class WP_Rewrite {
|
||||
* Permalink structure for author archives.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $author_structure;
|
||||
|
||||
@@ -60,7 +60,7 @@ class WP_Rewrite {
|
||||
* Permalink structure for date archives.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $date_structure;
|
||||
|
||||
@@ -68,7 +68,7 @@ class WP_Rewrite {
|
||||
* Permalink structure for pages.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $page_structure;
|
||||
|
||||
@@ -84,7 +84,7 @@ class WP_Rewrite {
|
||||
* Permalink structure for searches.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $search_structure;
|
||||
|
||||
@@ -124,7 +124,7 @@ class WP_Rewrite {
|
||||
* Comments feed permalink structure.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $comment_feed_structure;
|
||||
|
||||
@@ -132,7 +132,7 @@ class WP_Rewrite {
|
||||
* Feed request permalink structure.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
public $feed_structure;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Header data from the theme's style.css file after being sanitized.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var array
|
||||
* @var ?array
|
||||
*/
|
||||
private $headers_sanitized;
|
||||
|
||||
@@ -122,7 +122,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Is this theme a block theme.
|
||||
*
|
||||
* @since 6.2.0
|
||||
* @var bool
|
||||
* @var ?bool
|
||||
*/
|
||||
private $block_theme;
|
||||
|
||||
@@ -132,7 +132,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Cached due to sorting functions running over the translated name.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
private $name_translated;
|
||||
|
||||
@@ -140,7 +140,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Errors encountered when initializing the theme.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var WP_Error
|
||||
* @var ?WP_Error
|
||||
*/
|
||||
private $errors;
|
||||
|
||||
@@ -162,7 +162,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Otherwise, 'template' is the same as 'stylesheet'.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
private $template;
|
||||
|
||||
@@ -170,7 +170,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* A reference to the parent theme, in the case of a child theme.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var WP_Theme
|
||||
* @var ?WP_Theme
|
||||
*/
|
||||
private $parent;
|
||||
|
||||
@@ -178,7 +178,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* URL to the theme root, usually an absolute URL to wp-content/themes
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
private $theme_root_uri;
|
||||
|
||||
@@ -186,7 +186,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Flag for whether the theme's textdomain is loaded.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @var bool
|
||||
* @var ?bool
|
||||
*/
|
||||
private $textdomain_loaded;
|
||||
|
||||
@@ -202,7 +202,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* Block template folders.
|
||||
*
|
||||
* @since 6.4.0
|
||||
* @var string[]
|
||||
* @var ?string[]
|
||||
*/
|
||||
private $block_template_folders;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61298';
|
||||
$wp_version = '7.0-alpha-61299';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user