You are here

function uptolike_project_id in Uptolike share buttons 7

Build project identifier.

Return value

string Site url without "www", "." and "-".

7 calls to uptolike_project_id()
uptolike_admin_statistic_form in ./uptolike.admin.inc
Form builder for admin statistic page.
uptolike_constructor in ./uptolike.module
Build constructor iframe.
uptolike_cryptkey in ./uptolike.module
Build crypt key for url.
uptolike_ctools_export_ui_form_submit in plugins/export_ui/uptolike_ctools_export_ui.inc
Submit export UI form.
uptolike_default_uptolike_preset in ./uptolike.module
Implements hook_default_uptolike_preset().

... See full list

File

./uptolike.module, line 634
Main file for Uptolike module.

Code

function uptolike_project_id() {
  global $base_url;

  // Remove http:// and https:// from site url.
  $url = preg_replace('#http(s)?:\\/\\/#', '', $base_url);

  // Remove www from begging.
  $url = preg_replace('#^www\\.#', '', $url);

  // Remove "." and "-".
  $url = preg_replace('#[.-]#', '', $url);
  return UPTOLIKE_PARTNER . $url;
}