Tested w/ 4.1.1 did some cleanup to make sure we save properly
Hat tip: [rado.at] (https://wordpress.org/support/topic/change-request-tinymce-cleanup?replies=5)
Tested w/ 3.8
- Simple tweak to .js file to add new handles used in WP 3.3
wp_enqueue_style and wp_enqueue_script. #facepalm
- tested with 3.1.2
- commented out the print_r that shows the array of multi edit elements at the bottom of the admin screen.
- added file_exists to prevent error output for non-existent template file addressing jmalleck's comment
- added support for shortcodes (ONLY TESTED WITH [gallery]) in multi-edit regions. Thanks Nick Ciske
- clean some mce tags from regions, thanks inpixelitrust
- added options page (with advert) to toggle shortcode usage. With shortcodes on it will apply filters to post data.. like displaying tweetmeme buttons.. again.
- added a second param to multieditDisplay function for return, if true will return the value instead of echo. example: Assign content to $foo,
<?php $foo = multieditDisplay('Right',true)?> then at some other time echo $foo
<? echo $foo ?>
- added a closing php ?> tag.. go figure.
Re-assigned $post->page_template to page.php if "default". Respects multiedit declaration in header of page.php now. Still need to publish/update the page a couple times before the multi edit tabs appear above tinymce. I figure this is becuase $post->page_template is null until the page is actually saved.
Tested with 3.0.. added post.php to array in init check
- force tinymce to visual mode when saving post
- fixes the bug that main content was being overwritten if saved in html mode
- added some trim() to a few places.
- Did some refactoring, made sure no php notices were being thrown, added a notice if you have existing multiedit regions on the page, then change template to another multiedit enabled template with different declarations.
- check for empty $post->page_template and ignore
- changed version number so wp repo will show update
- fixed weird behavior when saving a page not using multiedit.. basically does not load the js
- Fixed bug that would replace tinymce content before save if no multiedit fields avail. You deleted or changed content, and hit update page and it would put your old content back in.
- Added disabled message if tinymce is not being used.. for now
- Better check for edit page and custom template before running
- Fixed dumb oversight that borked 0.9, plugin can now find the .js and .css file.