本文整理汇总了PHP中PDF_Common::get_site_name方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF_Common::get_site_name方法的具体用法?PHP PDF_Common::get_site_name怎么用?PHP PDF_Common::get_site_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF_Common
的用法示例。
在下文中一共展示了PDF_Common::get_site_name方法的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/';
}