canonical-urls
4 months ago
carousel
1 day ago
comment-likes
8 months ago
comments
2 months ago
custom-post-types
1 month ago
external-media
8 months ago
google-fonts
1 month ago
gravatar
6 years ago
infinite-scroll
1 month ago
likes
1 day ago
markdown
2 months ago
memberships
1 day ago
photon-cdn
1 day ago
plugin-search
2 months ago
post-by-email
8 months ago
related-posts
1 week ago
scan
4 months ago
seo-tools
1 month ago
sharedaddy
1 month ago
shortcodes
1 week ago
shortlinks
4 weeks ago
simple-payments
8 months ago
site-icon
8 months ago
sitemaps
2 months ago
stats
7 months ago
subscriptions
1 week ago
theme-tools
1 month ago
tiled-gallery
1 month ago
verification-tools
2 months ago
videopress
1 day ago
widget-visibility
2 months ago
widgets
1 month ago
woocommerce-analytics
3 months ago
wordads
1 month ago
wpcom-tos
7 months ago
account-protection.php
3 months ago
blaze.php
8 months ago
blocks.php
8 months ago
canonical-urls.php
5 months ago
carousel.php
8 months ago
comment-likes.php
8 months ago
comments.php
4 months ago
contact-form.php
8 months ago
copy-post.php
2 months ago
custom-content-types.php
3 months ago
google-fonts.php
3 months ago
gravatar-hovercards.php
2 months ago
infinite-scroll.php
8 months ago
json-api.php
8 months ago
latex.php
2 months ago
likes.php
2 months ago
markdown.php
8 months ago
module-extras.php
8 months ago
module-headings.php
1 week ago
module-info.php
5 months ago
monitor.php
1 month ago
notes.php
1 day ago
photon-cdn.php
8 months ago
photon.php
8 months ago
plugin-search.php
1 month ago
podcast.php
1 week ago
post-by-email.php
3 months ago
post-list.php
8 months ago
protect.php
3 months ago
publicize.php
8 months ago
related-posts.php
2 months ago
search.php
8 months ago
seo-tools.php
1 month ago
sharedaddy.php
5 months ago
shortcodes.php
8 months ago
shortlinks.php
2 months ago
simple-payments.php
8 months ago
sitemaps.php
8 months ago
sso.php
1 month ago
stats.php
1 week ago
subscriptions.php
1 week ago
theme-tools.php
8 months ago
tiled-gallery.php
8 months ago
vaultpress.php
8 months ago
verification-tools.php
3 months ago
videopress.php
8 months ago
waf.php
8 months ago
widget-visibility.php
8 months ago
widgets.php
8 months ago
woocommerce-analytics.php
8 months ago
wordads.php
8 months ago
wpcom-reader.php
5 months ago
wpgroho.js
1 year ago
markdown.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Module Name: Markdown |
| 4 | * Module Description: Write and format posts using clean, readable Markdown syntax. |
| 5 | * Sort Order: 31 |
| 6 | * First Introduced: 2.8 |
| 7 | * Requires Connection: No |
| 8 | * Auto Activate: No |
| 9 | * Module Tags: Writing |
| 10 | * Feature: Writing |
| 11 | * Additional Search Queries: md, markdown |
| 12 | * |
| 13 | * @package automattic/jetpack |
| 14 | */ |
| 15 | |
| 16 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | exit( 0 ); |
| 18 | } |
| 19 | |
| 20 | // Require the markdown class file. |
| 21 | require __DIR__ . '/markdown/easy-markdown.php'; |
| 22 | |
| 23 | /** |
| 24 | * Remove checkbox set in modules/markdown/easy-markdown.php. |
| 25 | * We don't just remove the register_setting call there because the checkbox is |
| 26 | * needed on WordPress.com, where the file is sync'ed verbatim. |
| 27 | */ |
| 28 | function jetpack_markdown_posting_always_on() { |
| 29 | // why oh why isn't there a remove_settings_field? |
| 30 | global $wp_settings_fields; |
| 31 | if ( isset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ) ) { |
| 32 | unset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ); |
| 33 | } |
| 34 | } |
| 35 | add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 ); |
| 36 |