/ Published in: PHP
I've yet to work on a WordPress site where at least once post wasn't copied from Microsoft Word, producing a mess of inline tags and awful markup.
This helps prevent that, just a little.
This helps prevent that, just a little.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add_action( 'admin_notices', 'custom_admin_notice' ); function custom_admin_notice(){ global $current_screen; if ( $current_screen->parent_base == 'edit' ) echo '<div class="updated"><p><strong>NOTE</strong> - Please do not copy and paste text from Microsoft Word. You can write and save your post here in WordPress, or copy it from a plain text app (Notepad or TextEdit). Microsoft Word adds a ton of messy inline tags that break things.</p></div>'; }