PHP Класс WPDKWordPressPaths

All path and URL are auto termianted with "/" slash.
Автор: =undo= ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.