Function Hook_health_check_marketing_seo_robotstxt->robots_parse
Definitions
sources/hooks/systems/health_checks/marketing_seo_robotstxt.php
- Parse our domain's robots.txt.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $user_agent | ?string | No | No | required parameter | N/A | N/A | The user-agent (null: N/A) |
| $error_messages | boolean | No | No | False | N/A | N/A | Show error messages for any parsing issues |
Returns
- List of rules (null: could not parse)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Parse our domain's robots.txt.
*
* @param ?string $user_agent The user-agent (null: N/A)
* @param boolean $error_messages Show error messages for any parsing issues
* @return ?array List of rules (null: could not parse)
*/
protected function robots_parse(?string $user_agent, bool $error_messages = false) : ?array
* Parse our domain's robots.txt.
*
* @param ?string $user_agent The user-agent (null: N/A)
* @param boolean $error_messages Show error messages for any parsing issues
* @return ?array List of rules (null: could not parse)
*/
protected function robots_parse(?string $user_agent, bool $error_messages = false) : ?array

