canonical-urls
5 months ago
carousel
3 weeks ago
comment-likes
9 months ago
comments
3 months ago
custom-post-types
2 months ago
external-media
9 months ago
google-fonts
2 months ago
gravatar
6 years ago
infinite-scroll
2 months ago
likes
1 month ago
markdown
3 months ago
memberships
2 weeks ago
photon-cdn
1 month ago
plugin-search
3 months ago
post-by-email
9 months ago
related-posts
1 month ago
scan
5 months ago
seo-tools
3 weeks ago
sharedaddy
2 weeks ago
shortcodes
1 month ago
shortlinks
2 months ago
simple-payments
9 months ago
site-icon
9 months ago
sitemaps
3 months ago
stats
8 months ago
subscriptions
1 month ago
theme-tools
3 weeks ago
tiled-gallery
2 months ago
verification-tools
3 months ago
videopress
1 month ago
widget-visibility
3 months ago
widgets
2 weeks ago
woocommerce-analytics
4 months ago
wordads
2 months ago
wpcom-tos
8 months ago
account-protection.php
4 months ago
blaze.php
9 months ago
blocks.php
9 months ago
canonical-urls.php
6 months ago
carousel.php
9 months ago
comment-likes.php
9 months ago
comments.php
5 months ago
contact-form.php
9 months ago
copy-post.php
3 months ago
custom-content-types.php
4 months ago
google-fonts.php
4 months ago
gravatar-hovercards.php
3 months ago
infinite-scroll.php
9 months ago
json-api.php
9 months ago
latex.php
3 months ago
likes.php
3 months ago
markdown.php
9 months ago
module-extras.php
3 weeks ago
module-headings.php
1 month ago
module-info.php
6 months ago
monitor.php
2 months ago
notes.php
1 month ago
photon-cdn.php
9 months ago
photon.php
9 months ago
plugin-search.php
3 weeks ago
podcast.php
1 month ago
post-by-email.php
4 months ago
post-list.php
9 months ago
protect.php
4 months ago
publicize.php
9 months ago
related-posts.php
3 months ago
search.php
9 months ago
seo-tools.php
2 months ago
sharedaddy.php
6 months ago
shortcodes.php
9 months ago
shortlinks.php
3 months ago
simple-payments.php
9 months ago
sitemaps.php
9 months ago
sso.php
2 months ago
stats.php
1 month ago
subscriptions.php
1 month ago
theme-tools.php
9 months ago
tiled-gallery.php
9 months ago
vaultpress.php
9 months ago
verification-tools.php
4 months ago
videopress.php
9 months ago
waf.php
9 months ago
widget-visibility.php
9 months ago
widgets.php
9 months ago
woocommerce-analytics.php
9 months ago
wordads.php
9 months ago
wpcom-reader.php
6 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 |