drag-n-drop-upload-cf7-pro.php
1.77 KB
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
54
55
56
<?php
/**
* Plugin Name: Drag and Drop Multiple File Upload PRO - Contact Form 7
* Plugin URI: https://profiles.wordpress.org/glenwpcoder
* Description: This simple plugin create Drag & Drop or choose Multiple File upload in your Confact Form 7 Forms.
* Text Domain: dnd-upload-cf7
* Domain Path: /languages
* Version: 2.11.1
* Author: CodeDropz
* Author URI: http://codedropz.com
* License: GPL2
**/
/** This protect the plugin file from direct access */
if ( ! defined( 'WPINC' ) ) {
die;
}
/** Set plugin constant to true **/
define( 'dnd_upload_cf7', true );
define( 'dnd_upload_cf7_PRO', true );
/** Define plugin Version */
define( 'dnd_upload_cf7_version', '2.11.1' );
/** Define constant Plugin Directories */
define( 'dnd_upload_cf7_directory', untrailingslashit( dirname( __FILE__ ) ) );
/** Define constant Plugin Path */
if( ! defined('wp_dndcf7_upload_folder') ) {
define( 'wp_dndcf7_upload_folder', 'wpcf7_drag-n-drop_uploads' );
}
/** Define constant Temporary Folder */
if( ! defined('wp_dndcf7_tmp_folder') ) {
define( 'wp_dndcf7_tmp_folder', 'tmp_uploads' );
}
// require plugin core file
require_once( wp_normalize_path( dnd_upload_cf7_directory .'/inc/dnd-upload-cf7.php' ) );
// include plugin update checker
require_once( wp_normalize_path( dnd_upload_cf7_directory .'/inc/admin/updates.php' ) );
// Autoload class
spl_autoload_register( function( $class_name ){
$class = str_replace('CodeDropz_Uploader_', '', $class_name );
$path = wp_normalize_path( dnd_upload_cf7_directory .'/inc/classes/'. strtolower( $class ) .'.php' ) ;
if( file_exists( $path ) ){
require $path;
}
});
// Activation & Deactivation
register_deactivation_hook( __FILE__, 'dndmfu_cf7_deactivate' );