Elgg  Version 6.1
robots.php
Go to the documentation of this file.
1 <?php
6 if (parse_url(elgg_get_site_url(), PHP_URL_PATH) !== '/') {
7  echo elgg_view_message('warning', elgg_echo('admin:robots.txt:subdir'));
8 }
9 
10 if (file_exists(elgg_get_root_path() . 'robots.txt')) {
11  // a physical robots.txt exists, which will take precedent over the any configuration
12  echo elgg_view_message('warning', elgg_echo('admin:robots.txt:physical'));
13 }
14 
15 echo elgg_view_form('admin/site/set_robots');
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition: views.php:1033
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_get_root_path()
Get the project path (where composer is installed), ending with slash.
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
elgg_view_message(string $type, string $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:940