Description
The “fun_attachment_fields” filter is used to add additional input fields to the edit image form.
A plugin (or theme) can modify the output with the code:
<?php add_filter( 'fun_attachment_fields', 'filter_function_name'); ?>
The hook is located in the file-un-attach/_inc/admin.php file.
Example
// Apply filter function add_fun_attachment_fields( $form_fields, $image ) { return form_fields['site'] = array( 'input' => 'html', 'label' => __( 'Site' ), 'html' => '<input name="site" id="site" value="sitename" type="text" />' ); } add_filter('fun_attachment_fields', 'add_fun_attachment_fields');
Note: $output is a HTML string, $image is an object.
Leave a Reply