Coding Standards: Remove unused global variables in various /wp-admin/includes/ files.

Props upadalavipul.
Fixes #59254.





git-svn-id: https://develop.svn.wordpress.org/trunk@56499 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2023-08-31 14:43:36 +00:00
parent 9879434020
commit 54a177910a
3 changed files with 1 additions and 10 deletions

View File

@@ -130,12 +130,8 @@ final class WP_Privacy_Policy_Content {
* Outputs a warning when some privacy info has changed.
*
* @since 4.9.6
*
* @global WP_Post $post Global post object.
*/
public static function policy_text_changed_notice() {
global $post;
$screen = get_current_screen()->id;
if ( 'privacy' !== $screen ) {

View File

@@ -58,14 +58,10 @@ function check_upload_size( $file ) {
* @since 3.0.0
* @since 5.1.0 Use wp_delete_site() internally to delete the site row from the database.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $blog_id Site ID.
* @param bool $drop True if site's database tables should be dropped. Default false.
*/
function wpmu_delete_blog( $blog_id, $drop = false ) {
global $wpdb;
$blog_id = (int) $blog_id;
$switch = false;

View File

@@ -625,10 +625,9 @@ if ( ! function_exists( 'wp_upgrade' ) ) :
*
* @global int $wp_current_db_version The old (current) database version.
* @global int $wp_db_version The new database version.
* @global wpdb $wpdb WordPress database abstraction object.
*/
function wp_upgrade() {
global $wp_current_db_version, $wp_db_version, $wpdb;
global $wp_current_db_version, $wp_db_version;
$wp_current_db_version = __get_option( 'db_version' );