forked from GravityKit/GravityExport-Lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gfexcel.php
53 lines (42 loc) · 1.32 KB
/
gfexcel.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
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Plugin Name: Gravity Forms Entries in Excel
* Version: 1.8.12
* Plugin URI: https://gfexcel.com
* Description: Export all Gravity Forms entries to Excel (.xlsx) or CSV via a secret shareable URL.
* Author: GravityView
* Author URI: https://gravityview.co/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: gf-entries-in-excel
* Domain Path: /languages
*
* @package GFExcel
*/
defined('ABSPATH') or die('No direct access!');
use GFExcel\GFExcel;
use GFExcel\GFExcelAdmin;
if (!defined('GFEXCEL_PLUGIN_FILE')) {
define('GFEXCEL_PLUGIN_FILE', __FILE__);
}
add_action('gform_loaded', static function () {
if (!class_exists('GFForms')) {
return '';
}
if (!class_exists('GFExport')) {
require_once(GFCommon::get_base_path() . '/export.php');
}
$autoload = __DIR__ . '/vendor/autoload.php';
if (file_exists($autoload)) {
require_once($autoload);
}
load_plugin_textdomain('gf-entries-in-excel', false, basename(__DIR__) . '/languages');
if (!method_exists('GFForms', 'include_addon_framework')) {
return false;
}
GFAddOn::register(GFExcelAdmin::class);
do_action('gfexcel_loaded');
if (!is_admin()) {
new GFExcel();
}
});