forked from vincentorback/clean-wordpress-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacf.php
30 lines (24 loc) · 712 Bytes
/
acf.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
<?php
/**
* Hide ACF settings menu
*/
add_filter( 'acf/settings/show_admin', '__return_false' );
/**
* Remove ACF from admin menu
*/
add_action(
'admin_menu',
function () {
// Remove ACF
remove_menu_page( 'edit.php?post_type=acf-field-group' );
// Remove ACF -> Edit
remove_submenu_page( 'edit.php?post_type=acf-field-group', 'post-new.php?post_type=acf-field-group' );
// Remove ACF -> Tools
remove_submenu_page( 'edit.php?post_type=acf-field-group', 'acf-settings-tools' );
// Remove ACF -> Updates
remove_submenu_page( 'edit.php?post_type=acf-field-group', 'acf-settings-updates' );
// Remove custom ACF Options page
remove_menu_page( 'acf-options-name-of-page' );
},
999
);