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

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