Skip to content

Conversation

@lipemat
Copy link
Contributor

@lipemat lipemat commented Sep 19, 2023

  • Return array<int|string> if $output = 'ARRAY_N'.
  • Return array<string, int|string> if default or $output = 'ARRAY_A'.
  • Return WP_Term if default or $output = 'OBJECT'.

link https://developer.wordpress.org/reference/functions/get_term/#parameters

- Return `array<int|string>` if `$output = 'ARRAY_N`.
- Return `array<string, int|string>` if default or `$output = 'ARRAY_A`.
- Return `WP_Term` if default or `$output` is 'OBJECT';

@link https://developer.wordpress.org/reference/functions/get_term/#parameters
@lipemat lipemat changed the title Add dynamic return type for the get_term functionMap Add dynamic return type for the get_term function Sep 19, 2023
@szepeviktor
Copy link
Member

@IanDelMar @johnbillion Please review this PR.

@szepeviktor
Copy link
Member

Thank you, John.

@szepeviktor szepeviktor merged commit 571e697 into php-stubs:master Sep 19, 2023
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.

3 participants