Make WordPress Core

Changeset 54204


Ignore:
Timestamp:
09/19/2022 02:18:18 PM (2 years ago)
Author:
hellofromTonya
Message:

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.

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r54202 r54204  
    367367
    368368    $meta_key     = $wpdb->get_blog_prefix() . 'persisted_preferences';
    369     $user_id      = get_current_user_ID();
     369    $user_id      = get_current_user_id();
    370370    $preload_data = get_user_meta( $user_id, $meta_key, true );
    371371    $scripts->add_inline_script(
Note: See TracChangeset for help on using the changeset viewer.