From a68e793c37d1649654bff411cb39cecec8aa7a09 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:51:38 +0100 Subject: [PATCH 01/14] Add get_objects_in_term() to functions map --- functionMap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/functionMap.php b/functionMap.php index 1434603b..221e6a7b 100644 --- a/functionMap.php +++ b/functionMap.php @@ -13,6 +13,7 @@ return [ 'add_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"', 'priority'=>'"high"|"core"|"default"|"low"'], 'addslashes_gpc' => ['T', '@phpstan-template'=>'T', 'gpc'=>'T'], + 'get_objects_in_term' => ['string[]|WP_Error', 'term_ids'=>'int|int[]', 'taxonomies'=>'string|string[]', 'args'=>'array{order?: string'], 'have_posts' => ['bool', '@phpstan-impure'=>''], 'rawurlencode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], 'remove_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"'], From 9de9392d5c235a0093df0ea320c4114db86f615d Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:52:37 +0100 Subject: [PATCH 02/14] Add WP_List_Table::set_pagination_args() to functions map --- functionMap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/functionMap.php b/functionMap.php index 221e6a7b..23705c24 100644 --- a/functionMap.php +++ b/functionMap.php @@ -33,6 +33,7 @@ 'WP_List_Table::bulk_actions' => ['void', 'which'=>'"top"|"bottom"'], 'WP_List_Table::display_tablenav' => ['void', 'which'=>'"top"|"bottom"'], 'WP_List_Table::pagination' => ['void', 'which'=>'"top"|"bottom"'], + 'WP_List_Table::set_pagination_args' => ['void', 'args'=>'array{total_items?: int, total_pages?: int, per_page?: int}'], 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType], 'WP_Query::have_posts' => ['bool', '@phpstan-impure'=>''], 'wp_remote_get' => [$httpReturnType], From d0462a6d87fb1552908e1c6d18a0acfa2e2684fb Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:53:47 +0100 Subject: [PATCH 03/14] Add wp_page_menu() to functions map --- functionMap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functionMap.php b/functionMap.php index 23705c24..999b96f9 100644 --- a/functionMap.php +++ b/functionMap.php @@ -2,6 +2,7 @@ $httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error'; $cronArgsType = 'list'; +$wpListPagesArgsType = 'array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array}'; /** * This array is in the same format as the function map array in PHPStan: @@ -35,6 +36,7 @@ 'WP_List_Table::pagination' => ['void', 'which'=>'"top"|"bottom"'], 'WP_List_Table::set_pagination_args' => ['void', 'args'=>'array{total_items?: int, total_pages?: int, per_page?: int}'], 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType], + 'wp_page_menu'=> ['void|string', 'args'=>$wpListPagesArgsType], 'WP_Query::have_posts' => ['bool', '@phpstan-impure'=>''], 'wp_remote_get' => [$httpReturnType], 'wp_remote_head' => [$httpReturnType], From 6a3a84b072c9feacf5fa362d7898cc265c6e1879 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:55:00 +0100 Subject: [PATCH 04/14] Add WP_Post_Type::__construct() to functions map --- functionMap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functionMap.php b/functionMap.php index 999b96f9..d3c4614c 100644 --- a/functionMap.php +++ b/functionMap.php @@ -2,6 +2,7 @@ $httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error'; $cronArgsType = 'list'; +$registerPostTypeArgsType = 'array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string}'; $wpListPagesArgsType = 'array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array}'; /** @@ -37,6 +38,7 @@ 'WP_List_Table::set_pagination_args' => ['void', 'args'=>'array{total_items?: int, total_pages?: int, per_page?: int}'], 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType], 'wp_page_menu'=> ['void|string', 'args'=>$wpListPagesArgsType], + 'WP_Post_Type::__construct' => ['post_type'=>'string', 'args'=>$registerPostTypeArgsType], 'WP_Query::have_posts' => ['bool', '@phpstan-impure'=>''], 'wp_remote_get' => [$httpReturnType], 'wp_remote_head' => [$httpReturnType], From 53c75066b27b750257e12fe86c9bdc0335d969df Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:56:26 +0100 Subject: [PATCH 05/14] Add WP_Taxonomy::__construct() to functions map --- functionMap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functionMap.php b/functionMap.php index d3c4614c..144fa675 100644 --- a/functionMap.php +++ b/functionMap.php @@ -3,6 +3,7 @@ $httpReturnType = 'array{headers: \Requests_Utility_CaseInsensitiveDictionary, body: string, response: array{code: int,message: string}, cookies: array, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error'; $cronArgsType = 'list'; $registerPostTypeArgsType = 'array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string}'; +$registerTaxonomyArgsType = 'array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool}'; $wpListPagesArgsType = 'array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array}'; /** @@ -52,6 +53,7 @@ 'wp_schedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_schedule_single_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_slash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], + 'WP_Taxonomy::__construct' => ['void', 'taxonomy'=>'string', 'object_type'=>'array|string', 'args'=>$registerTaxonomyArgsType], 'wp_unschedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_unslash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], ]; From 8dc5c35c6929568cd8a9dbdaeaca019106b37155 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:57:25 +0100 Subject: [PATCH 06/14] Add wp_widget_rss_form() to functions map --- functionMap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functionMap.php b/functionMap.php index 144fa675..531636e9 100644 --- a/functionMap.php +++ b/functionMap.php @@ -5,6 +5,8 @@ $registerPostTypeArgsType = 'array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string}'; $registerTaxonomyArgsType = 'array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool}'; $wpListPagesArgsType = 'array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array}'; +$wpWidgetRssFormArgsType = 'array{number?: int, error: bool, title?: string ,url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}'; +$wpWidgetRssFormInputType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}'; /** * This array is in the same format as the function map array in PHPStan: @@ -56,4 +58,5 @@ 'WP_Taxonomy::__construct' => ['void', 'taxonomy'=>'string', 'object_type'=>'array|string', 'args'=>$registerTaxonomyArgsType], 'wp_unschedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_unslash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], + 'wp_widget_rss_form' => ['void', 'args'=>$wpWidgetRssFormArgsType, 'input'=>$wpWidgetRssFormInputType], ]; From aed9ba55e203dd8fa2066060fd6a27fb0c03629b Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 04:14:47 +0100 Subject: [PATCH 07/14] $args['number'] is not optional in wp_widget_rss_form() --- functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functionMap.php b/functionMap.php index 531636e9..7065c22d 100644 --- a/functionMap.php +++ b/functionMap.php @@ -5,7 +5,7 @@ $registerPostTypeArgsType = 'array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string}'; $registerTaxonomyArgsType = 'array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool}'; $wpListPagesArgsType = 'array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array}'; -$wpWidgetRssFormArgsType = 'array{number?: int, error: bool, title?: string ,url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}'; +$wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}'; $wpWidgetRssFormInputType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}'; /** From b851bef73fa21897c22c035ffb906e4074091829 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 04:26:36 +0100 Subject: [PATCH 08/14] Add missing brace --- functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functionMap.php b/functionMap.php index 7065c22d..3df82bfb 100644 --- a/functionMap.php +++ b/functionMap.php @@ -18,7 +18,7 @@ return [ 'add_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"', 'priority'=>'"high"|"core"|"default"|"low"'], 'addslashes_gpc' => ['T', '@phpstan-template'=>'T', 'gpc'=>'T'], - 'get_objects_in_term' => ['string[]|WP_Error', 'term_ids'=>'int|int[]', 'taxonomies'=>'string|string[]', 'args'=>'array{order?: string'], + 'get_objects_in_term' => ['string[]|WP_Error', 'term_ids'=>'int|int[]', 'taxonomies'=>'string|string[]', 'args'=>'array{order?: string}'], 'have_posts' => ['bool', '@phpstan-impure'=>''], 'rawurlencode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], 'remove_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"'], From f107ddf87ce33138d412a78bc4e0cc982e8967b2 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 04:31:27 +0100 Subject: [PATCH 09/14] Remove types given by doc blocks --- functionMap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functionMap.php b/functionMap.php index 3df82bfb..c71b246e 100644 --- a/functionMap.php +++ b/functionMap.php @@ -18,7 +18,7 @@ return [ 'add_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"', 'priority'=>'"high"|"core"|"default"|"low"'], 'addslashes_gpc' => ['T', '@phpstan-template'=>'T', 'gpc'=>'T'], - 'get_objects_in_term' => ['string[]|WP_Error', 'term_ids'=>'int|int[]', 'taxonomies'=>'string|string[]', 'args'=>'array{order?: string}'], + 'get_objects_in_term' => ['string[]|WP_Error', 'args'=>'array{order?: string}'], 'have_posts' => ['bool', '@phpstan-impure'=>''], 'rawurlencode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], 'remove_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"'], @@ -41,7 +41,7 @@ 'WP_List_Table::set_pagination_args' => ['void', 'args'=>'array{total_items?: int, total_pages?: int, per_page?: int}'], 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType], 'wp_page_menu'=> ['void|string', 'args'=>$wpListPagesArgsType], - 'WP_Post_Type::__construct' => ['post_type'=>'string', 'args'=>$registerPostTypeArgsType], + 'WP_Post_Type::__construct' => ['args'=>$registerPostTypeArgsType], 'WP_Query::have_posts' => ['bool', '@phpstan-impure'=>''], 'wp_remote_get' => [$httpReturnType], 'wp_remote_head' => [$httpReturnType], @@ -55,7 +55,7 @@ 'wp_schedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_schedule_single_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_slash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], - 'WP_Taxonomy::__construct' => ['void', 'taxonomy'=>'string', 'object_type'=>'array|string', 'args'=>$registerTaxonomyArgsType], + 'WP_Taxonomy::__construct' => ['void', 'args'=>$registerTaxonomyArgsType], 'wp_unschedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_unslash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], 'wp_widget_rss_form' => ['void', 'args'=>$wpWidgetRssFormArgsType, 'input'=>$wpWidgetRssFormInputType], From 7c73f381f7730c84e8f14d61b252f9e15b8455e0 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:47:06 +0100 Subject: [PATCH 10/14] Update stubs files --- wordpress-stubs.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wordpress-stubs.php b/wordpress-stubs.php index f435a14d..be67cb00 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -4225,6 +4225,8 @@ public function prepare_items() * @since 3.1.0 * * @param array|string $args Array or string of arguments with information about the pagination. + * @phpstan-param array{total_items?: int, total_pages?: int, per_page?: int} $args + * @phpstan-return void */ protected function set_pagination_args($args) { @@ -43926,6 +43928,7 @@ final class WP_Post_Type * @param string $post_type Post type key. * @param array|string $args Optional. Array or string of arguments for registering a post type. * Default empty array. + * @phpstan-return array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string} */ public function __construct($post_type, $args = array()) { @@ -49340,6 +49343,8 @@ final class WP_Taxonomy * @param array|string $object_type Name of the object type for the taxonomy object. * @param array|string $args Optional. Array or query string of arguments for registering a taxonomy. * Default empty array. + * @phpstan-param array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool} $args + * @phpstan-return void */ public function __construct($taxonomy, $object_type, $args = array()) { @@ -118303,6 +118308,8 @@ function wp_list_pages($args = '') * post_type?: string, * post_status?: string|array, * } $args + * @phpstan-param array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array} $args + * @phpstan-return void|string */ function wp_page_menu($args = array()) { @@ -125779,6 +125786,8 @@ function unregister_taxonomy_for_object_type($taxonomy, $object_type) * @param array|string $args Change the order of the object IDs, either ASC or DESC. * @return string[]|WP_Error An array of object IDs as numeric strings on success, * WP_Error if the taxonomy does not exist. + * @phpstan-param array{order?: string} $args + * @phpstan-return string[]|WP_Error */ function get_objects_in_term($term_ids, $taxonomies, $args = array()) { @@ -131114,6 +131123,9 @@ function wp_widget_rss_output($rss, $args = array()) * * @param array|string $args Values for input fields. * @param array $inputs Override default display options. + * @phpstan-param array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int} $args + * @phpstan-param array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool} $input + * @phpstan-return void */ function wp_widget_rss_form($args, $inputs = \null) { From b3042e49f1505da7ee78f87893dc13b4e6ee9a29 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Mar 2023 20:03:42 +0100 Subject: [PATCH 11/14] Revert adding wp_page_menu() --- functionMap.php | 4 +--- wordpress-stubs.php | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/functionMap.php b/functionMap.php index c71b246e..81c7f335 100644 --- a/functionMap.php +++ b/functionMap.php @@ -4,7 +4,6 @@ $cronArgsType = 'list'; $registerPostTypeArgsType = 'array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string}'; $registerTaxonomyArgsType = 'array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool}'; -$wpListPagesArgsType = 'array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array}'; $wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}'; $wpWidgetRssFormInputType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}'; @@ -40,8 +39,7 @@ 'WP_List_Table::pagination' => ['void', 'which'=>'"top"|"bottom"'], 'WP_List_Table::set_pagination_args' => ['void', 'args'=>'array{total_items?: int, total_pages?: int, per_page?: int}'], 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType], - 'wp_page_menu'=> ['void|string', 'args'=>$wpListPagesArgsType], - 'WP_Post_Type::__construct' => ['args'=>$registerPostTypeArgsType], + 'WP_Post_Type::__construct' => ['void', 'args'=>$registerPostTypeArgsType], 'WP_Query::have_posts' => ['bool', '@phpstan-impure'=>''], 'wp_remote_get' => [$httpReturnType], 'wp_remote_head' => [$httpReturnType], diff --git a/wordpress-stubs.php b/wordpress-stubs.php index be67cb00..e920bb93 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -43928,7 +43928,8 @@ final class WP_Post_Type * @param string $post_type Post type key. * @param array|string $args Optional. Array or string of arguments for registering a post type. * Default empty array. - * @phpstan-return array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string} + * @phpstan-param array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string} $args + * @phpstan-return void */ public function __construct($post_type, $args = array()) { @@ -118308,8 +118309,6 @@ function wp_list_pages($args = '') * post_type?: string, * post_status?: string|array, * } $args - * @phpstan-param array{sort_column?: string, menu_id?: string, menu_class?: string, container?: string, echo?: bool, show_home?: int|bool|string, link_before?: string, link_after?: string, before?: string, after?: string, item_spacing?: string, walker?: Walker, child_of?: int, authors?: string, date_format?: string, depth?: int, echo?: bool, exclude?: string, include?: array, link_after?: string, link_before?: string, post_type?: string, post_status?: string|array, show_date?: string, sort_column?: string, title_li?: string, item_spacing?: string, walker?: Walker, child_of?: int, sort_order?: string, sort_column?: string, hierarchical?: bool, exclude?: int[], include?: int[], meta_key?: string, meta_value?: string, authors?: string, parent?: int, exclude_tree?: string|int[], number?: int, offset?: int, post_type?: string, post_status?: string|array} $args - * @phpstan-return void|string */ function wp_page_menu($args = array()) { From 6a842f4811cfa5c6fadcfb96fe45ef6a67633506 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Sat, 15 Apr 2023 10:14:03 +0200 Subject: [PATCH 12/14] Update stubs file --- wordpress-stubs.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/wordpress-stubs.php b/wordpress-stubs.php index 813fde7a..eb660557 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -4228,8 +4228,6 @@ public function prepare_items() * @since 3.1.0 * * @param array|string $args Array or string of arguments with information about the pagination. - * @phpstan-param array{total_items?: int, total_pages?: int, per_page?: int} $args - * @phpstan-return void */ protected function set_pagination_args($args) { @@ -43736,8 +43734,6 @@ final class WP_Post_Type * @param string $post_type Post type key. * @param array|string $args Optional. Array or string of arguments for registering a post type. * Default empty array. - * @phpstan-param array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string} $args - * @phpstan-return void */ public function __construct($post_type, $args = array()) { @@ -49155,8 +49151,6 @@ final class WP_Taxonomy * @param array|string $object_type Name of the object type for the taxonomy object. * @param array|string $args Optional. Array or query string of arguments for registering a taxonomy. * Default empty array. - * @phpstan-param array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool} $args - * @phpstan-return void */ public function __construct($taxonomy, $object_type, $args = array()) { @@ -127165,8 +127159,6 @@ function unregister_taxonomy_for_object_type($taxonomy, $object_type) * @param array|string $args Change the order of the object IDs, either ASC or DESC. * @return string[]|WP_Error An array of object IDs as numeric strings on success, * WP_Error if the taxonomy does not exist. - * @phpstan-param array{order?: string} $args - * @phpstan-return string[]|WP_Error */ function get_objects_in_term($term_ids, $taxonomies, $args = array()) { @@ -132517,9 +132509,6 @@ function wp_widget_rss_output($rss, $args = array()) * * @param array|string $args Values for input fields. * @param array $inputs Override default display options. - * @phpstan-param array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int} $args - * @phpstan-param array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool} $input - * @phpstan-return void */ function wp_widget_rss_form($args, $inputs = \null) { From ff4edba83894d5d9b2227a44815cd0e8ddfe23fe Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:09:45 +0200 Subject: [PATCH 13/14] Update v6.2 function map --- functionMap62.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functionMap62.php b/functionMap62.php index 2e985c0e..77924368 100644 --- a/functionMap62.php +++ b/functionMap62.php @@ -2,6 +2,10 @@ $httpReturnType = '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'; $cronArgsType = 'list'; +$registerPostTypeArgsType = 'array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string}'; +$registerTaxonomyArgsType = 'array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool}'; +$wpWidgetRssFormArgsType = 'array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int}'; +$wpWidgetRssFormInputType = 'array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool}'; /** * This array is in the same format as the function map array in PHPStan: @@ -17,6 +21,7 @@ return [ 'add_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"', 'priority'=>'"high"|"core"|"default"|"low"'], 'addslashes_gpc' => ['T', '@phpstan-template'=>'T', 'gpc'=>'T'], + 'get_objects_in_term' => ['string[]|WP_Error', 'args'=>'array{order?: string}'], 'have_posts' => ['bool', '@phpstan-impure'=>''], 'rawurlencode_deep' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], 'remove_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"'], @@ -36,7 +41,9 @@ 'WP_List_Table::bulk_actions' => ['void', 'which'=>'"top"|"bottom"'], 'WP_List_Table::display_tablenav' => ['void', 'which'=>'"top"|"bottom"'], 'WP_List_Table::pagination' => ['void', 'which'=>'"top"|"bottom"'], + 'WP_List_Table::set_pagination_args' => ['void', 'args'=>'array{total_items?: int, total_pages?: int, per_page?: int}'], 'wp_next_scheduled' => ['int|false', 'args'=>$cronArgsType], + 'WP_Post_Type::__construct' => ['void', 'args'=>$registerPostTypeArgsType], 'WP_Query::have_posts' => ['bool', '@phpstan-impure'=>''], 'wp_remote_get' => [$httpReturnType], 'wp_remote_head' => [$httpReturnType], @@ -50,8 +57,10 @@ 'wp_schedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_schedule_single_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_slash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], + 'WP_Taxonomy::__construct' => ['void', 'args'=>$registerTaxonomyArgsType], 'wp_unschedule_event' => ['bool|WP_Error', 'args'=>$cronArgsType], 'wp_unslash' => ['T', '@phpstan-template'=>'T', 'value'=>'T'], + 'wp_widget_rss_form' => ['void', 'args'=>$wpWidgetRssFormArgsType, 'input'=>$wpWidgetRssFormInputType], 'WP_REST_Request' => [null, '@phpstan-template'=>'T of array', '@phpstan-implements'=>'ArrayAccess, value-of>'], 'WP_REST_Request::offsetExists' => ['bool', 'offset'=>'@param key-of'], 'WP_REST_Request::offsetGet' => ['T[TOffset]', '@phpstan-template'=>'TOffset of key-of', 'offset'=>'TOffset'], From 7199b4ceca93bc76ae063341d478f29fa34adab6 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:12:24 +0200 Subject: [PATCH 14/14] Update stubs file --- wordpress-stubs.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wordpress-stubs.php b/wordpress-stubs.php index eb660557..813fde7a 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -4228,6 +4228,8 @@ public function prepare_items() * @since 3.1.0 * * @param array|string $args Array or string of arguments with information about the pagination. + * @phpstan-param array{total_items?: int, total_pages?: int, per_page?: int} $args + * @phpstan-return void */ protected function set_pagination_args($args) { @@ -43734,6 +43736,8 @@ final class WP_Post_Type * @param string $post_type Post type key. * @param array|string $args Optional. Array or string of arguments for registering a post type. * Default empty array. + * @phpstan-param array{label?: string, labels?: string[], description?: string, public?: bool, hierarchical?: bool, exclude_from_search?: bool, publicly_queryable?: bool, show_ui?: bool, show_in_menu?: bool|string, show_in_nav_menus?: bool, show_in_admin_bar?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, menu_position?: int, menu_icon?: string, capability_type?: string|array, capabilities?: string[], map_meta_cap?: bool, supports?: array, register_meta_box_cb?: callable, taxonomies?: string[], has_archive?: bool|string, rewrite?: bool|array{slug?: string, with_front?: bool, feeds?: bool, pages?: bool, ep_mask?: int}, query_var?: string|bool, can_export?: bool, delete_with_user?: bool, template?: array, template_lock?: string|false, _builtin?: bool, _edit_link?: string} $args + * @phpstan-return void */ public function __construct($post_type, $args = array()) { @@ -49151,6 +49155,8 @@ final class WP_Taxonomy * @param array|string $object_type Name of the object type for the taxonomy object. * @param array|string $args Optional. Array or query string of arguments for registering a taxonomy. * Default empty array. + * @phpstan-param array{labels?: string[], description?: string, public?: bool, publicly_queryable?: bool, hierarchical?: bool, show_ui?: bool, show_in_menu?: bool, show_in_nav_menus?: bool, show_in_rest?: bool, rest_base?: string, rest_namespace?: string, rest_controller_class?: string, show_tagcloud?: bool, show_in_quick_edit?: bool, show_admin_column?: bool, meta_box_cb?: bool|callable, meta_box_sanitize_cb?: callable, capabilities?: array{manage_terms?: string, edit_terms?: string, delete_terms?: string, assign_terms?: string}, rewrite?: bool|array{slug?: string, with_front?: bool, hierarchical?: bool, ep_mask?: int}, query_var?: string|bool, update_count_callback?: callable, default_term?: string|array{name?: string, slug?: string, description?: string}, sort?: bool, args?: array, _builtin?: bool} $args + * @phpstan-return void */ public function __construct($taxonomy, $object_type, $args = array()) { @@ -127159,6 +127165,8 @@ function unregister_taxonomy_for_object_type($taxonomy, $object_type) * @param array|string $args Change the order of the object IDs, either ASC or DESC. * @return string[]|WP_Error An array of object IDs as numeric strings on success, * WP_Error if the taxonomy does not exist. + * @phpstan-param array{order?: string} $args + * @phpstan-return string[]|WP_Error */ function get_objects_in_term($term_ids, $taxonomies, $args = array()) { @@ -132509,6 +132517,9 @@ function wp_widget_rss_output($rss, $args = array()) * * @param array|string $args Values for input fields. * @param array $inputs Override default display options. + * @phpstan-param array{number: int, error: bool, title?: string, url?: string, items?: int, show_summary?: int, show_author?: int, show_date?: int} $args + * @phpstan-param array{title?: bool, url?: bool, items?: bool, show_summary?: bool, show_author?: bool, show_date?: bool} $input + * @phpstan-return void */ function wp_widget_rss_form($args, $inputs = \null) {