id ) ) { return; } $field = $this->extra; $field['id'] = $this->id; $field['default'] = $this->default; $field['description'] = $this->description; $field['label'] = $this->label; $field['class'] = $field['class'] ?? 'short'; $field['style'] = $field['style'] ?? ''; $field['wrapper_class'] = $field['wrapper_class'] ?? ''; $field['default'] = ( ! $this->meta_value( $thepostid ) && isset( $field['default'] ) ) ? $field['default'] : $this->meta_value( $thepostid ); $field['value'] = $field['value'] ?? $field['default']; $field['name'] = $field['name'] ?? $field['id']; $field['mime_type'] = isset( $field['mime_type'] ) ? implode( ',', $field['mime_type'] ) : ''; $field['multil'] = isset( $field['multil'] ) && $field['multil']; $field['desc_tip'] = $field['desc_tip'] ?? false; // Custom attribute handling $custom_attributes = array(); if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) { foreach ( $field['custom_attributes'] as $attribute => $custom_attribute ) { $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"'; } } echo '