Menambahkan Pemberitahuan Admin Kustom di WordPress Editor Klasik

/**
 * Hook into the 'admin_notices' action to render
 * a generic HTML notice.
 */
function mysofthunt_admin_notice() {
    $screen = get_current_screen();
    // Only render this notice in the post editor.
    if ( ! $screen || 'post' !== $screen->base ) {
        return;
    }
    // Render the notice's HTML.
    // Each notice should be wrapped in a <div>
    // with a 'notice' class.
    echo '<div class="notice notice-success is-dismissible"><p>';
    echo sprintf( __( 'Post draft updated. <a href="%s" target="_blank">Preview post</a>' ), get_preview_post_link() );
    echo '</p></div>';
};
add_action( 'admin_notices', 'mysofthunt_admin_notice' );
Outrageous Ostrich