jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Subscriptions: add block binding returning subscriber count

Open simison opened this issue 4 months ago • 11 comments

Adds new block binding API for subscriptions, available in WP 6.5. (Dev note)

With block:

<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"jetpack/subscribers","args":{"key":"count"}}}}} -->
<p>Subscribers</p>
<!-- /wp:paragraph -->

You would get in the frontend of the post:

image

Same text should appear in the editor, but at least for me I just see binding paragraph but no text:

Screenshot 2024-03-07 at 13 26 24

Proposed changes:

  • Adds new block binding API for subscriptions, available in WP 6.5

Other information:

  • [ ] Have you written new tests for your changes, if applicable?
  • [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
  • [ ] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • You need to run WP 6.5 RC for this to work.

simison avatar Mar 07 '24 11:03 simison