From 468bcce1a2a717374f0bfdfa673683870c9926d7 Mon Sep 17 00:00:00 2001
From: "Alejandro J. Sanchez P" <alejandro.s@onthegosystems.com>
Date: Sun, 5 Jun 2022 12:00:57 +0200
Subject: [PATCH] Removing notice jumps in settings pages.
---
src/wp-admin/admin-header.php | 4 ++--
src/wp-admin/options-discussion.php | 1 +
src/wp-admin/options-general.php | 1 +
src/wp-admin/options-media.php | 1 +
src/wp-admin/options-permalink.php | 1 +
src/wp-admin/options-reading.php | 1 +
src/wp-admin/options-writing.php | 1 +
src/wp-admin/options.php | 1 +
8 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php
index 3306c9125b..7ed01544d4 100644
|
a
|
b
|
if ( is_network_admin() ) { |
| 310 | 310 | */ |
| 311 | 311 | do_action( 'all_admin_notices' ); |
| 312 | 312 | |
| 313 | | if ( 'options-general.php' === $parent_file ) { |
| | 313 | /* if ( 'options-general.php' === $parent_file ) { |
| 314 | 314 | require ABSPATH . 'wp-admin/options-head.php'; |
| 315 | | } |
| | 315 | */ |
diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php
index b83d822f2f..dde3e51245 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 38 | 38 | |
| 39 | 39 | <div class="wrap"> |
| 40 | 40 | <h1><?php echo esc_html( $title ); ?></h1> |
| | 41 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 41 | 42 | |
| 42 | 43 | <form method="post" action="options.php"> |
| 43 | 44 | <?php settings_fields( 'discussion' ); ?> |
diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php
index 20c83fb1d8..59bd991927 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 55 | 55 | |
| 56 | 56 | <div class="wrap"> |
| 57 | 57 | <h1><?php echo esc_html( $title ); ?></h1> |
| | 58 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 58 | 59 | |
| 59 | 60 | <form method="post" action="options.php" novalidate="novalidate"> |
| 60 | 61 | <?php settings_fields( 'general' ); ?> |
diff --git a/src/wp-admin/options-media.php b/src/wp-admin/options-media.php
index 79f4389e88..6efbd59524 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 48 | 48 | |
| 49 | 49 | <div class="wrap"> |
| 50 | 50 | <h1><?php echo esc_html( $title ); ?></h1> |
| | 51 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 51 | 52 | |
| 52 | 53 | <form action="options.php" method="post"> |
| 53 | 54 | <?php settings_fields( 'media' ); ?> |
diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php
index 87191625c7..617f7ad2cc 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 207 | 207 | ?> |
| 208 | 208 | <div class="wrap"> |
| 209 | 209 | <h1><?php echo esc_html( $title ); ?></h1> |
| | 210 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 210 | 211 | |
| 211 | 212 | <form name="form" action="options-permalink.php" method="post"> |
| 212 | 213 | <?php wp_nonce_field( 'update-permalink' ); ?> |
diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php
index 2c89f14474..c6f1550080 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 59 | 59 | |
| 60 | 60 | <div class="wrap"> |
| 61 | 61 | <h1><?php echo esc_html( $title ); ?></h1> |
| | 62 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 62 | 63 | |
| 63 | 64 | <form method="post" action="options.php"> |
| 64 | 65 | <?php |
diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php
index e33c1df4f9..ea35c12d45 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 59 | 59 | |
| 60 | 60 | <div class="wrap"> |
| 61 | 61 | <h1><?php echo esc_html( $title ); ?></h1> |
| | 62 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 62 | 63 | |
| 63 | 64 | <form method="post" action="options.php"> |
| 64 | 65 | <?php settings_fields( 'writing' ); ?> |
diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
index d63b10eb4f..27482c3507 100644
|
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; ?> |
| 356 | 356 | |
| 357 | 357 | <div class="wrap"> |
| 358 | 358 | <h1><?php esc_html_e( 'All Settings' ); ?></h1> |
| | 359 | <?php require ABSPATH . 'wp-admin/options-head.php'; ?> |
| 359 | 360 | |
| 360 | 361 | <div class="notice notice-warning"> |
| 361 | 362 | <p><strong><?php _e( 'Warning:' ); ?></strong> <?php _e( 'This page allows direct access to your site settings. You can break things here. Please be cautious!' ); ?></p> |