本文整理匯總了PHP中Kirki::path方法的典型用法代碼示例。如果您正苦於以下問題:PHP Kirki::path方法的具體用法?PHP Kirki::path怎麽用?PHP Kirki::path使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Kirki
的用法示例。
在下文中一共展示了Kirki::path方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Kirki
/**
* Returns the Kirki object
*/
function Kirki()
{
// Make sure the class is instanciated
$kirki = Kirki_Toolkit::get_instance();
// The path of the current Kirki instance
Kirki::$path = dirname(__FILE__);
return $kirki;
}
示例2: Kirki
/**
* Returns the Kirki object
*/
function Kirki()
{
// Make sure the class is instanciated
$kirki = Kirki_Toolkit::get_instance();
$kirki->font_registry = new Kirki_Google_Fonts_Registry();
$kirki->api = new Kirki();
$kirki->scripts = new Kirki_Scripts_Registry();
$kirki->styles = array('back' => new Kirki_Styles_Customizer(), 'front' => new Kirki_Styles_Frontend());
/**
* The path of the current Kirki instance
*/
Kirki::$path = dirname(__FILE__);
return $kirki;
}
示例3: Kirki
/**
* Returns the Kirki object
*/
function Kirki()
{
// Make sure the class is instanciated
$kirki = Kirki_Toolkit::get_instance();
$kirki->font_registry = new Kirki_Google_Fonts_Registry();
$kirki->api = new Kirki();
$kirki->scripts = new Kirki_Scripts_Registry();
$kirki->styles = array('back' => new Kirki_Styles_Customizer(), 'front' => new Kirki_Styles_Frontend());
/**
* The path of the current Kirki instance
*/
Kirki::$path = dirname(__FILE__);
/**
* Get the URL of the current Kirki instance.
* In order to do that, first we'll have to determine if we're using Kirki
* as a plugin, or if it's embedded in a theme.
* We'll also have to do some ugly stuff below because Windows is messy
* and we want to accomodate users using XAMPP for their development.
* Seriously though guys, you should consider using Vagrant instead.
*/
$dirname_no_slashes = str_replace(array('\\', '/'), '', dirname(__FILE__));
$plugindir_no_slashes = str_replace(array('\\', '/'), '', WP_PLUGIN_DIR);
$themedir_no_slashes = str_replace(array('\\', '/'), '', get_template_directory());
if (false !== strpos($dirname_no_slashes, $plugindir_no_slashes)) {
/**
* Kirki is activated as a plugin.
*/
Kirki::$url = plugin_dir_url(__FILE__);
} else {
if (false !== strpos($dirname_no_slashes, $themedir_no_slashes)) {
/**
* Kirki is embedded in a theme
*/
Kirki::$url = get_template_directory_uri() . str_replace(get_template_directory(), '', dirname(__FILE__));
}
}
return $kirki;
}
示例4: Kirki
/**
* Returns the Kirki object
*/
function Kirki()
{
// Make sure the class is instanciated
$kirki = Kirki_Toolkit::get_instance();
$kirki->font_registry = new Kirki_Fonts_Font_Registry();
$kirki->api = new Kirki();
$kirki->scripts = new Kirki_Scripts_Registry();
$kirki->styles = array('back' => new Kirki_Styles_Customizer(), 'front' => new Kirki_Styles_Frontend());
/**
* The path of the current Kirki instance
*/
Kirki::$path = dirname(__FILE__);
/**
* The URL of the current Kirki instance
*/
if (false !== strpos(dirname(__FILE__), WP_PLUGIN_DIR)) {
/**
* Kirki is activated as a plugin.
*/
Kirki::$url = plugin_dir_url(__FILE__);
} else {
if (false !== strpos(dirname(__FILE__), get_template_directory())) {
/**
* Kirki is embedded in a theme
*/
Kirki::$url = get_template_directory_uri() . str_replace(get_template_directory(), '', dirname(__FILE__));
}
}
/**
* Apply the filters to the Kirki::$url
*/
$config = apply_filters('kirki/config', array());
if (isset($config['url_path'])) {
Kirki::$url = esc_url_raw($config['url_path']);
}
return $kirki;
}
示例5: Kirki_l10n
if (class_exists('Kirki')) {
return;
}
// Include the autoloader.
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'autoloader.php';
// Gets an instance of the main Kirki object.
if (!function_exists('Kirki')) {
function Kirki()
{
$kirki = Kirki_Toolkit::get_instance();
return $kirki;
}
}
// Start Kirki.
global $kirki;
$kirki = Kirki();
// Make sure the path is properly set.
Kirki::$path = wp_normalize_path(dirname(__FILE__));
// Instantiate 2ndary classes.
new Kirki_l10n();
new Kirki_Scripts_Registry();
new Kirki_Styles_Customizer();
new Kirki_Styles_Frontend();
new Kirki_Selective_Refresh();
new Kirki();
// Include deprecated functions & methods.
include_once wp_normalize_path(dirname(__FILE__) . '/includes/deprecated.php');
// Include the ariColor library.
include_once wp_normalize_path(dirname(__FILE__) . '/includes/lib/class-aricolor.php');
// Add an empty config for global fields.
Kirki::add_config('');