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/_index.php

    r55917 r56570  
    155155        // Only show the dashboard notice if it's been less than a minute since the message was postponed.
    156156        if ( $time_passed < MINUTE_IN_SECONDS ) :
    157             ?>
    158         <div class="notice notice-success is-dismissible">
    159             <p>
    160                 <?php
    161                 printf(
    162                     /* translators: %s: Human-readable time interval. */
    163                     __( 'The admin email verification page will reappear after %s.' ),
    164                     human_time_diff( time() + $remind_interval )
    165                 );
    166                 ?>
    167             </p>
    168         </div>
    169         <?php endif; ?>
    170     <?php endif; ?>
     157            $message = sprintf(
     158                /* translators: %s: Human-readable time interval. */
     159                __( 'The admin email verification page will reappear after %s.' ),
     160                human_time_diff( time() + $remind_interval )
     161            );
     162            wp_admin_notice(
     163                $message,
     164                array(
     165                    'type'        => 'success',
     166                    'dismissible' => true,
     167                )
     168            );
     169        endif;
     170    endif;
     171    ?>
    171172
    172173<?php
Note: See TracChangeset for help on using the changeset viewer.