-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathinline-comments.php
83 lines (65 loc) · 2.29 KB
/
inline-comments.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/*
Plugin Name: Inline Comments
Plugin URI: http://kevinw.de/inline-comments/
Description: Inline Comments adds your comment system to the side of paragraphs and other sections (like headlines and images) of your post. It performs native with WordPress comments.
Author: Kevin Weber
Version: 2.3
Author URI: http://kevinw.de/
License: GPL v3
Text Domain: inline-comments
Domain Path: /languages/
*/
if ( !defined( 'INCOM_VERSION' ) ) {
define( 'INCOM_VERSION', '2.3' );
}
if ( !defined( 'INCOM_VERSION_NAME' ) ) {
define( 'INCOM_VERSION_NAME', 'Essential' );
}
if ( !defined( 'INCOM_ESSENTIAL' ) ) {
define( 'INCOM_ESSENTIAL', true ); // Should be false if this is the 'Lifetime' version
}
if ( !defined( 'INCOM_OPTION_KEY' ) ) {
define( 'INCOM_OPTION_KEY', 'incom' ); // used to save options in version >= 0.9.0
}
if ( !defined( 'INCOM_TD' ) ) {
define( 'INCOM_TD', 'inline-comments' ); // = text domain (used for translations)
}
if ( !defined( 'INCOM_FILE' ) ) {
define( 'INCOM_FILE', __FILE__ );
}
if ( !defined( 'INCOM_PATH' ) ) {
define( 'INCOM_PATH', plugin_dir_path( INCOM_FILE ) );
}
if ( !defined( 'INCOM_URL' ) ) {
define( 'INCOM_URL', plugin_dir_url( __FILE__ ) );
}
/**
* Load plugin textdomain.
* @since 2.0
*/
function incom_load_textdomain() {
load_plugin_textdomain( 'inline-comments', false, dirname( plugin_basename( INCOM_FILE ) ) . '/languages/' );
}
add_action( 'plugins_loaded', INCOM_OPTION_KEY.'_load_textdomain' );
define( 'INCOM_NEWS_TEXT', 'To suggest and vote for new features: Let the developer come into contact with you.' );
define( 'INCOM_NEWS_BUTTON', 'Get contacted' );
require_once( INCOM_PATH . 'inc/class-register.php' );
function incom_admin_init() {
require_once( INCOM_PATH . 'admin/class-admin-options.php' );
require_once( INCOM_PATH . 'admin/class-meta.php' );
}
function incom_frontend_init() {
require_once( INCOM_PATH . 'frontend/class-frontend.php' );
}
if ( is_admin() ) {
add_action( 'plugins_loaded', 'incom_admin_init', 15 );
}
else {
add_action( 'plugins_loaded', 'incom_frontend_init', 15 );
}
// Feature: Support for WP-Ajaxify-Comments
if ( (get_option( INCOM_OPTION_KEY.'_support_for_ajaxify_comments' ) == true) && !is_admin() ) {
require_once( INCOM_PATH . 'frontend/inc/class-wpac.php');
}
/***** Plugin by Kevin Weber || kevinw.de *****/