Make WordPress Core


Ignore:
Timestamp:
09/14/2023 02:13:42 AM (9 months ago)
Author:
joedolson
Message:

Administration: Use wp_admin_notice() for .updated.

Add usages of wp_admin_notice() and wp_get_admin_notice() on .updated 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/edit-link-form.php

    r56515 r56573  
    9292<hr class="wp-header-end">
    9393
    94 <?php if ( isset( $_GET['added'] ) ) : ?>
    95 <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Link added.' ); ?></p></div>
    96 <?php endif; ?>
     94<?php
     95if ( isset( $_GET['added'] ) ) {
     96    wp_admin_notice(
     97        __( 'Link added.' ),
     98        array(
     99            'id'                 => 'message',
     100            'additional_classes' => array( 'updated' ),
     101            'dismissible'        => true,
     102        )
     103    );
     104}
     105?>
    97106
    98107<form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
Note: See TracChangeset for help on using the changeset viewer.