Skip to content

Related Posts: do not add markup to attachment pages by default.#12124

Merged
jeherve merged 1 commit intomasterfrom
fix/rp-attachments
May 14, 2019
Merged

Related Posts: do not add markup to attachment pages by default.#12124
jeherve merged 1 commit intomasterfrom
fix/rp-attachments

Conversation

@jeherve
Copy link
Copy Markdown
Member

@jeherve jeherve commented Apr 23, 2019

Fixes #12115

Changes proposed in this Pull Request:

is_single usually returns true for attachments, although it should not. This additional check should solve the issue mentioned in #12115.

If one wishes to enable Related Posts on attachment pages,
they will need to use the jetpack_relatedposts_filter_enabled_for_request filter.

Testing instructions:

  • Start on a site without this patch, where Related Posts are enabled and working, and where the following toggle is enabled under Appearance > Customize > Related Posts.
    image

  • Go to Media > Library on a site

  • Click on "View" below one of your images.

  • Notice the "Related" header, but no actual related posts.

  • Check out this branch.

  • Notice that the Related header disappears from attachment pages, but not from regular posts.

Proposed changelog entry for your changes:

  • Related Posts: do not add markup to attachment pages by default.

@jeherve jeherve added Bug When a feature is broken and / or not performing as intended [Feature] Related Posts [Status] Needs Review This PR is ready for review. [Pri] Normal labels Apr 23, 2019
@jeherve jeherve requested a review from a team April 23, 2019 09:43
@jeherve jeherve self-assigned this Apr 23, 2019
@jeherve
Copy link
Copy Markdown
Member Author

jeherve commented Apr 23, 2019

@macmanx2 Do you think you could test this on your own site with the Beta plugin?

Thank you!

@jetpackbot
Copy link
Copy Markdown
Collaborator

jetpackbot commented Apr 23, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: May 14, 2019.
Scheduled code freeze: May 7, 2019

Generated by 🚫 dangerJS against 4b7b8c7

@macmanx2
Copy link
Copy Markdown
Contributor

On a meetup this week, but I think I can slice in some time to check.

@jeherve jeherve added this to the 7.4 milestone May 9, 2019
Fixes #12115

If one wishes to enable Related Posts on attachment pages,
they will need to use the jetpack_relatedposts_filter_enabled_for_request filter.
@jeherve jeherve force-pushed the fix/rp-attachments branch from f6d5e27 to 4b7b8c7 Compare May 10, 2019 08:06
@kraftbj
Copy link
Copy Markdown
Contributor

kraftbj commented May 14, 2019

@jeherve You good with the WP.com side?

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels May 14, 2019
@matticbot
Copy link
Copy Markdown
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello jeherve! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D28200-code before merging this PR. Thank you!

@jeherve jeherve merged commit b1b8c01 into master May 14, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels May 14, 2019
@jeherve jeherve deleted the fix/rp-attachments branch May 14, 2019 19:47
jeherve added a commit that referenced this pull request May 17, 2019
jeherve added a commit that referenced this pull request May 23, 2019
jeherve added a commit that referenced this pull request May 27, 2019
* Kick off the changelog

* Add 7.3.1

* Update date and post link

* changelog: add #12219

* changelog: add #12170

* changelog: add #12184

* Changelog: add #12268

* Changelog: add #12081

* Changelog: add #12323

* Changelog: add #12204

* Changelog: add #12269

* Changelog: add #12332

* changelog: add #12339

* changelog: add #12209

* Changelog: add #12319

* Changelog: add #12357

* Changelog: add #12124

* Changelog: add #12373

* Changelog: add #12252

* Changelog: add #12383

* Changelog: add #12372

* changelog: add #12337

* Changelog: add #12290

* Changelog: add #12301

* Changelog: add #12061

* Testing list: add instructions for #12061

* Changelog: add #12393

* Update minimum supported version

See #12287

* Changelog: add #12406

* Testing list: add #12406

* Changelog: add #12277

* Changelog: add #12412

* Changelog: add #11318

* Changelog: add #12328

* Changelog: add #12425

* Changelog: add #12380

* Changelog: add #12428

* Changelog: add #12414

* Changelog: add #12395

* Changelog & Testing list: add #12416, #12417, #12418, and #12348

* changelog: add #12379

* Changelog: add #12341

* changelog: add #12444

* Changelog: add #12434

* Changelog: add #12454

* Changelog: add #12460

* Changelog: add #12463

* Changelog: add #12457

* Changelog / testing list: add #10333

* Changelog: add #12467


Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Feature] Related Posts [Pri] Normal Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Related" heading appear in Attachment pages

5 participants