当前位置: 首页>>代码示例>>PHP>>正文


PHP Kirki::path方法代码示例

本文整理汇总了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;
 }
开发者ID:quintenm,项目名称:maresthema-2016,代码行数:11,代码来源:kirki.php

示例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;
 }
开发者ID:TheSkin,项目名称:skin-toolkit-plugin,代码行数:17,代码来源:kirki.php

示例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;
 }
开发者ID:paulosicherl,项目名称:kirki,代码行数:41,代码来源:kirki.php

示例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;
 }
开发者ID:ZmagoD,项目名称:kirki,代码行数:40,代码来源:kirki.php

示例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('');
开发者ID:pagelab,项目名称:kirki,代码行数:31,代码来源:kirki.php


注:本文中的Kirki::path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。