From ef0a7960c773598b4dbb194f35e5c4699593d3e2 Mon Sep 17 00:00:00 2001 From: Matt Wiebe Date: Wed, 12 Mar 2014 11:39:56 -0500 Subject: [PATCH] Unload Markdown when bulk editing Fixes #199 --- modules/markdown/easy-markdown.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/markdown/easy-markdown.php b/modules/markdown/easy-markdown.php index 6848a79d11c79..6427b5085b775 100644 --- a/modules/markdown/easy-markdown.php +++ b/modules/markdown/easy-markdown.php @@ -1,4 +1,5 @@ add_o2_helpers(); } } + /** + * If we're in a bulk edit session, unload so that we don't lose our markdown metadata + * @return null + */ + public function maybe_unload_for_bulk_edit() { + if ( isset( $_REQUEST['bulk_edit'] ) && $this->is_posting_enabled() ) { + $this->unload_markdown_for_posts(); + } + } + /** * Called on init and fires on switch_blog to decide if our actions and filters * should be running.