functions.php
Table of Contents
Functions
- html() : string
- Convert all applicable characters to HTML entities. *
- set_language() : void
- Set locale
- __() : string
- Text translation.
- get_gravatar() : string
- Get either a Gravatar URL or complete image tag for a specified email address.
- returnLocale() : mixed
Functions
html()
Convert all applicable characters to HTML entities. *
html([string|null $text = null ]) : string
Parameters
- $text : string|null = null
-
The string
Return values
string —The html encoded string
set_language()
Set locale
set_language(string $locale[, string $domain = 'messages' ]) : void
Parameters
- $locale : string
-
The locale (en_US)
- $domain : string = 'messages'
-
The text domain (messages) *
Tags
__()
Text translation.
__(string $message, string|int|float|bool ...$context) : string
Parameters
- $message : string
-
The message
- $context : string|int|float|bool
-
The context *
Return values
string —The translated string
get_gravatar()
Get either a Gravatar URL or complete image tag for a specified email address.
get_gravatar(string $email[, string $s = 80 ][, string $d = 'mp' ][, string $r = 'g' ][, boole $img = false ][, array<string|int, mixed> $atts = array() ]) : string
Parameters
- $email : string
-
The email address
- $s : string = 80
-
Size in pixels, defaults to 80px [ 1 - 2048 ]
- $d : string = 'mp'
-
Default imageset to use [ 404 | mp | identicon | monsterid | wavatar ]
- $r : string = 'g'
-
Maximum rating (inclusive) [ g | pg | r | x ]
- $img : boole = false
-
True to return a complete IMG tag False for just the URL
- $atts : array<string|int, mixed> = array()
-
Optional, additional key/value attributes to include in the IMG tag
Tags
Return values
string —containing either just a URL or a complete image tag
returnLocale()
returnLocale() : mixed