PluginProbe
Faust.js / 1.0.2
Faust.js v1.0.2
1.8.12 1.8.11 1.4.1 1.8.0 1.8.8 1.8.9 trunk 0.7.0 0.7.1 0.7.10 0.7.11 0.7.3 0.7.4 0.7.5 0.7.6 0.7.7 0.7.8 0.7.9 0.8.0 0.8.1 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 All 40 releases
← All changes | includes/admin-menus/callbacks.php +10 -1 0.7.3 → 1.0.2 View file →
@@ -38,8 +38,11 @@
38 38
39 39 // Remove Appearance > Theme Editor.
40 40 remove_submenu_page( 'themes.php', 'theme-editor.php' );
41 41
42 + // Remove Appearance > Editor.
43 + remove_submenu_page( 'themes.php', 'site-editor.php' );
44 +
42 45 // Remove Appearance > Widgets.
43 46 remove_submenu_page( 'themes.php', 'widgets.php' );
44 47
45 48 /**
@@ -78,8 +81,9 @@
78 81 }
79 82
80 83 $wp_admin_bar->remove_menu( 'customize' );
81 84 $wp_admin_bar->remove_node( 'themes' );
85 + $wp_admin_bar->remove_node( 'site-editor' );
82 86 $wp_admin_bar->remove_node( 'widgets' );
83 87 }
84 88
85 89 add_action( 'current_screen', __NAMESPACE__ . '\\prevent_admin_page_access' );
@@ -92,11 +96,16 @@
92 96 if ( ! is_themes_disabled() ) {
93 97 return;
94 98 }
95 99
100 + $disabled_screens = array(
101 + 'site-editor',
102 + 'themes',
103 + );
104 +
96 105 $screen = get_current_screen();
97 106
98 - if ( is_object( $screen ) && 'themes' === $screen->id ) {
107 + if ( is_object( $screen ) && in_array( $screen->id, $disabled_screens, true ) ) {
99 108 wp_safe_redirect( admin_url() );
100 109 exit;
101 110 }
102 111 }