Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1829,15 +1829,3 @@ function jetpack_do_after_gravatar_hovercards_deactivation() {
update_option( 'gravatar_disable_hovercards', 'disabled' );
}
add_action( 'jetpack_deactivate_module_gravatar-hovercards', 'jetpack_do_after_gravatar_hovercards_deactivation' );

/**
* Actions performed only when Markdown is activated through the endpoint call.
*
* @since 4.7.0
*/
function jetpack_do_after_markdown_activation() {

// When Markdown is activated, enable support for post editing automatically.
update_option( 'wpcom_publish_posts_with_markdown', true );
}
add_action( 'jetpack_activate_module_markdown', 'jetpack_do_after_markdown_activation' );
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Markdown: Keep Markdown for posts off after a Jetpack update when it was turned off.
5 changes: 0 additions & 5 deletions projects/plugins/jetpack/class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,6 @@ public function plugin_upgrade() {
Jetpack_Options::delete_option( 'identity_crisis_whitelist' );
}

// Make sure Markdown for posts gets turned back on.
if ( ! get_option( 'wpcom_publish_posts_with_markdown' ) ) {
update_option( 'wpcom_publish_posts_with_markdown', true );
}

/*
* Minileven deprecation. 8.3.0.
* Only delete options if not using
Expand Down
14 changes: 14 additions & 0 deletions projects/plugins/jetpack/modules/markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ function jetpack_markdown_posting_always_on() {
}
}
add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 );

if ( ! function_exists( 'jetpack_do_after_markdown_activation' ) ) {
/**
* Turn on Markdown for posts when the module is activated, by any path.
*
* Lives here because Modules::activate() loads this file before it fires the activation hook.
*
* @since 4.7.0
*/
function jetpack_do_after_markdown_activation() {
update_option( 'wpcom_publish_posts_with_markdown', true );
}
}
add_action( 'jetpack_activate_module_markdown', 'jetpack_do_after_markdown_activation' );
Loading