PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | extensions/blocks/premium-content/subscriber-view/subscriber-view.php +7 -15 12.3.2 → 16.3-beta View file →
@@ -7,9 +7,8 @@
7 7
8 8 namespace Automattic\Jetpack\Extensions\Premium_Content;
9 9
10 10 use Automattic\Jetpack\Blocks;
11 -use Automattic\Jetpack\Status\Host;
12 11 use Jetpack_Gutenberg;
13 12
14 13 const SUBSCRIBER_VIEW_NAME = 'premium-content/subscriber-view';
15 14
@@ -20,22 +19,15 @@
20 19 * This is done via an action so that we can disable
21 20 * registration if we need to.
22 21 */
23 22 function register_subscriber_view_block() {
24 - // Only load this block on WordPress.com.
25 - if ( ( defined( 'IS_WPCOM' ) && IS_WPCOM ) || ( new Host() )->is_woa_site() ) {
26 - // Determine required `context` key based on Gutenberg version.
27 - $deprecated = function_exists( 'gutenberg_get_post_from_context' );
28 - $uses = $deprecated ? 'context' : 'uses_context';
29 -
30 - Blocks::jetpack_register_block(
31 - SUBSCRIBER_VIEW_NAME,
32 - array(
33 - 'render_callback' => __NAMESPACE__ . '\render_subscriber_view_block',
34 - $uses => array( 'premium-content/planId' ),
35 - )
36 - );
37 - }
23 + Blocks::jetpack_register_block(
24 + SUBSCRIBER_VIEW_NAME,
25 + array(
26 + 'render_callback' => __NAMESPACE__ . '\render_subscriber_view_block',
27 + 'uses_context' => array( 'premium-content/planId', 'premium-content/planIds' ),
28 + )
29 + );
38 30 }
39 31 add_action( 'init', __NAMESPACE__ . '\register_subscriber_view_block' );
40 32
41 33 /**