_local_storage_notice

函式
_local_storage_notice ( No parameters )

_local_storage_notice。如果使用者的瀏覽器不支援本地儲存,這個函式會向使用者輸出一個通知,這被一些WordPress的功能所使用。

輸出用於從DOM儲存中恢復文章資料的HTML。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _local_storage_notice() {
?>
<div id="local-storage-notice" class="hidden notice is-dismissible">
<p class="local-restore">
<?php _e( 'The backup of this post in your browser is different from the version below.' ); ?>
<button type="button" class="button restore-backup"><?php _e( 'Restore the backup' ); ?></button>
</p>
<p class="help">
<?php _e( '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.' ); ?>
</p>
</div>
<?php
}
function _local_storage_notice() { ?> <div id="local-storage-notice" class="hidden notice is-dismissible"> <p class="local-restore"> <?php _e( 'The backup of this post in your browser is different from the version below.' ); ?> <button type="button" class="button restore-backup"><?php _e( 'Restore the backup' ); ?></button> </p> <p class="help"> <?php _e( '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.' ); ?> </p> </div> <?php }
function _local_storage_notice() {
	?>
	<div id="local-storage-notice" class="hidden notice is-dismissible">
	<p class="local-restore">
		<?php _e( 'The backup of this post in your browser is different from the version below.' ); ?>
		<button type="button" class="button restore-backup"><?php _e( 'Restore the backup' ); ?></button>
	</p>
	<p class="help">
		<?php _e( '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.' ); ?>
	</p>
	</div>
	<?php
}

常見問題

FAQs
檢視更多 >