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


PHP Utility::path方法代码示例

本文整理汇总了PHP中Utility::path方法的典型用法代码示例。如果您正苦于以下问题:PHP Utility::path方法的具体用法?PHP Utility::path怎么用?PHP Utility::path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utility的用法示例。


在下文中一共展示了Utility::path方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: admin_enqueue_scripts

 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 public static function admin_enqueue_scripts()
 {
     //wp_enqueue_style('select2', Utility::path( 'static/styles/fields/select2/select2.css', 'url' ), array(), '3.2');
     wp_enqueue_style('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css', array(), false);
     wp_enqueue_style('uisf-select-advanced', Utility::path('static/styles/fields/select-advanced.css', 'url'), array(), false);
     wp_register_script('select2', Utility::path('static/scripts/fields/select2/select2.js', 'url'), array(), false, true);
     //wp_register_script('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/js/select2.js', array('jquery'), false, true);
     wp_enqueue_script('uisf-select-advanced', Utility::path('static/scripts/fields/select-advanced.js', 'url'), array('select2'), false, true);
 }
开发者ID:JSpier,项目名称:smacamp,代码行数:14,代码来源:class-select-advanced.php

示例2: display

 /**
  *
  */
 public function display()
 {
     if (empty($this->fields)) {
         return;
     }
     $path = apply_filters('wplt:filter:template', Utility::path('static/views/filter.php', 'dir'), array($this->name, $this->map, $this->fields));
     if (file_exists($path)) {
         echo "<div class=\"wplt-filter\" data-for=\"{$this->name}\">";
         include $path;
         echo "</div>";
     }
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:15,代码来源:class-filter.php

示例3: admin_enqueue_scripts

 /**
  * Enqueue scripts and styles
  *
  * @return    void
  */
 public static function admin_enqueue_scripts()
 {
     wp_register_style('jquery-ui-core', Utility::path("static/styles/fields/jqueryui/jquery.ui.core.css", 'url'), array(), '1.8.17');
     wp_register_style('jquery-ui-theme', Utility::path("static/styles/fields/jqueryui/jquery.ui.theme.css", 'url'), array(), '1.8.17');
     wp_register_style('jquery-ui-datepicker', Utility::path("static/styles/fields/jqueryui/jquery.ui.datepicker.css", 'url'), array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
     wp_register_style('jquery-ui-slider', Utility::path("static/styles/fields/jqueryui/jquery.ui.slider.css", 'url'), array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
     wp_enqueue_style('jquery-ui-timepicker', Utility::path("static/styles/fields/jqueryui/jquery-ui-timepicker-addon.min.css", 'url'), array('jquery-ui-datepicker', 'jquery-ui-slider'), '1.5.0');
     wp_register_script('jquery-ui-timepicker', Utility::path("static/scripts/fields/jqueryui/jquery-ui-timepicker-addon.min.js", 'url'), array('jquery-ui-datepicker', 'jquery-ui-slider'), '1.5.0', true);
     /**
      * Localization
      * Use 1 minified JS file which contains all languages for simpilicity (in version < 4.4.2 we use separated JS files).
      * The language is set in Javascript
      *
      * Note: we use full locale (de-DE) and fallback to short locale (de)
      */
     $locale = str_replace('_', '-', get_locale());
     $locale_short = substr($locale, 0, 2);
     wp_register_script('jquery-ui-timepicker-i18n', Utility::path("static/scripts/fields/jqueryui/jquery-ui-timepicker-addon-i18n.min.js", 'url'), array('jquery-ui-timepicker'), '1.5.0', true);
     wp_enqueue_script('uisf-time', Utility::path('static/scripts/fields/time.js', 'url'), array('jquery-ui-timepicker-i18n'), false, true);
     wp_localize_script('uisf-time', 'uisf_timepicker', array('locale' => $locale, 'localeShort' => $locale_short));
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:26,代码来源:class-time.php

示例4: admin_enqueue_scripts

 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 public static function admin_enqueue_scripts()
 {
     wp_register_style('jquery-ui-core', Utility::path("static/styles/fields/jqueryui/jquery.ui.core.css", 'url'), array(), '1.8.17');
     wp_register_style('jquery-ui-theme', Utility::path("static/styles/fields/jqueryui/jquery.ui.theme.css", 'url'), array(), '1.8.17');
     wp_register_style('jquery-ui-datepicker', Utility::path("static/styles/fields/jqueryui/jquery.ui.datepicker.css", 'url'), array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
     wp_register_style('jquery-ui-slider', Utility::path("static/styles/fields/jqueryui/jquery.ui.slider.css", 'url'), array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
     wp_enqueue_style('jquery-ui-timepicker', Utility::path("static/styles/fields/jqueryui/jquery-ui-timepicker-addon.min.css", 'url'), array('jquery-ui-datepicker', 'jquery-ui-slider'), '1.5.0');
     wp_register_script('jquery-ui-timepicker', Utility::path("static/scripts/fields/jqueryui/jquery-ui-timepicker-addon.min.js", 'url'), array('jquery-ui-datepicker', 'jquery-ui-slider'), '1.5.0', true);
     /**
      * Localization
      * Use 1 minified JS file for timepicker which contains all languages for simpilicity (in version < 4.4.2 we use separated JS files).
      * The language is set in Javascript
      *
      * Note: we use full locale (de-DE) and fallback to short locale (de)
      */
     $locale = str_replace('_', '-', get_locale());
     $locale_short = substr($locale, 0, 2);
     wp_register_script('jquery-ui-timepicker-i18n', Utility::path("static/scripts/fields/jqueryui/jquery-ui-timepicker-addon-i18n.min.js", 'url'), array('jquery-ui-timepicker'), '1.5.0', true);
     $date_paths = array('jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js');
     if (strlen($locale) > 2) {
         // Also check alternate i18n filenames
         // (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
         $date_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr($locale, 0, 2) . '.js';
     }
     $deps = array('jquery-ui-timepicker-i18n');
     foreach ($date_paths as $date_path) {
         $path = Utility::path('static/scripts/fields/' . $date_path, 'dir');
         if (file_exists($path)) {
             wp_register_script('jquery-ui-datepicker-i18n', Utility::path('static/scripts/fields/' . $date_path, 'url'), array('jquery-ui-datepicker'), '1.8.17', true);
             $deps[] = 'jquery-ui-datepicker-i18n';
             break;
         }
     }
     wp_enqueue_script('rwmb-datetime', Utility::path('static/scripts/fields/datetime.js', 'url'), $deps, false, true);
     wp_localize_script('rwmb-datetime', 'uisf_datetimepicker', array('locale' => $locale, 'localeShort' => $locale_short));
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:41,代码来源:class-datetime.php

示例5: admin_enqueue_scripts

 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 public static function admin_enqueue_scripts()
 {
     wp_register_style('jquery-ui-core', Utility::path("static/styles/fields/jqueryui/jquery.ui.core.css", 'url'), array(), '1.8.17');
     wp_register_style('jquery-ui-theme', Utility::path("static/styles/fields/jqueryui/jquery.ui.theme.css", 'url'), array(), '1.8.17');
     wp_enqueue_style('jquery-ui-datepicker', Utility::path("static/styles/fields/jqueryui/jquery.ui.datepicker.css", 'url'), array('jquery-ui-core', 'jquery-ui-theme'), '1.8.17');
     // Load localized scripts
     $locale = str_replace('_', '-', get_locale());
     $file_paths = array('jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js');
     // Also check alternate i18n filename (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
     if (strlen($locale) > 2) {
         $file_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr($locale, 0, 2) . '.js';
     }
     $deps = array('jquery-ui-datepicker');
     foreach ($file_paths as $file_path) {
         $path = Utility::path('static/scripts/fields/' . $file_path, 'dir');
         if (file_exists($path)) {
             $path = Utility::path('static/scripts/fields/' . $file_path, 'dir');
             wp_register_script('jquery-ui-datepicker-i18n', Utility::path('static/scripts/fields/' . $file_path, 'url'), $deps, '1.8.17', true);
             $deps[] = 'jquery-ui-datepicker-i18n';
             break;
         }
     }
     wp_enqueue_script('uisf-date', Utility::path('static/scripts/fields/date.js', 'url'), $deps, false, true);
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:29,代码来源:class-date.php

示例6: __construct

 /**
  * REQUIRED. Set up a constructor that references the parent constructor. We
  * use the parent reference to set some default configs.
  * @param array $args
  */
 public function __construct($args = array())
 {
     if (function_exists('get_current_screen')) {
         $screen = get_current_screen();
     }
     //Set parent defaults
     parent::__construct($args = wp_parse_args($args, array('singular' => '', 'plural' => '', 'ajax' => true, 'per_page' => 20, 'post_type' => isset($screen) && is_object($screen) ? $screen->id : false, 'screen' => isset($screen) && is_object($screen) ? $screen->id : false, 'post_status' => 'any', 'paged' => 1, 'orderby' => 'menu_order title', 'order' => 'asc', 'options' => array(), 'name' => false, 'extra' => array(), 'query' => array(), 'query2' => array())));
     foreach ($args as $k => $v) {
         // May be setup value from Request
         if (isset($_REQUEST[$k])) {
             $args[$k] = $_REQUEST[$k];
         }
         switch ($k) {
             case 'screen':
                 // Do Nothing!
                 break;
             case 'options':
                 $this->options = wp_parse_args($args['options'], array('show_filter' => false, 'show_bulk_actions' => true, 'show_pagination' => true));
                 break;
                 /* Filter Query ( Used by ajax requests ) */
             /* Filter Query ( Used by ajax requests ) */
             case 'query2':
                 $this->query2 = $this->parse_query($v);
                 break;
                 /* Per Page */
             /* Per Page */
             case 'per_page':
                 /** This filter is documented in wp-admin/includes/post.php */
                 $this->per_page = apply_filters('edit_posts_per_page', $v, isset($args['post_type']) ? $args['post_type'] : false);
                 break;
                 /* Set order params in $_GET (required to have working ordering) */
             /* Set order params in $_GET (required to have working ordering) */
             case 'order':
             case 'orderby':
                 $_GET[$k] = $v;
             default:
                 $this->{$k} = $v;
                 break;
         }
     }
     if (!$this->name) {
         $this->name = $this->post_type . '_' . rand(1001, 9999);
     }
     wp_enqueue_style('list-table-ajax', Utility::path('static/styles/wp-list-table.css', 'url'));
     wp_enqueue_script('list-table-ajax', Utility::path('static/scripts/wp-list-table.js', 'url'), array('jquery'));
     wp_localize_script('list-table-ajax', '__wplt', array('spinner_url' => Utility::path('static/images/ajax-loader.gif', 'url')));
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:52,代码来源:class-wp-list-table.php

示例7: admin_enqueue_scripts

 /**
  * Enqueue scripts and styles
  *
  * @return void
  */
 public static function admin_enqueue_scripts()
 {
     wp_enqueue_style('uisf-select', Utility::path('static/styles/fields/select.css', 'url'), array(), false);
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:9,代码来源:class-select.php


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