gp_url (line 43)
Builds a URL relative to the GlotPress' domain root
void
gp_url
([mixed $path = '/'], [array $query = null])
-
mixed
$path: string path or array of path components
-
array
$query: associative array of query arguments (optional)
gp_url_add_path_and_query (line 52)
void
gp_url_add_path_and_query
( $base, $path, $query)
gp_url_base (line 47)
void
gp_url_base
([ $path = '/'], [ $query = null])
gp_url_base_root (line 73)
void
gp_url_base_root
()
gp_url_current (line 97)
The URL of the current page
void
gp_url_current
()
gp_url_img (line 90)
void
gp_url_img
( $file)
gp_url_join (line 28)
Joins paths, and takes care of slashes between them
Example: gp_url_join( '/project', array( 'wp', 'dev) ) -> '/project/wp/dev'
The function will keep leading and trailing slashes of the whole URL, but won't allow more than consecutive slash inside.
string
gp_url_join
([mixed 0 = components... arbitrary number of string or path components])
-
mixed
0: components... arbitrary number of string or path components
gp_url_login (line 111)
void
gp_url_login
([ $redirect_to = null])
gp_url_logout (line 115)
void
gp_url_logout
()
gp_url_path (line 11)
Gives the path of an URL
void
gp_url_path
([string $url = null])
-
string
$url: Optional. The default is the GlotPress URL
gp_url_project (line 106)
void
gp_url_project
([ $project_or_path = ''], [ $path = ''], [ $query = null])
-
$project_or_path
-
$path
-
$query
gp_url_project_locale (line 86)
Constructs URL for a project and locale.
/<project-path>/<locale>/<path>/<page>
void
gp_url_project_locale
( $project_or_path, $locale, [ $path = ''], [ $query = null])
-
$project_or_path
-
$locale
-
$path
-
$query
gp_url_public_root (line 78)
void
gp_url_public_root
()
gp_url_ssl (line 66)
Converts an absolute URL to the corresponding SSL URL if the GlotPress
settings allow SSL
void
gp_url_ssl
( $url)