PHP 클래스 WPDKWordPressPaths

All path and URL are auto termianted with "/" slash.
저자: =undo= ([email protected])
파일 보기 프로젝트 열기: wpxtreme/wpdk 1 사용 예제들

공개 메소드들

메소드 설명
adminURL ( integer $blog_id = null, string $path = '', string $scheme = 'admin' ) : string Retrieve the url to the admin area for a given site.
homeURL ( integer $blog_id = null, string $path = '', string $scheme = null ) : string Retrieve the home url for a given site.
includesURL ( string $path = '' ) : string Retrieve the url to the includes directory.
pluginsURL ( string $path = '', string $plugin = '' ) : string Retrieve the url to the plugins directory or to a specific file within that directory.

메소드 상세

adminURL() 공개 정적인 메소드

Retrieve the url to the admin area for a given site.
public static adminURL ( integer $blog_id = null, string $path = '', string $scheme = 'admin' ) : string
$blog_id integer (optional) Blog ID. Defaults to current blog.
$path string Optional path relative to the admin url.
$scheme string The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
리턴 string Admin url link with optional path appended.

homeURL() 공개 정적인 메소드

Returns the 'home' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is overridden.
public static homeURL ( integer $blog_id = null, string $path = '', string $scheme = null ) : string
$blog_id integer (optional) Blog ID. Defaults to current blog.
$path string (optional) Path relative to the home url.
$scheme string (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
리턴 string Home url link with optional path appended.

includesURL() 공개 정적인 메소드

Retrieve the url to the includes directory.
public static includesURL ( string $path = '' ) : string
$path string Optional. Path relative to the includes url.
리턴 string Includes url link with optional path appended.

pluginsURL() 공개 정적인 메소드

You can hardcode the plugin slug in $path or pass __FILE__ as a second argument to get the correct folder name.
public static pluginsURL ( string $path = '', string $plugin = '' ) : string
$path string Optional. Path relative to the plugins url.
$plugin string Optional. The plugin file that you want to be relative to - i.e. pass in __FILE__
리턴 string Plugins url link with optional path appended.