-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbloatless.php
More file actions
29 lines (27 loc) · 748 Bytes
/
bloatless.php
File metadata and controls
29 lines (27 loc) · 748 Bytes
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
<?php
/*
Plugin Name: Remove WordPress Code
Description: This plugin removes unnecessary scripts and styles from WordPress.
Version: 1.0
Author: Moisés Reis
License: GPL2
*/
/**
* Remove 'wpemojiSettings' from the environment
*/
function sdb_remove_wpemoji()
{
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action('admin_print_scripts', 'print_emoji_detection_script');
remove_action('admin_print_styles', 'print_emoji_styles');
}
add_action('init', 'sdb_remove_wpemoji');
/**
* Disable Gutenberg styles
*/
function sdb_deregister_styles()
{
wp_dequeue_style('global-styles');
}
add_action('wp_enqueue_scripts', 'sdb_deregister_styles', 100);