Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
set_robots.php
Go to the documentation of this file.
1 <?php
6 $content = get_input('text');
7 
9 
10 if ($site->setPrivateSetting('robots.txt', $content)) {
11  system_message(elgg_echo('save:success'));
12 } else {
13  register_error(elgg_echo('save:fail'));
14 }
elgg_get_site_entity($site_guid=0)
Get an entity (default is current site)
Definition: sites.php:18
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$site
Definition: set_robots.php:8
register_error($error)
Display an error on next page load.
Definition: elgglib.php:452
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
$content
Set robots.txt action.
Definition: set_robots.php:6
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:438