Repository navigation
Related posts: use latest core function to check block-based theme - #24622
Conversation
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. |
I cannot figure out how to mock wp_is_block_theme() as it is already defined.
coder-karen
left a comment
There was a problem hiding this comment.
Tests well.
Pretty sure it's not within the scope of this PR (and not sure if it's expected behaviour), but if I then go and add an additional Related Posts block to a post after adding it to the single post template, the second one shows up. If I try and add another RP block to the page, the RP block option is 'greyed out' - yet it let me add it the first time. Something for another PR?
Anyway will approve this one as it does what it advertises to do!
I believe that's expected. We've set it so the Related Posts block can only be used once per post: You consequently get one per post, and then additional blocks outside of the post context, when you use the site editor. |
Fixes #24619
Changes proposed in this Pull Request:
gutenberg_is_fse_theme(), to check whether a theme was a block-based theme. Now that the feature made its way to core, there is a Core function we can (and should) use instead:wp_is_block_theme().Note
I had originally added a new test, but I could not get it to work. I kept receiving this error:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: