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


PHP vc_upload_dir函数代码示例

本文整理汇总了PHP中vc_upload_dir函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_upload_dir函数的具体用法?PHP vc_upload_dir怎么用?PHP vc_upload_dir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: uploadURL

 /**
  * @return string
  */
 public static function uploadURL()
 {
     $upload_dir = wp_upload_dir();
     return $upload_dir['baseurl'] . vc_upload_dir();
 }
开发者ID:iq007,项目名称:MadScape,代码行数:8,代码来源:class-vc-settings.php

示例2: frontCss

 /**
  * Register front css styles.
  *
  * Calls wp_register_style for required css libraries files.
  *
  * @since  3.1
  * @access public
  */
 public function frontCss()
 {
     wp_register_style('isotope-css', vc_asset_url('css/lib/isotope.css'), false, WPB_VC_VERSION, 'all');
     $front_css_file = vc_asset_url('css/js_composer.css');
     $upload_dir = wp_upload_dir();
     if (vc_settings()->get('use_custom') == '1' && is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css')) {
         $front_css_file = $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css';
         // fix @since 4.4, todo review it.
         $front_css_file = str_replace(array('http://', 'https://'), '//', $front_css_file);
     }
     wp_register_style('js_composer_front', $front_css_file, false, WPB_VC_VERSION, 'all');
     $custom_css_path = $upload_dir['basedir'] . '/' . vc_upload_dir() . '/custom.css';
     if (is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/custom.css')) {
         $custom_css_url = $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/custom.css';
         // @todo fix file_get_content()
         if (strlen(trim(vc_file_get_contents($custom_css_path))) > 0) {
             $custom_css_url = str_replace(array('http://', 'https://'), '//', $custom_css_url);
             wp_register_style('js_composer_custom_css', $custom_css_url, array(), WPB_VC_VERSION, 'screen');
         }
     }
     add_action('wp_enqueue_scripts', array(&$this, 'enqueueStyle'));
     /**
      * @since 4.4
      */
     do_action('vc_base_register_front_css');
     // add_action( 'wp_head', array( &$this, 'addShortcodesCustomCss' ), 1000 );
 }
开发者ID:polaris610,项目名称:medicalhound,代码行数:35,代码来源:class-vc-base.php

