Last active
October 19, 2016 21:48
-
-
Save vovafeldman/79b9a25ae141db57f7a626f22e82e526 to your computer and use it in GitHub Desktop.
Freemius - WP Markdown Editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Update markdown supported post types. | |
* | |
* @author Vova Feldman | |
*/ | |
function freemius_update_supported_markdown_posts() { | |
if ( ! class_exists( 'WPCom_Markdown' ) ) { | |
// WP Markdown isn't installed. | |
return; | |
} | |
add_post_type_support( 'docs', WPCom_Markdown::POST_TYPE_SUPPORT ); | |
remove_post_type_support( 'post', WPCom_Markdown::POST_TYPE_SUPPORT ); | |
remove_post_type_support( 'page', WPCom_Markdown::POST_TYPE_SUPPORT ); | |
} | |
add_action( 'init', 'freemius_update_supported_markdown_posts', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment