Make WordPress Core


Ignore:
Timestamp:
09/14/2023 12:52:45 AM (15 months ago)
Author:
joedolson
Message:

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

Add usages of wp_admin_notice() and wp_get_admin_notice() on .notice-[type] in the root level of /wp-admin/. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options.php

    r55988 r56570  
    360360    <h1><?php esc_html_e( 'All Settings' ); ?></h1>
    361361
    362     <div class="notice notice-warning">
    363         <p><strong><?php _e( 'Warning:' ); ?></strong> <?php _e( 'This page allows direct access to your site settings. You can break things here. Please be cautious!' ); ?></p>
    364     </div>
    365 
     362    <?php
     363    wp_admin_notice(
     364        '<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'This page allows direct access to your site settings. You can break things here. Please be cautious!' ),
     365        array(
     366            'type' => 'warning',
     367        )
     368    );
     369    ?>
    366370    <form name="form" action="options.php" method="post" id="all-options">
    367371        <?php wp_nonce_field( 'options-options' ); ?>
Note: See TracChangeset for help on using the changeset viewer.