ms_get_home_url

Returns an URL for a front-end page with the correct URL schema.

Description

(string) ms_get_home_url( (int) $blog_id, (string) $path ); 

Returns (string)

The correct URL for a front-end page.

Parameters (2)

0. $blog_id (int)
Blog-ID; by default the current blog is used.
1. $path (string)
Argument passed to the home_url() function.

Usage

  1. if ( !function_exists( 'ms_get_home_url' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app/helper/class-ms-helper-utility.php'; 
  3.  
  4. // Blog-ID; by default the current blog is used. 
  5. $blog_id = -1; 
  6.  
  7. // Argument passed to the home_url() function. 
  8. $path = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ms_get_home_url($blog_id, $path); 
  12.  

Defined (1)

The function is defined in the following location(s).

/app/helper/class-ms-helper-utility.php  
  1. function ms_get_home_url( $blog_id, $path ) { 
  2. return MS_Helper_Utility::get_home_url( $blog_id, $path );