Make WordPress Core


Ignore:
Timestamp:
04/21/2016 03:16:52 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Administration: Introduce admin_print_footer_scripts-$hook_suffix", a dynamic version of the admin_print_footer_scripts hook.

This is now more consistent with the generic admin_print_scripts and the dynamic admin_print_scripts-$hook_suffix hooks fired in wp-admin/admin-header.php.

Props tfrommen.
Fixes #34334.

File:
1 edited

Legend:

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

    r32642 r37279  
    1010if ( !defined('ABSPATH') )
    1111    die('-1');
     12
     13/**
     14 * @global string $hook_suffix
     15 */
     16global $hook_suffix;
    1217?>
    1318
     
    6873
    6974/**
     75 * Prints scripts and data queued for the footer.
     76 *
     77 * The dynamic portion of the hook name, `$hook_suffix`,
     78 * refers to the global hook suffix of the current page.
     79 *
     80 * @since 4.6.0
     81 *
     82 * @global string $hook_suffix
     83 * @param string $hook_suffix The current admin page.
     84 */
     85do_action( "admin_print_footer_scripts-$hook_suffix" );
     86
     87/**
    7088 * Prints any scripts and data queued for the footer.
    7189 *
     
    7795 * Print scripts or data after the default footer scripts.
    7896 *
    79  * The dynamic portion of the hook name, `$GLOBALS['hook_suffix']`,
     97 * The dynamic portion of the hook name, `$hook_suffix`,
    8098 * refers to the global hook suffix of the current page.
    8199 *
     
    85103 * @param string $hook_suffix The current admin page.
    86104 */
    87 do_action( "admin_footer-" . $GLOBALS['hook_suffix'] );
     105do_action( "admin_footer-$hook_suffix" );
    88106
    89107// get_site_option() won't exist when auto upgrading from <= 2.7
Note: See TracChangeset for help on using the changeset viewer.