Skip to content

Conversation

@IanDelMar
Copy link
Contributor

Types narrowed for

  • wp_robots_max_image_preview_large
  • wp_robots_no_robots
  • wp_robots_noindex
  • wp_robots_noindex_embeds
  • wp_robots_noindex_search
  • wp_robots_sensitive_page

All of these accept and return an

Associative array of directives. Every key must be the name of the directive, and the corresponding value must either be a string to provide as value for the directive or a boolean true if it is a boolean directive, i.e. without a value.

Source: wp_robots()

true has been relaxed to bool as it makes no difference as long as wp_robots() does this loose comparison:

if ( is_string( $value ) ) {
    // ...
} elseif ( $value ) {
    // ...
}

@szepeviktor
Copy link
Member

🤖

@szepeviktor szepeviktor merged commit f750c20 into php-stubs:master Oct 30, 2025
7 checks passed
@IanDelMar IanDelMar deleted the robots branch October 30, 2025 05:22
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