示例3: frontCss

 /**
  * Register front css styles.
  *
  * Calls wp_register_style for required css libraries files.
  *
  * @since  3.1
  * @access public
  */
 public function frontCss()
 {
     wp_register_style('flexslider', vc_asset_url('lib/bower/flexslider/flexslider.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('nivo-slider-css', vc_asset_url('lib/bower/nivoslider/nivo-slider.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('nivo-slider-theme', vc_asset_url('lib/bower/nivoslider/themes/default/default.css'), array('nivo-slider-css'), WPB_VC_VERSION, 'screen');
     wp_register_style('prettyphoto', vc_asset_url('lib/prettyphoto/css/prettyPhoto.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('isotope-css', vc_asset_url('css/lib/isotope.css'), false, WPB_VC_VERSION, 'all');
     wp_register_style('font-awesome', vc_asset_url('lib/bower/font-awesome/css/font-awesome.min.css'), false, WPB_VC_VERSION, 'screen');
     $front_css_file = vc_asset_url('css/js_composer.min.css');
     $upload_dir = wp_upload_dir();
     if ('1' === vc_settings()->get('use_custom') && is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css')) {
         $front_css_file = $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css';
         // fix @since 4.4, TODO: review it.
         $front_css_file = str_replace(array('http://', 'https://'), '//', $front_css_file);
     }
     wp_register_style('js_composer_front', $front_css_file, false, WPB_VC_VERSION, 'all');
     $custom_css_path = $upload_dir['basedir'] . '/' . vc_upload_dir() . '/custom.css';
     if (is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/custom.css')) {
         $custom_css_url = $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/custom.css';
         // TODO: fix file_get_content()
         if (strlen(trim(vc_file_get_contents($custom_css_path))) > 0) {
             $custom_css_url = str_replace(array('http://', 'https://'), '//', $custom_css_url);
             wp_register_style('js_composer_custom_css', $custom_css_url, array(), WPB_VC_VERSION, 'screen');
         }
     }
     add_action('wp_enqueue_scripts', array(&$this, 'enqueueStyle'));
     /**
      * @since 4.4
      */
     do_action('vc_base_register_front_css');
 }
开发者ID:hikaram,项目名称:wee,代码行数:39,代码来源:class-vc-base.php

示例4: frontCss

 /**
  * Register front css styles.
  *
  * Calls wp_register_style for required css libraries files.
  *
  * @since  3.1
  * @access public
  */
 public function frontCss()
 {
     //wp_register_style( 'bootstrap', vc_asset_url( 'bootstrap/css/bootstrap.css' ), false, WPB_VC_VERSION, 'screen' );
     wp_register_style('flexslider', vc_asset_url('lib/flexslider/flexslider.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('nivo-slider-css', vc_asset_url('lib/nivoslider/nivo-slider.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('nivo-slider-theme', vc_asset_url('lib/nivoslider/themes/default/default.css'), array('nivo-slider-css'), WPB_VC_VERSION, 'screen');
     wp_register_style('prettyphoto', vc_asset_url('lib/prettyphoto/css/prettyPhoto.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('isotope-css', vc_asset_url('css/isotope.css'), false, WPB_VC_VERSION, 'all');
     $front_css_file = vc_asset_url('css/js_composer_front.css');
     $upload_dir = wp_upload_dir();
     if (vc_settings()->get('use_custom') == '1' && is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css')) {
         $front_css_file = $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css';
     }
     wp_register_style('js_composer_front', $front_css_file, false, WPB_VC_VERSION, 'all');
     if (is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/custom.css')) {
         wp_register_style('js_composer_custom_css', $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/custom.css', array('js_composer_front'), WPB_VC_VERSION, 'screen');
     }
 }
开发者ID:scottnkerr,项目名称:eeco,代码行数:26,代码来源:class-vc-base.php

示例5: frontCss

 /**
  * Register front css styles.
  *
  * Calls wp_register_style for required css libraries files.
  *
  * @since  3.1
  * @access public
  */
 public function frontCss()
 {
     wp_register_style('flexslider', vc_asset_url('lib/flexslider/flexslider.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('nivo-slider-css', vc_asset_url('lib/nivoslider/nivo-slider.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('nivo-slider-theme', vc_asset_url('lib/nivoslider/themes/default/default.css'), array('nivo-slider-css'), WPB_VC_VERSION, 'screen');
     wp_register_style('prettyphoto', vc_asset_url('lib/prettyphoto/css/prettyPhoto.css'), false, WPB_VC_VERSION, 'screen');
     wp_register_style('isotope-css', vc_asset_url('css/lib/isotope.css'), false, WPB_VC_VERSION, 'all');
     $front_css_file = vc_asset_url('css/js_composer.css');
     $upload_dir = wp_upload_dir();
     if (vc_settings()->get('use_custom') == '1' && is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css')) {
         $front_css_file = $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/js_composer_front_custom.css';
     }
     wp_register_style('js_composer_front', $front_css_file, false, WPB_VC_VERSION, 'all');
     if (is_file($upload_dir['basedir'] . '/' . vc_upload_dir() . '/custom.css')) {
         wp_register_style('js_composer_custom_css', $upload_dir['baseurl'] . '/' . vc_upload_dir() . '/custom.css', array(), WPB_VC_VERSION, 'screen');
     }
     $post = get_post();
     add_action('wp_enqueue_scripts', array(&$this, 'enqueueStyle'));
     // add_action( 'wp_head', array( &$this, 'addShortcodesCustomCss' ), 1000 );
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:28,代码来源:class-vc-base.php

示例6: frontCss

 /**
  * Register front css styles.
  *
  * Calls wp_register_style for required css libraries files.
  *
  * @since  3.1
  * @access public
  */
 public function frontCss()
 {
     wp_register_style('flexslider', vc_asset_url('lib/bower/flexslider/flexslider.min.css'), array(), WPB_VC_VERSION);
     wp_register_style('nivo-slider-css', vc_asset_url('lib/bower/nivoslider/nivo-slider.min.css'), array(), WPB_VC_VERSION);
     wp_register_style('nivo-slider-theme', vc_asset_url('lib/bower/nivoslider/themes/default/default.min.css'), array('nivo-slider-css'), WPB_VC_VERSION);
     wp_register_style('prettyphoto', vc_asset_url('lib/prettyphoto/css/prettyPhoto.min.css'), array(), WPB_VC_VERSION);
     wp_register_style('isotope-css', vc_asset_url('css/lib/isotope.min.css'), array(), WPB_VC_VERSION);
     /* nectar addition */
     //wp_register_style( 'font-awesome', vc_asset_url( 'lib/bower/font-awesome/css/font-awesome.min.css' ), array(), WPB_VC_VERSION );
     /* nectar addition end */
     $front_css_file = vc_asset_url('css/js_composer.min.css');
     $upload_dir = wp_upload_dir();
     $vc_upload_dir = vc_upload_dir();
     if ('1' === vc_settings()->get('use_custom') && is_file($upload_dir['basedir'] . '/' . $vc_upload_dir . '/js_composer_front_custom.css')) {
         $front_css_file = $upload_dir['baseurl'] . '/' . $vc_upload_dir . '/js_composer_front_custom.css';
         $front_css_file = vc_str_remove_protocol($front_css_file);
     }
     wp_register_style('js_composer_front', $front_css_file, array(), WPB_VC_VERSION);
     $custom_css_path = $upload_dir['basedir'] . '/' . $vc_upload_dir . '/custom.css';
     if (is_file($upload_dir['basedir'] . '/' . $vc_upload_dir . '/custom.css') && filesize($custom_css_path) > 0) {
         $custom_css_url = $upload_dir['baseurl'] . '/' . $vc_upload_dir . '/custom.css';
         $custom_css_url = vc_str_remove_protocol($custom_css_url);
         wp_register_style('js_composer_custom_css', $custom_css_url, array(), WPB_VC_VERSION);
     }
     add_action('wp_enqueue_scripts', array(&$this, 'enqueueStyle'));
     /**
      * @since 4.4
      */
     do_action('vc_base_register_front_css');
 }
开发者ID:JPodz,项目名称:harlequinnejuice,代码行数:38,代码来源:class-vc-base.php


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