acf_form_attachment::__constructpublicACF 5.0.0

This function will setup the class functionality

Method of the class: acf_form_attachment{}

No Hooks.

Returns

null. Nothing (null).

Usage

$acf_form_attachment = new acf_form_attachment();
$acf_form_attachment->__construct();

Changelog

Since 5.0.0 Introduced.

acf_form_attachment::__construct() code ACF 6.8.8

function __construct() {

	// actions
	add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );

	// render
	add_filter( 'attachment_fields_to_edit', array( $this, 'edit_attachment' ), 10, 2 );

	// save
	add_filter( 'attachment_fields_to_save', array( $this, 'save_attachment' ), 10, 2 );
}