Make WordPress Core

Ticket #19237: remove-all-notices.txt

File remove-all-notices.txt, 1.7 KB (added by devinreams, 13 years ago)

Removing all notices from the special informational wp-admin pages

Line 
1Index: wp-admin/freedoms.php
2===================================================================
3--- wp-admin/freedoms.php       (revision 19264)
4+++ wp-admin/freedoms.php       (working copy)
5@@ -9,6 +9,12 @@
6 /** WordPress Administration Bootstrap */
7 require_once( './admin.php' );
8 
9+/** Don't show notices on informational pages */
10+remove_all_actions( 'network_admin_notices' );
11+remove_all_actions( 'user_admin_notices' );
12+remove_all_actions( 'admin_notices' );
13+remove_all_actions( 'all_admin_notices' );
14+
15 $title = __( 'Freedoms' );
16 
17 list( $display_version ) = explode( '-', $wp_version );
18Index: wp-admin/credits.php
19===================================================================
20--- wp-admin/credits.php        (revision 19264)
21+++ wp-admin/credits.php        (working copy)
22@@ -9,6 +9,12 @@
23 /** WordPress Administration Bootstrap */
24 require_once( './admin.php' );
25 
26+/** Don't show notices on informational pages */
27+remove_all_actions( 'network_admin_notices' );
28+remove_all_actions( 'user_admin_notices' );
29+remove_all_actions( 'admin_notices' );
30+remove_all_actions( 'all_admin_notices' );
31+
32 $title = __( 'Credits' );
33 
34 add_contextual_help($current_screen,
35Index: wp-admin/about.php
36===================================================================
37--- wp-admin/about.php  (revision 19264)
38+++ wp-admin/about.php  (working copy)
39@@ -9,6 +9,12 @@
40 /** WordPress Administration Bootstrap */
41 require_once( './admin.php' );
42 
43+/** Don't show notices on informational pages */
44+remove_all_actions( 'network_admin_notices' );
45+remove_all_actions( 'user_admin_notices' );
46+remove_all_actions( 'admin_notices' );
47+remove_all_actions( 'all_admin_notices' );
48+
49 $title = __( 'About' );
50 
51 list( $display_version ) = explode( '-', $wp_version );