Title: _local_storage_notice
Published: April 25, 2014
Last modified: May 20, 2026

---

# _local_storage_notice()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Outputs the HTML for restoring the post data from DOM storage

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#source)󠁿

    ```php
    function _local_storage_notice() {
    	$local_storage_message  = '<p class="local-restore">';
    	$local_storage_message .= __( 'The backup of this post in your browser is different from the version below.' );
    	$local_storage_message .= '<button type="button" class="button restore-backup">' . __( 'Restore the backup' ) . '</button></p>';
    	$local_storage_message .= '<p class="help">';
    	$local_storage_message .= __( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' );
    	$local_storage_message .= '</p>';

    	wp_admin_notice(
    		$local_storage_message,
    		array(
    			'id'                 => 'local-storage-notice',
    			'additional_classes' => array( 'hidden' ),
    			'dismissible'        => true,
    			'paragraph_wrap'     => false,
    		)
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/template.php#L2724)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/template.php#L2724-L2741)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_admin_notice()](https://developer.wordpress.org/reference/functions/wp_admin_notice/)`wp-includes/functions.php` |

Outputs an admin notice.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_local_storage_notice/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.6.0](https://developer.wordpress.org/reference/since/3.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_local_storage_notice%2F)
before being able to contribute a note or feedback.