Make WordPress Core


Ignore:
Timestamp:
09/17/2023 03:31:32 PM (13 months ago)
Author:
joedolson
Message:

Administration: Use wp_admin_notice() more in wp-admin/.

Add additional usage of wp_admin_notice() in wp-admin/ on .error and miscellaneous usages previously overlooked.

Follow up to [56408], [56409], [56410], [56518], [56570], [56571], [56572], [56573], [56576], [56589], [56590], [56597], [56599].

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r56570 r56600  
    463463    );
    464464endif;
    465 ?>
    466 <div id="lost-connection-notice" class="error hidden">
    467     <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you are reconnected.' ); ?>
    468     <span class="hide-if-no-sessionstorage"><?php _e( 'This post is being backed up in your browser, just in case.' ); ?></span>
    469     </p>
    470 </div>
     465
     466$connection_lost_message = sprintf(
     467    '<span class="spinner"></span> %1$s <span class="hide-if-no-sessionstorage">%2$s</span>',
     468    __( '<strong>Connection lost.</strong> Saving has been disabled until you are reconnected.' ),
     469    __( 'This post is being backed up in your browser, just in case.' )
     470);
     471
     472wp_admin_notice(
     473    $connection_lost_message,
     474    array(
     475        'id'                 => 'lost-connection-notice',
     476        'additional_classes' => array( 'error', 'hidden' ),
     477    )
     478);
     479?>
    471480<form name="post" action="post.php" method="post" id="post"
    472481<?php
Note: See TracChangeset for help on using the changeset viewer.