wordpress-stubs
                                
                                 wordpress-stubs copied to clipboard
                                
                                    wordpress-stubs copied to clipboard
                            
                            
                            
                        Up-to-date WordPress function and class declaration stubs for static analysis by PHPStan
...which should be v6.1.0 #38
It would be nice if this was done in a weekly or so GitHub action that could perhaps also be run manually if needed. That would make maintenance a breeze....
Since `wordpress-stubs` 6.0.2 PHPstan triggers errors when we pass `$args` parameter as an object to `wp_update_post()` function as it's allowed. https://github.com/WordPress/WordPress/blob/6.0.2/wp-includes/post.php#L4703-L4718 The issue is closer than @chouby [one](https://github.com/php-stubs/wordpress-stubs/issues/54), however it...
`wp_insert_post()` is expecting slashed data. So I'm used to prepare data passed to `wp_insert_post()` and `wp_update_post()` with `wp_slash()`. Here is a small sample to demonstrate the issue: ```php $post =...
> Needs change in functionMap.php @IanDelMar Stop adding our tag if a tag with the same name is already present. https://github.com/php-stubs/wordpress-stubs/blob/794559556de631c52b98349890956d306ac38884/visitor.php#L402 What is to be fixed? https://github.com/php-stubs/wordpress-stubs/pull/162/commits/6ef2cf0ab49fdf2c98ebfb53c4c41994e43e573d
The WP_Widget class supports passing an "$instance" array around which contains the value of the current widget settings. Without a PHPStan template, adding a type to the $instance array results...
The definition for the `add_submenu_page` in WP core is as follows: ```php /** * @param string $parent_slug The slug name for the parent menu (or the file name of a...
### Description I'm experiencing an issue where the WordPress function `wp_get_global_stylesheet` is not recognized by Intelliphense in my development environment. ### Steps to Reproduce 1. Include WordPress stubs in the...
(PR for demonstration) https://phpstan.org/r/5f05dffa-73cd-4c46-95f5-7b65702264a0 ```php
As the function map expands, we should incorporate some checks. I suggest: - [ ] Relocating the parameter name check outside the visitor. - [ ] Verifying whether types have...