Skip to content

Commit 4136098

Browse files
committed
Parameters for meta box functions.
1 parent 113e7fc commit 4136098

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

additionalParams.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* @link https://github.com/phpstan/phpstan-src/blob/1.5.x/resources/functionMap.php
1111
*/
1212
return [
13+
'add_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"', 'priority'=>'"high"|"core"|"default"|"low"'],
14+
'remove_meta_box' => ['void', 'context'=>'"normal"|"side"|"advanced"'],
1315
'WP_Http::get' => [$httpReturnType],
1416
'WP_Http::head' => [$httpReturnType],
1517
'WP_Http::post' => [$httpReturnType],

wordpress-stubs.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81901,6 +81901,9 @@ function wp_import_upload_form($action)
8190181901
* @param array $callback_args Optional. Data that should be set as the $args property
8190281902
* of the box array (which is the second parameter passed
8190381903
* to your callback). Default null.
81904+
* @phpstan-param "normal"|"side"|"advanced" $context
81905+
* @phpstan-param "high"|"core"|"default"|"low" $priority
81906+
* @phpstan-return void
8190481907
*/
8190581908
function add_meta_box($id, $title, $callback, $screen = \null, $context = 'advanced', $priority = 'default', $callback_args = \null)
8190681909
{
@@ -81980,6 +81983,8 @@ function do_meta_boxes($screen, $context, $object)
8198081983
* include 'normal', 'side', and 'advanced'. Comments screen contexts
8198181984
* include 'normal' and 'side'. Menus meta boxes (accordion sections)
8198281985
* all use the 'side' context.
81986+
* @phpstan-param "normal"|"side"|"advanced" $context
81987+
* @phpstan-return void
8198381988
*/
8198481989
function remove_meta_box($id, $screen, $context)
8198581990
{

0 commit comments

Comments
 (0)