Make WordPress Core


Ignore:
Timestamp:
03/27/2019 09:58:38 PM (6 years ago)
Author:
adamsilverstein
Message:

Bundled Theme: trigger a new wp_body_open action immediately after the opening body tag.

  • Enables inserting (asynchronous) JavaScript right after the opening body tag.
  • Add a wp_body_open helper function that triggers the wp_body_open action.
  • Call wp_body_open in core themes immediately after the opening body tag.

Props joostdevalk, valendesigns, nacin, saracup, jorbin, mikeschinkel, jonnybojangles, lgedeon, Willscrlt, Denis-de-Bernardy, lexiqueen, sky_76, welcher, westonruter, ramiy, joyously.
Fixes #12563.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r45028 r45042  
    27532753
    27542754/**
     2755 * Fire the wp_body_open action.
     2756 *
     2757 * * See {@see 'wp_body_open'}.
     2758 *
     2759 * @since 5.2.0
     2760 */
     2761function wp_body_open() {
     2762    /**
     2763     * Triggered after the opening <body> tag.
     2764     *
     2765     * @since 5.2.0
     2766     */
     2767    do_action( 'wp_body_open' );
     2768}
     2769
     2770/**
    27552771 * Display the links to the general feeds.
    27562772 *
Note: See TracChangeset for help on using the changeset viewer.