[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> url.js (summary)

(no description)

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

Defines 23 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  isURL()
  isEmail()
  getProtocol()
  isValidProtocol()
  getAuthority()
  isValidAuthority()
  getPath()
  isValidPath()
  getQueryString()
  isValidQueryString()
  getFragment()
  isValidFragment()
  addQueryArgs()
  getQueryArg()
  hasQueryArg()
  removeQueryArgs()
  prependHTTP()
  safeDecodeURI()
  filterURLForDisplay()
  safeDecodeURIComponent()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

isURL(url)   X-Ref
Determines whether the given string looks like a URL.

return: {boolean} Whether or not it looks like a URL.
param: {string} url The string to scrutinise.

isEmail(email)   X-Ref
Determines whether the given string looks like an email.

return: {boolean} Whether or not it looks like an email.
param: {string} email The string to scrutinise.

getProtocol(url)   X-Ref
Returns the protocol part of the URL.

return: {string|void} The protocol part of the URL.
param: {string} url The full URL.

isValidProtocol(protocol)   X-Ref
Tests if a url protocol is valid.

return: {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
param: {string} protocol The url protocol.

getAuthority(url)   X-Ref
Returns the authority part of the URL.

return: {string|void} The authority part of the URL.
param: {string} url The full URL.

isValidAuthority(authority)   X-Ref
Checks for invalid characters within the provided authority.

return: {boolean} True if the argument contains a valid authority.
param: {string} authority A string containing the URL authority.

getPath(url)   X-Ref
Returns the path part of the URL.

return: {string|void} The path part of the URL.
param: {string} url The full URL.

isValidPath(path)   X-Ref
Checks for invalid characters within the provided path.

return: {boolean} True if the argument contains a valid path
param: {string} path The URL path.

getQueryString(url)   X-Ref
Returns the query string part of the URL.

return: {string|void} The query string part of the URL.
param: {string} url The full URL.

isValidQueryString(queryString)   X-Ref
Checks for invalid characters within the provided query string.

return: {boolean} True if the argument contains a valid query string.
param: {string} queryString The query string.

getFragment(url)   X-Ref
Returns the fragment part of the URL.

return: {string|void} The fragment part of the URL.
param: {string} url The full URL

isValidFragment(fragment)   X-Ref
Checks for invalid characters within the provided fragment.

return: {boolean} True if the argument contains a valid fragment.
param: {string} fragment The url fragment.

addQueryArgs()   X-Ref
Appends arguments as querystring to the provided URL. If the URL already
includes query arguments, the arguments are merged with (and take precedent
over) the existing set.

return: {string} URL with arguments applied.
param: {string} [url='']  URL to which arguments should be appended. If omitted,
param: {Object} args      Query arguments to apply to URL.

getQueryArg(url, arg)   X-Ref
Returns a single query argument of the url

return: {QueryArgParsed|undefined} Query arg value.
param: {string} url URL.
param: {string} arg Query arg name.

hasQueryArg(url, arg)   X-Ref
Determines whether the URL contains a given query arg.

return: {boolean} Whether or not the URL contains the query arg.
param: {string} url URL.
param: {string} arg Query arg name.

removeQueryArgs(url)   X-Ref
Removes arguments from the query string of the url

return: {string} Updated URL.
param: {string}    url  URL.
param: {...string} args Query Args.

prependHTTP(url)   X-Ref
Prepends "http://" to a url, if it looks like something that is meant to be a TLD.

return: {string} The updated URL.
param: {string} url The URL to test.

safeDecodeURI(uri)   X-Ref
Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
`decodeURI` throws an error.

return: {string} Decoded URI if possible.
param: {string} uri URI to decode.

filterURLForDisplay(url)   X-Ref
Returns a URL for display.

return: {string} Displayed URL.
param: {string} url Original URL.

safeDecodeURIComponent(uriComponent)   X-Ref
Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
`decodeURIComponent` throws an error.

return: {string} Decoded URI component if possible.
param: {string} uriComponent URI component to decode.



Generated: Sun Sep 22 01:00:03 2019 Cross-referenced by PHPXref 0.7.1