Skip to content

Make PHPDoc type compatible with default value #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

IanDelMar
Copy link
Contributor

The functions listed below have a default $callback value of an empty string (''), which is not compatible with the PHPDoc type callable, as an empty string is not a valid callable.

This issue is already addressed for add_submenu_page() in functionMap.php, and this change extends that handling to the following functions:

  • add_menu_page
  • add_links_page
  • add_media_page
  • add_pages_page
  • add_posts_page
  • add_theme_page
  • add_users_page
  • add_options_page
  • add_plugins_page
  • add_submenu_page
  • add_comments_page
  • add_dashboard_page
  • add_management_page

@IanDelMar
Copy link
Contributor Author

cc @justlevine

@szepeviktor
Copy link
Member

We fix anything!

@IanDelMar
Copy link
Contributor Author

👷

@szepeviktor szepeviktor merged commit 95be71f into php-stubs:master May 7, 2025
6 checks passed
@IanDelMar IanDelMar deleted the add_x_page branch May 8, 2025 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants