forked from ouun/clean-wordpress-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-columns.php
38 lines (32 loc) · 830 Bytes
/
post-columns.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
<?php
/**
* Removed post columns
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_posts_columns
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_pages_columns
*/
add_action( 'admin_init' , function () {
add_filter( 'manage_posts_columns', function ( $columns ) {
unset(
$columns['cb'],
$columns['title'],
$columns['author'],
$columns['categories'],
$columns['tags'],
$columns['comments'],
$columns['date']
);
return $columns;
});
add_filter( 'manage_page_columns', function ( $columns ) {
unset(
$columns['cb'],
$columns['title'],
$columns['author'],
$columns['categories'],
$columns['tags'],
$columns['comments'],
$columns['date']
);
return $columns;
});
});