Skip to content

Related Posts is permanently disabled if you edit settings via Customizer #6323

@gravityrail

Description

@gravityrail

Steps to reproduce the issue

  1. On a fresh install (or with freshly-deleted jetpack_relatedposts options), enable the Related Posts module
  2. Go into the customizer and edit Related Posts settings (e.g. disable show date)
  3. Save

What I expected

Date is hidden

What happened instead

Related Posts is permanently disabled and there's no way to re-enable it!

Suggested solution

If we haven't enabled the UI which shows the "toggle" option for whether RP's are enabled, they should ALWAYS BE ENABLED since otherwise there's no way to switch them on.

Right now the only workaround is for users to implement something like this in an mu-plugin:

<?php

add_filter( 'jetpack_relatedposts_filter_allow_feature_toggle', 'enable_rp_feature_toggle' );

function enable_rp_feature_toggle( $val ) {
	return true;
}

and then manually re-enable RP's in the Reader settings every time they change a setting.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions