[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-includes/ -> url.php (summary)

Functions, which deal with URLs: manipulation, generation

File Size: 188 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 13 functions

  gp_url_path()
  gp_url_join()
  gp_url()
  gp_url_add_path_and_query()
  gp_url_ssl()
  gp_url_public_root()
  gp_url_project_locale()
  gp_url_img()
  gp_url_current()
  gp_url_project()
  gp_url_profile()
  gp_url_base_path()
  gp_plugin_url()

Functions
Functions that are not part of a class:

gp_url_path( $url = null )   X-Ref
Returns the path of an URL.

since: 1.0.0
return: string Path of the URL. Empty string if no path was parsed.
param: string $url Optional. The URL to parse. Defaults to GlotPress URL.

gp_url_join()   X-Ref
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.

return: string URL, built of all the components, separated with /
param: mixed components... arbitrary number of string or path components

gp_url( $path = '/', $query = null )   X-Ref
Builds a URL relative to the GlotPress' domain root.

param: mixed $path string path or array of path components
param: array $query associative array of query arguments (optional)

gp_url_add_path_and_query( $base, $path, $query )   X-Ref
No description

gp_url_ssl( $url )   X-Ref
Converts an absolute URL to the corresponding SSL URL if the GlotPress
settings allow SSL


gp_url_public_root()   X-Ref
No description

gp_url_project_locale( $project_or_path, $locale, $path = '', $query = null )   X-Ref
Constructs URL for a project and locale.
/<project-path>/<locale>/<path>/<page>


gp_url_img( $file )   X-Ref
Get the URL for an image file

return: string
param: string $file Image filename

gp_url_current()   X-Ref
The URL of the current page


gp_url_project( $project_or_path = '', $path = '', $query = null )   X-Ref
Get the URL for a project

A leading double-slash will avoid prepending /projects/ to the path.

return: string
param: bool|string|object $project_or_path Project path or object
param: string|array $path Addition path to append to the base path
param: array $query associative array of query arguments (optional)

gp_url_profile( $user_nicename = '' )   X-Ref
No description

gp_url_base_path()   X-Ref
No description

gp_plugin_url( $path = '' )   X-Ref
No description



Generated: Wed Jun 26 01:02:08 2019 Cross-referenced by PHPXref 0.7.1