Code Duplication    Length = 12-12 lines in 2 locations

includes/abstracts/field.php 2 locations

@@ 230-241 (lines=12) @@
227
	 *
228
	 * @return void
229
	 */
230
	public function set_attributes( $attributes ) {
231
232
		$attr = '';
233
234
		if ( ! empty( $attributes ) && is_array( $attributes ) ) {
235
			foreach ( $attributes as $k => $v ) {
236
				$attr .= esc_attr( $k ) . '="' . esc_attr( $v ) . '" ';
237
			}
238
		}
239
240
		$this->attributes = $attr;
241
	}
242
243
	/**
244
	 * Set CSS styles.
@@ 252-263 (lines=12) @@
249
	 *
250
	 * @return void
251
	 */
252
	public function set_style( $css ) {
253
254
		$styles = '';
255
256
		if ( ! empty( $css ) && is_array( $css ) ) {
257
			foreach ( $css as $k => $v ) {
258
				$styles .= esc_attr( $k ) . ': ' . esc_attr( $v ) . '; ';
259
			}
260
		}
261
262
		$this->style = $styles;
263
	}
264
265
	/**
266
	 * Set classes.