Skip to content

Commit

Permalink
added after_gutenberg_gets_post_to_edit and fixed spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
nuzzio committed May 3, 2018
1 parent d8bf411 commit 0e1cd99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/markdown/easy-markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ public function maybe_load_actions_and_filters( $new_blog_id = null, $old_blog_i
* @return null
*/
public function load_markdown_for_posts() {
add_filter( 'after_gutenberg_gets_post_to_edit', array( $this, 'after_gutenberg_gets_post_to_edit' ), 10, 1 );
add_filter( 'the_content', array( $this, 'wpautop_markdown_blocks' ), 6, 1 );
add_filter( 'jetpack_markdown_preserve_pattern', array( $this, 'jetpack_markdown_preserve' ), 10, 0 );
add_filter( 'jetpack_markdown_preserve_pattern', array( $this, 'jetpack_markdown_preserve' ), 10, 0 );
add_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );
add_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ), 10, 2 );
add_filter( 'edit_post_content', array( $this, 'edit_post_content' ), 10, 2 );
Expand All @@ -135,6 +136,7 @@ public function load_markdown_for_posts() {
* @return null
*/
public function unload_markdown_for_posts() {
remove_filter( 'after_gutenberg_gets_post_to_edit', array( $this, 'after_gutenberg_gets_post_to_edit' ), 10 );
remove_filter( 'the_content', array( $this, 'wpautop_markdown_blocks' ), 6 );
remove_filter( 'jetpack_markdown_preserve_pattern', array( $this, 'jetpack_markdown_preserve' ), 10 );
remove_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );
Expand Down

0 comments on commit 0e1cd99

Please sign in to comment.