/home/desid573/verdenaturopathy.com.au/site3/wp-content/plugins/meta-box/inc
NameSizeModeActions
about/-0755rm
fields/-0777rm
helpers/-0777rm
interfaces/-0777rm
storages/-0777rm
templates/-0777rm
update/-0777rm
walkers/-0777rm
autoloader.php18730644editdlrm
clone.php37550644editdlrm
core.php30830644editdlrm
field-registry.php18620644editdlrm
field.php183420644editdlrm
functions.php108570644editdlrm
loader.php39220644editdlrm
media-modal.php34220644editdlrm
meta-box-registry.php17610644editdlrm
meta-box.php133030644editdlrm
request.php25070644editdlrm
sanitizer.php89600644editdlrm
storage-registry.php5450644editdlrm
validation.php12300644editdlrm
wpml.php37090644editdlrm
Edit: /home/desid573/verdenaturopathy.com.au/site3/wp-content/plugins/meta-box/inc/media-modal.php (3422B)
all(); foreach ( $meta_boxes as $meta_box ) { if ( $this->is_in_modal( $meta_box->meta_box ) ) { $this->fields = array_merge( $this->fields, array_values( $meta_box->fields ) ); } } } /** * Add fields to the attachment edit popup. * * @param array $form_fields An array of attachment form fields. * @param WP_Post $post The WP_Post attachment object. * * @return mixed */ public function add_fields( $form_fields, WP_Post $post ) { foreach ( $this->fields as $field ) { $form_field = $field; $form_field['label'] = $field['name']; $form_field['input'] = 'html'; // Just ignore the field 'std' because there's no way to check it. $meta = RWMB_Field::call( $field, 'meta', $post->ID, true ); $form_field['value'] = $meta; $field['field_name'] = 'attachments[' . $post->ID . '][' . $field['field_name'] . ']'; ob_start(); $field['name'] = ''; // Don't show field label as it's already handled by WordPress. RWMB_Field::call( 'show', $field, false ); $form_field['html'] = ob_get_clean(); $form_fields[ $field['id'] ] = $form_field; } return $form_fields; } /** * Save custom fields. * * @param array $post An array of post data. * @param array $attachment An array of attachment metadata. * * @return array */ public function save_fields( $post, $attachment ) { foreach ( $this->fields as $field ) { $key = $field['id']; $old = RWMB_Field::call( $field, 'raw_meta', $post['ID'] ); $new = isset( $attachment[ $key ] ) ? $attachment[ $key ] : ''; $new = RWMB_Field::process_value( $new, $post['ID'], $field ); // Call defined method to save meta value, if there's no methods, call common one. RWMB_Field::call( $field, 'save', $new, $old, $post['ID'] ); } return $post; } /** * Whether or not show the meta box when editing custom fields in the normal mode. * * @param bool $show Whether to show the meta box in normal editing mode. * @param array $meta_box Meta Box parameters. * * @return bool */ public function is_in_normal_mode( $show, $meta_box ) { return $show && ! $this->is_in_modal( $meta_box ); } /** * Check if the meta box is for editing custom fields in the media modal. * * @param array $meta_box Meta Box parameters. * * @return bool */ protected function is_in_modal( $meta_box ) { return in_array( 'attachment', $meta_box['post_types'], true ) && ! empty( $meta_box['media_modal'] ); } }