-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple-contact-form.php
58 lines (49 loc) · 1.28 KB
/
simple-contact-form.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
54
55
56
57
58
<?php
/**
* Simple Contact Form Plugin
*
* @package Simple Contact Form
* @author Loïc Blascos
*
* @wordpress-plugin
* Plugin Name: Simple Contact Form
* Description: A simple contact form
* Version: 1.0.0
* Author: Loïc Blascos
* Text Domain: simple-contact-form
* Domain Path: /languages
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'SCF_VERSION', '1.0.0' );
define( 'SCF_NAME', 'Simple Contact Form' );
define( 'SCF_BASE', plugin_basename( __FILE__ ) );
define( 'SCF_PATH', plugin_dir_path( __FILE__ ) );
define( 'SCF_URL', plugin_dir_url( __FILE__ ) );
/**
* Load plugin text domain for translations.
*
* @since 1.0.0
*/
function simple_contact_form_textdomain() {
load_plugin_textdomain(
'simple-contact-form',
false,
basename( dirname( __FILE__ ) ) . '/languages'
);
// Translate Plugin Description.
__( 'A simple contact form', 'simple-contact-form' );
}
add_action( 'plugins_loaded', 'simple_contact_form_textdomain' );
// Compatibility class.
$compat = require_once SCF_PATH . 'compatibility.php';
// If compatibility issue.
if ( ! $compat->check() ) {
return;
}
// Initialize plugin.
require_once SCF_PATH . 'initialize.php';