WordPress.org

Make WordPress Core

Changeset 47221


Ignore:
Timestamp:
02/09/2020 06:24:41 PM (20 months ago)
Author:
joedolson
Message:

Toolbar: Load toolbar in wp_body_open when available.

For accessibility, the visual appearance and source order should match. Moving the toolbar to load in the new hook wp_body_open (5.2) fixes a long-standing source order problem.

Props jankimoradiya, afercia, SergeyBiryukov, audrasjb, ocean90, xkon, dinhtungdu.
Fixes #47053.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package-lock.json

    r47199 r47221  
    50165016        "bl": {
    50175017            "version": "1.2.2",
    5018             "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
     5018            "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
    50195019            "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
    50205020            "dev": true,
     
    52075207        "browserify-aes": {
    52085208            "version": "1.2.0",
    5209             "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
     5209            "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
    52105210            "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
    52115211            "dev": true,
     
    64976497        "create-hash": {
    64986498            "version": "1.2.0",
    6499             "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
     6499            "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
    65006500            "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
    65016501            "dev": true,
     
    65106510        "create-hmac": {
    65116511            "version": "1.1.7",
    6512             "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
     6512            "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
    65136513            "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
    65146514            "dev": true,
     
    65766576        "css-color-names": {
    65776577            "version": "0.0.4",
    6578             "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
     6578            "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
    65796579            "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
    65806580            "dev": true
     
    74727472        "diffie-hellman": {
    74737473            "version": "5.0.3",
    7474             "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
     7474            "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
    74757475            "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
    74767476            "dev": true,
     
    76937693        "duplexer": {
    76947694            "version": "0.1.1",
    7695             "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
     7695            "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
    76967696            "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
    76977697            "dev": true
     
    1693016930                "progress": {
    1693116931                    "version": "1.1.8",
    16932                     "resolved": "http://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
     16932                    "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
    1693316933                    "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=",
    1693416934                    "dev": true
     
    1811718117        "react-autosize-textarea": {
    1811818118            "version": "3.0.3",
    18119             "resolved": "http://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
     18119            "resolved": "https://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
    1812018120            "integrity": "sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg==",
    1812118121            "requires": {
     
    1852918529        "regjsgen": {
    1853018530            "version": "0.2.0",
    18531             "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
     18531            "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
    1853218532            "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc="
    1853318533        },
     
    1949819498        "sha.js": {
    1949919499            "version": "2.4.11",
    19500             "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
     19500            "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
    1950119501            "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
    1950219502            "dev": true,
  • trunk/src/wp-includes/default-filters.php

    r47122 r47221  
    538538add_action( 'before_signup_header', '_wp_admin_bar_init' );
    539539add_action( 'activate_header', '_wp_admin_bar_init' );
    540 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
     540add_action( 'wp_body_open', 'wp_admin_bar_render', 0 );
    541541add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
    542542
  • trunk/src/wp-includes/general-template.php

    r47219 r47221  
    28912891function wp_footer() {
    28922892    /**
     2893     * Sets up the Admin Bar if the current theme does not use `wp_body_open`.
     2894     *
     2895     * @since 5.4.0
     2896     */
     2897    if ( ! did_action( 'wp_body_open' ) ) {
     2898        add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
     2899    }
     2900    /**
    28932901     * Prints scripts or data before the closing body tag on the front end.
    28942902     *
Note: See TracChangeset for help on using the changeset viewer.