PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3 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 All 508 releases
← All changes | modules/comments/admin.php +0 -46 16.3-beta → 16.3-a.1 View file →
@@ -4,11 +4,8 @@
4 4 *
5 5 * @package automattic/jetpack
6 6 */
7 7
8 -use Automattic\Jetpack\Comments\Block_Editor;
9 -use Automattic\Jetpack\Comments\Comments;
10 -
11 8 if ( ! defined( 'ABSPATH' ) ) {
12 9 exit( 0 );
13 10 }
14 11
@@ -135,51 +132,8 @@
135 132 'discussion',
136 133 'jetpack_comment_form_color_scheme',
137 134 array( $this, 'comment_form_color_scheme_sanitize' )
138 135 );
139 -
140 - // The rebuilt comment form is what offers blocks; the package may lag this file on a staged deploy.
141 - if ( ! class_exists( Block_Editor::class ) || ! Comments::is_enabled() ) {
142 - return;
143 - }
144 -
145 - add_settings_field(
146 - 'enable_blocks_comments',
147 - __( 'Allow Blocks', 'jetpack' ),
148 - array( $this, 'allow_blocks_field' ),
149 - 'discussion',
150 - 'jetpack_comment_form'
151 - );
152 -
153 - register_setting(
154 - 'discussion',
155 - 'enable_blocks_comments',
156 - array( $this, 'allow_blocks_sanitize' )
157 - );
158 - }
159 -
160 - /**
161 - * Blocks in comments setting.
162 - */
163 - public function allow_blocks_field() {
164 - ?>
165 -
166 - <label>
167 - <input name="enable_blocks_comments" type="checkbox" value="1" <?php checked( (bool) get_option( 'enable_blocks_comments', true ) ); ?>>
168 - <?php esc_html_e( 'Enable blocks in comments', 'jetpack' ); ?>
169 - </label>
170 -
171 - <?php
172 - }
173 -
174 - /**
175 - * Sanitize the blocks in comments setting.
176 - *
177 - * @param mixed $val The submitted value.
178 - * @return string
179 - */
180 - public function allow_blocks_sanitize( $val ) {
181 - return $val ? '1' : '0';
182 136 }
183 137
184 138 /**
185 139 * Discussions setting section blurb