Elgg  Version 3.0
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 parse_url
Parse a URL into its parts.
Definition: elgglib.js:442
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_message($type, $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:1219
elgg_view_form($action, $form_vars=[], $body_vars=[])
Definition: views.php:1318
elgg_get_root_path()
Get the project path (where composer is installed), ending with slash.
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".