WordPress.org

Make WordPress Core

Changeset 45909 for trunk/src/index.php


Ignore:
Timestamp:
08/29/2019 07:52:43 AM (9 months ago)
Author:
mikeschroder
Message:

Administration: Output valid HTML when wp_die() is called.

To better support HTML and string calls to wp_die() without
outputting invalid HTML, wraps error messages in <div> rather than <p>.

Adds .wp-die-message CSS class for styling.

Props dinhtungdu, jeremyfelt, audrasjb, SergeyBiryukov, afercia, audrasjb, noisysocks.
Fixes #47580.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/index.php

    r45649 r45909  
    3131
    3232// Die with an error message
    33 $die = __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) . '</p>';
     33$die = sprintf(
     34    '<p>%s</p>',
     35    __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' )
     36);
    3437
    3538$die .= '<p>' . sprintf(
Note: See TracChangeset for help on using the changeset viewer.