Overview

Namespaces

  • None
  • VSP
    • Core
      • Abstracts
      • Interfaces
      • Traits
        • WC_Compatibility
    • Deprecation
    • Helper
    • Modules
      • Addons
      • Logger

Traits

  • Array_Helper
  • Framework
  • String_Helper
  • URL
  • WC_Helper
  • WP
  • Overview
  • Namespace
  • Class

Trait URL

Trait VSP_Framework_IP_Trait

Direct Known Users

VSP\Helper
Namespace: VSP\Core\Traits
Author: Varun Sridharan varunsridharan23@gmail.com
Located at includes/core/traits/class-url.php
Methods summary
public static string
# get_first_segment( $segments )

Get first item segment.

Get first item segment.

Parameters

$segments

Returns

string
public static array
# segment_uri( null $uri = null )

Get all URL parts based on a / seperator.

Get all URL parts based on a / seperator.

Parameters

$uri

Returns

array
string → segments
public static null|string|string[]
# generate_safe_slug( string $slug )

This function converts and URL segment to an safe one. For example: test name @132 will be converted to test-name--123. It will also return all letters in lowercase

This function converts and URL segment to an safe one. For example: test name @132 will be converted to test-name--123. It will also return all letters in lowercase

Parameters

$slug
→ URL slug to clean up

Returns

null|string|string[]
public static string
# auto_link( string $url, string $custom = null )

Converts plain text URLS into HTML links. Second argument will be used as the URL label $custom.

Converts plain text URLS into HTML links. Second argument will be used as the URL label $custom.

Parameters

$url
→ URL
$custom
→ if provided, this is used for the link label

Returns

string
→ returns the data with links created around URLS
public static integer
# get_port( )

Get the server port.

Get the server port.

Returns

integer
→ server port
API documentation generated by ApiGen