network_site_url [ WordPress Function ]
network_site_url ( $path = '', $scheme = null )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: network_home_url, network_admin_url, get_site_url, network_step1, network_step2
Source
<?php
function network_site_url( $path = '', $scheme = null ) {
global $current_site;
if ( !is_multisite() )
return site_url($path, $scheme);
$orig_scheme = $scheme;
if ( !in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {
if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
$scheme = 'https';
elseif ( ('login' == $scheme) && ( force_ssl_admin() ) )
$scheme = 'https';
elseif ( ('admin' == $scheme) && force_ssl_admin() )
$scheme = 'https';
else
$scheme = ( is_ssl() ? 'https' : 'http' );
}
if ( 'relative' == $scheme )
$url = $current_site->path;
else
$url = $scheme . '://' . $current_site->domain . $current_site->path;
if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
$url .= ltrim($path, '/');
return apply_filters('network_site_url', $url, $path, $orig_scheme);
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/network site url « WordPress Codex
The network_site_url template tag retrieves the site url for the "main" site of the current network with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise ...
codex.wordpress.org - #16652 (network_site_url() does not use main site) – WordPress Trac
network_site_url() always link to the site domain + path. network/admin.php, however, expects the network admin to be on the main site. This means the main ...
core.trac.wordpress.org - network_site_url Wordpress hook details -- Adam Brown, BYU ...
Detailed information about every action hook and filter used in WordPress. Makes Plugin API easier to use. Lists appearance, file location, and deprecation data ...
adambrown.info - PHPXRef 0.7 : WordPress : Function Reference: network_site_url()
Function and Method Cross Reference. network_site_url(). Defined at: /wp- includes/link-template.php -> line 2061. Referenced 9 times: ...
phpxref.ftwr.co.uk