| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Module Name: Markdown |
| 5 |
* Module Description: Write posts or pages in plain-text Markdown syntax |
| 6 |
* Sort Order: 31 |
| 7 |
* First Introduced: 2.8 |
| 8 |
* Requires Connection: No |
| 9 |
* Auto Activate: No |
| 10 |
* Module Tags: Writing |
| 11 |
* Feature: Writing |
| 12 |
* Additional Search Queries: md, markdown |
| 13 |
*/ |
| 14 |
|
| 15 |
include dirname( __FILE__ ) . '/markdown/easy-markdown.php'; |
| 16 |
|
| 17 |
/** |
| 18 |
* Remove checkbox set in modules/markdown/easy-markdown.php. |
| 19 |
* We don't just remove the register_setting call there because the checkbox is |
| 20 |
* needed on WordPress.com, where the file is sync'ed verbatim. |
| 21 |
*/ |
| 22 |
function jetpack_markdown_posting_always_on() { |
| 23 |
// why oh why isn't there a remove_settings_field? |
| 24 |
global $wp_settings_fields; |
| 25 |
if ( isset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ) ) { |
| 26 |
unset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ); |
| 27 |
} |
| 28 |
} |
| 29 |
add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 ); |
| 30 |
|