Skip to content

Narrow return type of get_compat_media_markup() #319

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
Aug 6, 2025

Conversation

IanDelMar
Copy link
Contributor

@IanDelMar IanDelMar commented Aug 6, 2025

The function get_compat_media_markup()always returns the following array.

return array(
	'item' => $item,
	'meta' => $media_meta,
);

See WP Dev Resources

Therefore, its return type can be narrowed to an array shape.

@szepeviktor szepeviktor merged commit e41c7b0 into php-stubs:master Aug 6, 2025
6 checks passed
@IanDelMar IanDelMar deleted the get_compat_media_markup branch August 6, 2025 21:11
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