-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunmus_visibility.php
More file actions
99 lines (76 loc) · 1.87 KB
/
Copy pathunmus_visibility.php
File metadata and controls
99 lines (76 loc) · 1.87 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* Visbility
*
* @package unmus
* @since 0.9
*/
// Security: Stops code execution if WordPress is not loaded
if (!defined('ABSPATH')) { exit; }
/**
* Disable UpdraftPlus @ Admin Bar
*
* @since 0.9
*/
function unmus_disable_updraftplus_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('updraft_admin_node');
}
add_action('wp_before_admin_bar_render', 'unmus_disable_updraftplus_admin_bar', 999);
/**
* The annoying Message
*
* Plugin: UpdraftPlus
* Fades out the Message on WordPress Upgrade Page
*
* @since 0.8
*/
function unmus_updraft_message_invisible() {
// Get current page
global $pagenow;
// Run on specific pages only
if ( $pagenow == 'update-core.php') {
echo "
<style type='text/css'>
.updraft-ad-container {
display:none !important;
}
</style>
";
}
}
add_action( 'admin_head', 'unmus_updraft_message_invisible' );
/**
* Disable Envira Notices
*
* @since 0.9
*/
function unmus_envira_notices_invisible () {
echo "
<style type='text/css'>
.envira-notice {
display:none !important;
}
</style>
";
}
add_action( 'admin_head', 'unmus_envira_notices_invisible' );
/**
* Disable Modula Submenu Quatsch
*
* @since 0.9
*/
function unmus_modula_submenu_invisible () {
remove_submenu_page( 'edit.php?post_type=modula-gallery', '#gallery-defaults' );
remove_submenu_page( 'edit.php?post_type=modula-gallery', '#modula-albums' );
remove_submenu_page( 'edit.php?post_type=modula-gallery', '#albums-defaults' );
remove_submenu_page( 'edit.php?post_type=modula-gallery', '#modula-licenses' );
}
add_action( 'admin_menu', 'unmus_modula_submenu_invisible', 999);
/**
* Remove Edit Gallery Link @ FrontEnd
*
* @since 0.9
*/
add_filter( 'modula_troubleshooting_disable_edit', '__return_true' );
?>