Skip to content

Commit 4ef8bd9

Browse files
committed
Refactoring
1 parent 44231f4 commit 4ef8bd9

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Standard features of the following plugins will be manipulated or extended.
146146
### UpdraftPlus
147147

148148
* Fade out the annoying Message on Upgrade Page
149+
* Fade out UpdraftPlus @ Admin Bar
149150

150151
### wpRocket
151152

unmus_update.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,33 +61,4 @@ function unmus_themes_update() {
6161
// Disable themes auto-update email notifications.
6262
add_filter( 'auto_theme_update_send_email', '__return_false' );
6363

64-
/**
65-
* The annoying Message
66-
*
67-
* Plugin: UpdraftPlus
68-
* Fades out the Message on WordPress Upgrade Page
69-
*
70-
* @since 0.8
71-
*/
72-
73-
function unmus_updraft_message_invisible() {
74-
75-
// Get current page
76-
global $pagenow;
77-
78-
// Run on specific pages only
79-
if ( $pagenow == 'update-core.php') {
80-
81-
echo "
82-
<style type='text/css'>
83-
.updraft-ad-container {
84-
display:none !important;
85-
}
86-
</style>
87-
";
88-
}
89-
90-
}
91-
add_action( 'admin_head', 'unmus_updraft_message_invisible' );
92-
9364
?>

unmus_visibility.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,33 @@ function unmus_disable_updraftplus_admin_bar() {
2424
}
2525
add_action('wp_before_admin_bar_render', 'unmus_disable_updraftplus_admin_bar', 999);
2626

27+
/**
28+
* The annoying Message
29+
*
30+
* Plugin: UpdraftPlus
31+
* Fades out the Message on WordPress Upgrade Page
32+
*
33+
* @since 0.8
34+
*/
35+
36+
function unmus_updraft_message_invisible() {
37+
38+
// Get current page
39+
global $pagenow;
40+
41+
// Run on specific pages only
42+
if ( $pagenow == 'update-core.php') {
43+
44+
echo "
45+
<style type='text/css'>
46+
.updraft-ad-container {
47+
display:none !important;
48+
}
49+
</style>
50+
";
51+
}
52+
53+
}
54+
add_action( 'admin_head', 'unmus_updraft_message_invisible' );
55+
2756
?>

0 commit comments

Comments
 (0)