-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean-wordpress.php
53 lines (45 loc) · 1.21 KB
/
clean-wordpress.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
<?php
/**
* Plugin Name: Clean WordPress
*
* Description: Remove unnecessary metatags informations from head tag, close DB connections, and more.
* Author: Achraf Chouk <[email protected]>
* Version: 1.3.6 ~ "Sogeking no shima deeeeeee - One Piece"
*
* Author URI: https://github.com/crewstyle
* Plugin URI: https://github.com/crewstyle/clean-wordpress
* License: The MIT License (MIT)
* License URI: http://opensource.org/licenses/MIT
*/
/**
*
* @author Achraf Chouk <[email protected]>
* @copyright Copyright (c) 20xx, Achraf Chouk.
* @license MIT
* @package CleanWordPress
* @since Clean WordPress 1.0.0
*/
if (!defined('ABSPATH')) {
die('You are not authorized to directly access to this page');
}
require 'vendor/autoload.php';
//Check Back~Frontend website
if (is_admin()) {
include(__DIR__.'/_inc/backend.php');
} else {
include(__DIR__.'/_inc/frontend.php');
}
//-All common hooks--------------------------------------------------------//
/**
* Close DB connection simply.
*
* @uses mysql_close() To close all DB connections.
*
* @since Clean WordPress 1.2.0
*/
add_action('shutdown', '_cw_close_db_link', 99);
function _cw_close_db_link()
{
global $wpdb;
unset($wpdb);
}