Skip to content

Commit

Permalink
Coding Standards: Remove unused global variables in various `/wp-admi…
Browse files Browse the repository at this point in the history
…n/includes/` files.

Props upadalavipul.
Fixes #59254.





git-svn-id: https://develop.svn.wordpress.org/trunk@56499 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
audrasjb committed Aug 31, 2023
1 parent 9879434 commit 54a1779
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions src/wp-admin/includes/class-wp-privacy-policy-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,8 @@ public static function text_change_check() {
* 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 ) {
Expand Down
4 changes: 0 additions & 4 deletions src/wp-admin/includes/ms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,9 @@ function wp_new_blog_notification( $blog_title, $blog_url, $user_id, $password )
*
* @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' );

Expand Down

0 comments on commit 54a1779

Please sign in to comment.