diff options
Diffstat (limited to 'plugins/jetpack/modules/markdown.php')
-rw-r--r-- | plugins/jetpack/modules/markdown.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/markdown.php b/plugins/jetpack/modules/markdown.php index b173ffb1..e572eff3 100644 --- a/plugins/jetpack/modules/markdown.php +++ b/plugins/jetpack/modules/markdown.php @@ -13,3 +13,17 @@ */ include dirname( __FILE__ ) . '/markdown/easy-markdown.php'; + +/** + * Remove checkbox set in modules/markdown/easy-markdown.php. + * We don't just remove the register_setting call there because the checkbox is + * needed on WordPress.com, where the file is sync'ed verbatim. + */ +function jetpack_markdown_posting_always_on() { + // why oh why isn't there a remove_settings_field? + global $wp_settings_fields; + if ( isset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ) ) { + unset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ); + } +} +add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 ); |