Skip to content

Releases: skaut/wordpress-stubs

Version 2.2.0

26 Apr 11:26
268f70f
Compare
Choose a tag to compare

2.2.0 (2022-04-26)

Diff since 2.1.0

Fixes:

  • Enabled WP_Customize_Control argument settings to be a string
  • Fixed wp_insert_attachment() argument tax_input not being optional

New stubs:

  • sanitize_key()

Version 2.1.0

25 Apr 10:52
9a3d08e
Compare
Choose a tag to compare

2.1.0 (2022-04-25)

Diff since 2.0.0

General:

  • Fixed composer suggestion for PHPStan
  • Fixed @package annotations to correct for package renaming

Fixes:

  • Added default value to WP_Query::get() parameter default
  • Updated do_action() to be variadic
  • Added default value to wp_json_encode() parameter options
  • Added default value to wp_set_current_user() parameter name
  • Added default value to wp_strip_all_tags() parameter remove_breaks

New stubs:

  • WP_Query::__construct()
  • WP_User_Query::__construct()

Version 2.0.0

25 Apr 07:49
Compare
Choose a tag to compare

2.0.0 (2022-04-25)

Diff since 1.25.0

General:

  • Added support for PHPStan
  • Moved the package to skaut/wordpress-stubs
  • Full array types using the array<string> and array{key: string} notation supported by PHPStan

New stubs:

  • Requests_Cookie_Jar
  • Requests_Cookie_Jar::offsetExists()
  • Requests_Cookie_Jar::offsetGet()
  • Requests_Cookie_Jar::offsetSet()
  • Requests_Cookie_Jar::offsetUnset
  • Requests_Cookie_Jar::getIterator()
  • Requests_Utility_CaseInsensitiveDictionary
  • Requests_Utility_CaseInsensitiveDictionary::offsetExists()
  • Requests_Utility_CaseInsensitiveDictionary::offsetGet()
  • Requests_Utility_CaseInsensitiveDictionary::offsetSet()
  • Requests_Utility_CaseInsensitiveDictionary::offsetUnset
  • Requests_Utility_CaseInsensitiveDictionary::getIterator()
  • WP_Http_Cookie
  • WP_HTTP_Requests_Response
  • WP_HTTP_Response
  • Requests_Auth
  • Requests_Hooker
  • Requests_Proxy
  • Requests_Transport

Version 1.25.0

19 Apr 12:52
913d301
Compare
Choose a tag to compare

1.25.0 (2022-04-19)

Diff since 1.24.0

Fixes:

  • Fixed type of parameter function_to_add of test function tests_add_filter()
  • Class WP_Post_Type is now final
  • Class WP_Screen is now final
  • Fixed type of variadic arguments of add_query_arg() to be mixed
  • Fixed missing parameter postion of add_submenu_page()

Version 1.24.0

19 Apr 09:40
e99083c
Compare
Choose a tag to compare

1.24.0 (2022-04-19)

Diff since 1.23.0

New stubs:

  • WP_DEBUG_DISPLAY

Fixes:

  • Fixed missing return type of wp_kses_normalize_entities()

Version 1.23.0

16 Apr 11:12
74ea5b8
Compare
Choose a tag to compare

1.23.0 (2022-04-16)

Diff since 1.22.0

New stubs:

  • MINUTE_IN_SECONDS
  • WP_DEBUG
  • _x()
  • add_meta_box()
  • add_metadata()
  • add_option()
  • add_query_arg()
  • add_rewrite_rule()
  • add_user_meta()
  • apply_filters_ref_array()
  • check_admin_referer()
  • date_i18n()
  • delete_metadata()
  • delete_user_meta()
  • esc_attr_e()
  • flush_rewrite_rules()
  • get_ancestors()
  • get_current_screen()
  • get_current_user_id()
  • get_edit_user_link()
  • get_footer()
  • get_header()
  • get_home_url()
  • get_metadata()
  • get_post()
  • get_post_meta()
  • get_post_type()
  • get_post_types()
  • get_post_type_object()
  • get_sidebar()
  • get_the_author_meta()
  • get_the_modified_author()
  • get_the_title()
  • get_user_meta()
  • human_time_diff()
  • is_admin_bar_showing()
  • is_network_admin()
  • is_plugin_active()
  • is_user_logged_in()
  • register_deactivation_hook()
  • register_new_user()
  • register_post_type()
  • remove_filter()
  • remove_query_arg()
  • sanitize_meta()
  • selected()
  • settings_fields()
  • translate_user_role()
  • update_post_meta()
  • update_user_meta()
  • user_can()
  • wp_clear_auth_cookie()
  • wp_destroy_current_session()
  • wp_dropdown_roles()
  • wp_get_post_revisions()
  • wp_is_post_revision()
  • wp_kses_normalize_entities()
  • wp_logout()
  • wp_nonce_ays()
  • wp_post_revision_title()
  • wp_roles()
  • wp_safe_redirect()
  • wp_send_new_user_notifications()
  • wp_set_auth_cookie()
  • wp_set_current_user()
  • wp_strip_all_tags()
  • wp_update_user()
  • WP_Admin_Bar
  • WP_Admin_Bar->add_menu()
  • WP_Admin_Bar->get_node()
  • WP_Comment_Query->query_vars
  • WP_Error->errors
  • WP_Locale_Switcher
  • WP_Post_Type
  • WP_Post_Type->name
  • WP_Post_Type->label
  • WP_Post_Type->labels
  • WP_Post_Type->hierarchical
  • WP_Post
  • WP_Post->ID
  • WP_Post->post_date
  • WP_Post->post_modified
  • WP_Post->post_parent
  • WP_Post->post_type
  • WP_Query
  • WP_Query->posts
  • WP_Query->found_posts
  • WP_Query->get()
  • WP_Query->have_posts()
  • WP_Roles
  • WP_Roles->is_role()
  • WP_Screen
  • WP_Screen->id
  • WP_User_Query
  • WP_User_Query->get_results()
  • WP_User
  • WP_User->ID

Version 1.22.0

17 Jan 11:46
94d0411
Compare
Choose a tag to compare

1.22.0 (2022-01-17)

Diff since 1.21.0

New stubs:

  • get_query_var()

Version 1.21.0

16 Jan 18:22
bb705d6
Compare
Choose a tag to compare

1.21.0 (2022-01-16)

Diff since 1.20.0

General:

  • Added support for PHP 8

Version 1.20.0

16 Jan 15:42
Compare
Choose a tag to compare

1.20.0 (2022-01-16)

Diff since 1.19.1

Changes:

  • wp_unslash() now uses a templated type

Version 1.19.1

09 Oct 16:11
a259339
Compare
Choose a tag to compare

1.19.1 (2020-10-09)

Diff since 1.19.0

Fixes:

  • _n() return value