Emoji: Use the `admin_print_footer_scripts` action for printing the emoji detection script in the admin.
This corrects an oversight in an optimization made to `print_emoji_detection_script()` which moved the emoji detection script to the `wp_print_footer_scripts` action. Since this action doesn't fire in the admin, no script was printed. Now in the admin, the script is printed at the `admin_print_footer_scripts` action. Existing sites that wish to omit emoji can continue to do `remove_action( 'admin_print_scripts', 'print_emoji_detection_script' )`. Tests are added covering all four branches of `print_emoji_detection_script()`: hooking the script onto the appropriate footer action, and printing it directly when that action has already fired, in both the admin and the frontend. Missing parameter and return types are added to the `get_echo()` test helper. Developed in https://github.com/WordPress/wordpress-develop/pull/11931. Follow-up to r60902. Props westonruter, jonsurrell. See #64076, #65260. Fixes #65310. git-svn-id: https://develop.svn.wordpress.org/trunk@62410 602fd350-edb4-49c9-b593-d223f7449a82
W
Weston Ruter committed
a3c3968b2ebc97b4fefd861034222317542c2c77
Parent: bc730ed