diff --git a/functionMap.php b/functionMap.php index df0a5a6..81da25a 100644 --- a/functionMap.php +++ b/functionMap.php @@ -196,4 +196,6 @@ 'WP_Widget_Factory::$widgets' => [null, '@phpstan-var' => 'array'], 'WP_Widget_Factory::register' => [null, 'widget' => 'class-string<\WP_Widget>|\WP_Widget'], 'WP_Widget_Factory::unregister' => [null, 'widget' => 'class-string<\WP_Widget>|\WP_Widget'], + 'Custom_Image_Header::show_header_selector' => [null, 'type' => "'default'|'uploaded'"], + 'Custom_Image_Header::set_header_image' => [null, 'choice' => 'string|array{attachment_id: positive-int, url: string, width: non-negative-int, height: non-negative-int}'], ]; diff --git a/wordpress-stubs.php b/wordpress-stubs.php index b24542b..0e980b9 100644 --- a/wordpress-stubs.php +++ b/wordpress-stubs.php @@ -1242,6 +1242,7 @@ public function process_default_headers() * * @param string $type The header type. One of 'default' (for the Uploaded Images control) * or 'uploaded' (for the Uploaded Images control). + * @phpstan-param 'default'|'uploaded' $type */ public function show_header_selector($type = 'default') { @@ -1354,6 +1355,7 @@ public function filter_upload_tabs($tabs) * registered for that theme; and the key of an image uploaded for that theme * (the attachment ID of the image). Or an array of arguments: attachment_id, * url, width, height. All are required. + * @phpstan-param string|array{attachment_id: positive-int, url: string, width: non-negative-int, height: non-negative-int} $choice * @phpstan-return void */ public final function set_header_image($choice)