Overview

Classes

  • CMLLanguage
  • CMLPost
  • CMLTranslations
  • CMLUtils

Functions

  • cml_dropdown_langs
  • cml_get_browser_lang
  • cml_get_menu
  • cml_get_notice
  • cml_get_the_link
  • cml_is_homepage
  • cml_show_flags
  • Overview
  • Class
  • Tree

Class CMLUtils

utility class

Located at api.php
Methods summary
public static string
# get_home_url( string $slug = null )

return home_url link in according to language slug.

return home_url link in according to language slug.

This function format home_url in according to $slug parameter

Parameters

$slug
string
$slug - language slug. If null current slug will be used

Returns

string
public static
# get_category_url_mode( )
public static string
# home_url( )

get "clean" home_url.

get "clean" home_url.

The plugin translate home url in according to current language. So if you call the wp function "home_url" it will home url with language information, in according to url modification mode.

This function will return "real" home without any language information.

Returns

string

Example

home_url()
www.example.com/it

CMLUtils::home_url()
www.example.com

public static string
# get_clean_url( )

return current url withouth any language information.

return current url withouth any language information.

Returns

string

Example

www.example.com/en/example

CMLUtils::get_clean_url() will return:

www.example.com/example
public static string
# get_clean_request( )

get $_SERVER[ 'REQUEST_URI' ] with no language information.

get $_SERVER[ 'REQUEST_URI' ] with no language information.

Returns

string
API documentation generated by ApiGen 2.8.0