-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathacf.php
49 lines (35 loc) · 952 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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
);
/**
* Remove toolbar items from wysiwyg-field
*/
add_filter(
'acf/fields/wysiwyg/toolbars',
function( $toolbars ) {
$toolbars['Basic'] = array();
$toolbars['Basic'][1] = array('link,removeformat');
return $toolbars;
}
);