-
Notifications
You must be signed in to change notification settings - Fork 4
/
contact-form-submissions.php
46 lines (40 loc) · 1.24 KB
/
contact-form-submissions.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
<?php
/*
Plugin Name: Contact Form Submissions
Description: Never miss an enquiry again! Save all Contact Form 7 submissions in your database.
Version: 1.6.1
Author: Jason Green
License: GPLv3
Domain Path: /languages
Text Domain: contact-form-submissions
*/
define('WPCF7S_DIR', realpath(dirname(__FILE__)));
define('WPCF7S_FILE', 'contact-form-submissions/contact-form-submissions.php');
require_once WPCF7S_DIR . '/Submissions.php';
require_once WPCF7S_DIR . '/Admin.php';
/**
* Save the WPCF7Submissions class for later
*/
function contact_form_submissions_init()
{
global $contact_form_submissions;
$contact_form_submissions = new WPCF7Submissions();
}
add_action('init', 'contact_form_submissions_init', 9);
/**
* Save the WPCF7SAdmin class for later
*/
function contact_form_submissions_admin_init()
{
global $contact_form_submissions_admin;
$contact_form_submissions_admin = new WPCF7SAdmin();
}
add_action('admin_init', 'contact_form_submissions_admin_init');
/**
* Load language file
*/
function contact_form_submissions_textdomain()
{
load_plugin_textdomain('contact-form-submissions', false, basename( dirname( __FILE__ ) ) . '/languages/');
}
add_action('plugins_loaded', 'contact_form_submissions_textdomain');