acf_field_oembed::render_field_settingspublicACF 3.6

Create extra options for your field. This is rendered when editing a field. The value of $field['name'] can be used (like bellow) to save extra data to the $field

Method of the class: acf_field_oembed{}

No Hooks.

Returns

null. Nothing (null).

Usage

$acf_field_oembed = new acf_field_oembed();
$acf_field_oembed->render_field_settings( $field );
$field(required)
.

Changelog

Since 3.6 Introduced.

acf_field_oembed::render_field_settings() code ACF 6.8.8

function render_field_settings( $field ) {
	acf_render_field_setting(
		$field,
		array(
			'label'       => __( 'Embed Size', 'acf' ),
			'type'        => 'text',
			'name'        => 'width',
			'prepend'     => __( 'Width', 'acf' ),
			'append'      => 'px',
			'placeholder' => $this->width,
		)
	);

	acf_render_field_setting(
		$field,
		array(
			'label'       => __( 'Embed Size', 'acf' ),
			'type'        => 'text',
			'name'        => 'height',
			'prepend'     => __( 'Height', 'acf' ),
			'append'      => 'px',
			'placeholder' => $this->height,
			'_append'     => 'width',
		)
	);
}