-
Notifications
You must be signed in to change notification settings - Fork 1
/
pdf-gen.php
42 lines (36 loc) · 1002 Bytes
/
pdf-gen.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Plugin Name: Wordpress PDF Generator
* Description: Programmatically Generate PDF Documents, Supports custom variables, templates, REST API
* Plugin URI: https://wwww.dornaweb.com
* Version: 1.0
* Author: Dornaweb
* Author URI: https://wwww.dornaweb.com
* License: GPL
* Text Domain: wp-pdf-gen
* Domain Path: /languages
*/
defined('ABSPATH') || exit;
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
if (! defined('WP_PDFGEN_FILE')) {
define('WP_PDFGEN_FILE', __FILE__);
}
/**
* Load core packages and the autoloader.
* The SPL Autoloader needs PHP 5.6.0+ and this plugin won't work on older versions
*/
if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
require __DIR__ . '/includes/class-autoloader.php';
}
/**
* Returns the main instance of PDF Gen.
*
* @since 1.0
* @return WP_PDFGEN\App
*/
function wp_pdfgen() {
return WP_PDFGEN\App::instance();
}
// Global for backwards compatibility.
$GLOBALS['wp_pdfgen'] = wp_pdfgen();