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


PHP PDF_Common::get_upload_dir方法代码示例

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


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

示例1: set_directory_structure

 /**
  * Used to set up our PDF template folder, 
  * save folder and font folder
  */
 public function set_directory_structure()
 {
     $upload_dir = PDF_Common::get_upload_dir();
     $site_name = PDF_Common::get_site_name();
     /*
      * As of Gravity PDF 3.7 we'll be dropping the 'site_name' folder for single installs 
      * And changing multisite installs to their site ID         
      */
     $this->template_location = apply_filters('gfpdfe_template_location', $upload_dir['basedir'] . '/' . PDF_SAVE_FOLDER . '/', $upload_dir['basedir'], PDF_SAVE_FOLDER);
     $this->template_site_location = $this->template_location;
     $this->template_save_location = $this->template_location . 'output/';
     $this->template_font_location = $this->template_location . 'fonts/';
     $this->template_location_url = apply_filters('gfpdfe_template_location_uri', $upload_dir['baseurl'] . '/' . PDF_SAVE_FOLDER . '/', $upload_dir['baseurl'], PDF_SAVE_FOLDER);
     $this->template_site_location_url = $this->template_location_url;
     $this->template_save_location_url = $this->template_location_url . 'output/';
     $this->template_font_location_url = $this->template_location_url . 'fonts/';
     $this->old_3_6_template_site_location = $this->template_location . $site_name . '/';
     /*
      * Use the network ID for multisite installs 
      */
     if (is_multisite()) {
         $blog_id = get_current_blog_id();
         $this->template_site_location = $this->template_location . $blog_id . '/';
         $this->template_save_location = $this->template_site_location . 'output/';
         $this->template_font_location = $this->template_site_location . 'fonts/';
         $this->template_site_location_url = $this->template_location_url . $blog_id . '/';
         $this->template_save_location_url = $this->template_site_location_url . 'output/';
         $this->template_font_location_url = $this->template_site_location_url . 'fonts/';
         $this->old_3_6_template_site_location = $this->template_location . $site_name . '/';
     }
     /*
      * Include old template locations to help with migrations 
      */
     $this->old_template_location = get_stylesheet_directory() . '/' . PDF_SAVE_FOLDER . '/';
     $this->upload_dir = $upload_dir['basedir'];
     /*
      * Include relative paths for display on the support pages 
      */
     $this->relative_output_location = str_replace(ABSPATH, '/', $this->template_save_location);
     $this->relative_font_location = str_replace(ABSPATH, '/', $this->template_font_location);
     $this->relative_mpdf_tmp = str_replace(ABSPATH, '/', PDF_PLUGIN_DIR) . 'mPDF/tmp/';
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:46,代码来源:data.php


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