markdown.php 950 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Module Name: Markdown
  4. * Module Description: Write posts or pages in plain-text 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. include dirname( __FILE__ ) . '/markdown/easy-markdown.php';
  14. /**
  15. * Remove checkbox set in modules/markdown/easy-markdown.php.
  16. * We don't just remove the register_setting call there because the checkbox is
  17. * needed on WordPress.com, where the file is sync'ed verbatim.
  18. */
  19. function jetpack_markdown_posting_always_on() {
  20. // why oh why isn't there a remove_settings_field?
  21. global $wp_settings_fields;
  22. if ( isset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] ) ) {
  23. unset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] );
  24. }
  25. }
  26. add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 );