From c5c1f37e0dbeb7346702f201a7535cce9f8b39a6 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Mon, 19 Sep 2022 14:18:18 +0000 Subject: [PATCH] Editor: Fix function name case in `wp_default_packages_inline_scripts()`. Fixes function name typo by changing from uppercase `get_current_user_ID()` to lowercase `get_current_user_id()`. >Note: Function names are case-insensitive for the ASCII characters A to Z, though it is usually good form to call functions as they appear in their declaration. [https://www.php.net/manual/en/functions.user-defined.php As per the PHP manual], PHP functions are case-insensitive, meaning the code runs. However, this fix is necessary for consistency, maintainability, and future-proofing. Follow-up to [54182]. Unprop hellofromTonya. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54204 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 3d84cbd749..532fa79a67 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -366,7 +366,7 @@ function wp_default_packages_inline_scripts( $scripts ) { ); $meta_key = $wpdb->get_blog_prefix() . 'persisted_preferences'; - $user_id = get_current_user_ID(); + $user_id = get_current_user_id(); $preload_data = get_user_meta( $user_id, $meta_key, true ); $scripts->add_inline_script( 'wp-preferences',