Make WordPress Core


Ignore:
Timestamp:
12/11/2023 12:09:42 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Docs: Consistently document the $body_id global as a string.

Includes declaring the global at the beginning of wp_iframe() and iframe_header().

Follow-up to [32642], [32643].

Props mukesh27, upadalavipul.
Fixes #60032.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r56549 r57181  
    528528 *              by adding it to the function signature.
    529529 *
    530  * @global int $body_id
     530 * @global string $body_id
    531531 *
    532532 * @param callable $content_func Function that outputs the content.
     
    534534 */
    535535function wp_iframe( $content_func, ...$args ) {
     536    global $body_id;
     537
    536538    _wp_admin_html_begin();
    537539    ?>
     
    604606    $body_id_attr = '';
    605607
    606     if ( isset( $GLOBALS['body_id'] ) ) {
    607         $body_id_attr = ' id="' . $GLOBALS['body_id'] . '"';
     608    if ( isset( $body_id ) ) {
     609        $body_id_attr = ' id="' . $body_id . '"';
    608610    }
    609611
Note: See TracChangeset for help on using the changeset viewer.