Skip to content

Commit db2ffef

Browse files
authored
Fix duplicate use of wp-header-end (#1943)
1 parent aec6c55 commit db2ffef

File tree

7 files changed

+12
-17
lines changed

7 files changed

+12
-17
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Prevent WordPress from loading all admin notices twice on ActivityPub settings pages.

includes/wp-admin/class-admin.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,6 @@ public static function admin_notices() {
8787
}
8888
}
8989

90-
/**
91-
* Display one admin menu notice about configuration problems or conflicts.
92-
*
93-
* @param string $admin_notice The notice to display.
94-
* @param string $level The level of the notice (error, warning, success, info).
95-
*/
96-
private static function show_admin_notice( $admin_notice, $level ) {
97-
?>
98-
99-
<div class="notice notice-<?php echo esc_attr( $level ); ?>">
100-
<p><?php echo wp_kses( $admin_notice, 'data' ); ?></p>
101-
</div>
102-
103-
<?php
104-
}
105-
10690
/**
10791
* Load user settings page
10892
*/

templates/admin-header.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@
3333
</nav>
3434
</div>
3535
</div>
36-
<hr class="wp-header-end">

templates/advanced-settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
?>
99

10+
<hr class="wp-header-end">
11+
1012
<div class="activitypub-settings activitypub-settings-page hide-if-no-js">
1113
<form method="post" action="options.php">
1214
<?php \settings_fields( 'activitypub_advanced' ); ?>

templates/blog-settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
?>
99

10+
<hr class="wp-header-end">
11+
1012
<div class="activitypub-settings activitypub-settings-page hide-if-no-js">
1113
<form method="post" action="options.php">
1214
<?php \settings_fields( 'activitypub_blog' ); ?>

templates/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
?>
99

10+
<hr class="wp-header-end">
11+
1012
<div class="activitypub-settings activitypub-settings-page hide-if-no-js">
1113
<form method="post" action="options.php">
1214
<?php \settings_fields( 'activitypub' ); ?>

templates/welcome.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
);
1414
?>
1515

16+
<hr class="wp-header-end">
17+
1618
<div class="activitypub-settings activitypub-welcome-page hide-if-no-js">
1719
<?php do_settings_sections( 'activitypub_welcome' ); ?>
1820
</div>

0 commit comments

Comments
 (0)