Code Duplication    Length = 11-11 lines in 2 locations

includes/abstracts/abstract-wc-rest-controller.php 1 location

@@ 310-320 (lines=11) @@
307
	 * @param array  $setting
308
	 * @return string
309
	 */
310
	public function validate_setting_textarea_field( $value, $setting ) {
311
		$value = is_null( $value ) ? '' : $value;
312
		return wp_kses( trim( stripslashes( $value ) ),
313
			array_merge(
314
				array(
315
					'iframe' => array( 'src' => true, 'style' => true, 'id' => true, 'class' => true ),
316
				),
317
				wp_kses_allowed_html( 'post' )
318
			)
319
		);
320
	}
321
322
	/**
323
	 * Get the batch schema, conforming to JSON Schema.

includes/abstracts/abstract-wc-settings-api.php 1 location

@@ 841-851 (lines=11) @@
838
	 * @param  string|null $value Posted Value
839
	 * @return string
840
	 */
841
	public function validate_textarea_field( $key, $value ) {
842
		$value = is_null( $value ) ? '' : $value;
843
		return wp_kses( trim( stripslashes( $value ) ),
844
			array_merge(
845
				array(
846
					'iframe' => array( 'src' => true, 'style' => true, 'id' => true, 'class' => true ),
847
				),
848
				wp_kses_allowed_html( 'post' )
849
			)
850
		);
851
	}
852
853
	/**
854
	 * Validate Checkbox Field.