-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdf-shortcode.php
42 lines (36 loc) · 992 Bytes
/
pdf-shortcode.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: WP2PDF Shortcode
* Plugin URI: https://github.com/jvarn/pdf-shortcode
* Description: Inserts a button to save WordPress content to PDF, including Pages and Formidable Forms Views.
* Version: 0.5.7
* Author: Jeremy Varnham
* Author URI: https://abuyasmeen.com/
*
* @package jvarn\pdf-shortcode
*/
namespace Jvarn;
/**
* No direct access.
*/
if ( ! defined( 'ABSPATH' ) ) {
wp_die();
}
/**
* Define plugin constants.
*/
define( 'WP_FFVIEW_PDF_PATH', plugin_dir_path( __FILE__ ) );
define( 'WP_FFVIEW_PDF_DIR', dirname( plugin_basename( __FILE__ ) ) );
/**
* Load plugin textdomain.
*/
function load_textdomain() {
load_plugin_textdomain( 'pdfshortcode', false, WP_FFVIEW_PDF_DIR . '/languages' );
}
add_action( 'init', 'Jvarn\load_textdomain' );
/**
* Composer autoloader.
*/
require_once WP_FFVIEW_PDF_PATH . 'vendor/autoload.php';
$pdf_shortcode = new PdfShortcode\Shortcode();
$pdf_shortcode_settings = new PdfShortcode\Settings();