-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlazy-load-for-comments.php
executable file
·82 lines (73 loc) · 2.67 KB
/
lazy-load-for-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
<?php
/**
* Plugin Name: Lazy Load for Comments
* Plugin URI: https://wordpress.org/plugins/lazy-load-for-comments
* Description: Lazy Load default WordPress comments. Load comments only after user clicking on a button or scrolling down. It saves page load time.
* Version: 1.0.10
* Author: Joel James
* Author URI: https://duckdev.com/
* Donate link: https://paypal.me/JoelCJ
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: lazy-load-for-comments
* Domain Path: /languages
*
* Comment is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* any later version.
*
* Comment is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Comment. If not, see <http://www.gnu.org/licenses/>.
*
* @category Core
* @package LLC
* @author Joel James <[email protected]>
* @license http://www.gnu.org/licenses/ GNU General Public License
* @link https://wordpress.org/plugins/lazy-load-for-comments
*/
// If this file is called directly, abort.
defined( 'WPINC' ) or die( 'Damn it.! Dude you are looking for what?' );
if ( ! class_exists( 'Lazy_Load_Comments' ) ) {
// Constants array
$constants = array(
'LLC_NAME' => 'lazy-load-for-comments',
'LLC_DOMAIN' => 'lazy-load-for-comments',
'LLC_VERSION' => '1.0.10',
'LLC_PATH' => plugins_url( '', __FILE__ ),
'LLC_PLUGIN_DIR' => dirname( __FILE__ ),
'LLC_PERMISSION' => 'manage_options'
);
foreach ( $constants as $constant => $value ) {
// Set constants if not set already.
if ( ! defined( $constant ) ) {
define( $constant, $value );
}
}
// The core plugin class that is used to define.
// dashboard-specific hooks, and public-facing site hooks.
require_once plugin_dir_path( __FILE__ ) . 'includes/class-lazy-load-comments.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
* @access public
*
* @return void
*/
function llc_run_plugin() {
$plugin = new Lazy_Load_Comments();
$plugin->run();
}
llc_run_plugin();
}
//*** Thank you for your interest in Lazy Load Comments - Developed and managed by Joel James ***//