← All changes
|
extensions/blocks/premium-content/subscriber-view/subscriber-view.php
+1
-5
13.0.2
→
16.3-beta
View file →
| @@ -19,17 +19,13 @@ | ||
| 19 | 19 | * This is done via an action so that we can disable |
| 20 | 20 | * registration if we need to. |
| 21 | 21 | */ |
| 22 | 22 | function register_subscriber_view_block() { |
| 23 | - // Determine required `context` key based on Gutenberg version. | |
| 24 | - $deprecated = function_exists( 'gutenberg_get_post_from_context' ); | |
| 25 | - $uses = $deprecated ? 'context' : 'uses_context'; | |
| 26 | - | |
| 27 | 23 | Blocks::jetpack_register_block( |
| 28 | 24 | SUBSCRIBER_VIEW_NAME, |
| 29 | 25 | array( |
| 30 | 26 | 'render_callback' => __NAMESPACE__ . '\render_subscriber_view_block', |
| 31 | - $uses => array( 'premium-content/planId', 'premium-content/planIds' ), | |
| 27 | + 'uses_context' => array( 'premium-content/planId', 'premium-content/planIds' ), | |
| 32 | 28 | ) |
| 33 | 29 | ); |
| 34 | 30 | } |
| 35 | 31 | add_action( 'init', __NAMESPACE__ . '\register_subscriber_view_block' ); |