Elgg  Version 3.0
Namespaces | Functions | Variables
tags.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Updates the advanced settings for the primary site object.
 

Functions

 string_to_tag_array ($string)
 Takes in a comma-separated string and returns an array of tags which have been trimmed. More...
 
 elgg_get_tags (array $options=[])
 Get popular tags and their frequencies. More...
 
 elgg_register_tag_metadata_name ($name)
 Registers a metadata name as containing tags for an entity. More...
 
 elgg_unregister_tag_metadata_name ($name)
 Unregister metadata tag name. More...
 
 elgg_get_registered_tag_metadata_names ()
 Returns an array of valid metadata names for tags. More...
 
 _elgg_tags_init ()
 Tags init. More...
 

Variables

return function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks)
 

Function Documentation

_elgg_tags_init ( )

Tags init.

Returns
void

Definition at line 101 of file tags.php.

elgg_get_registered_tag_metadata_names ( )

Returns an array of valid metadata names for tags.

Returns
string[]
Since
1.7.0

Definition at line 90 of file tags.php.

elgg_get_tags ( array  $options = [])

Get popular tags and their frequencies.

Accepts all options supported by {

See also
elgg_get_metadata()}

Returns an array of objects that include "tag" and "total" properties

Parameters
array$optionsOptions

int $threshold Minimum number of tag occurrences string[] $tag_names Names of registered tag names to include in search

Returns
stdClass[]|false
Since
1.7.1
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 50 of file tags.php.

elgg_register_tag_metadata_name (   $name)

Registers a metadata name as containing tags for an entity.

This is required if you are using a non-standard metadata name for your tags.

Because tags are simply names of metadata, This is used in search to prevent data exposure by searching on arbitrary metadata.

Parameters
string$nameTag name
Returns
bool
Since
1.7.0

Definition at line 68 of file tags.php.

elgg_unregister_tag_metadata_name (   $name)

Unregister metadata tag name.

Parameters
string$nameTag name
Returns
bool
Since
3.0

Definition at line 80 of file tags.php.

string_to_tag_array (   $string)

Takes in a comma-separated string and returns an array of tags which have been trimmed.

Parameters
string$stringComma-separated tag string
Returns
mixed An array of strings or the original data if input was not a string

Definition at line 18 of file tags.php.

Variable Documentation

See also
::loadCore Do not do work here. Just register for events.

Definition at line 109 of file tags.php.