/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/wpml.php (3709B)
get( $meta_data['key'], get_post_type( $meta_data['master_post_id'] ) ); if ( false === $field || ! in_array( $field['type'], $this->field_types, true ) ) { return $value; } // Object type needed for WPML filter differs between fields. $object_type = 'taxonomy_advanced' === $field['type'] ? $field['taxonomy'] : $field['post_type']; // Translating values, whether are stored as comma separated strings or not. if ( false === strpos( $value, ',' ) ) { $value = apply_filters( 'wpml_object_id', $value, $object_type, true, $target_language ); return $value; } // Dealing with IDs stored as comma separated strings. $translated_values = array(); $values = explode( ',', $value ); foreach ( $values as $v ) { $translated_values[] = apply_filters( 'wpml_object_id', $v, $object_type, true, $target_language ); } $value = implode( ',', $translated_values ); return $value; } /** * Modified field depends on its translation status. * If the post is a translated version of another post and the field is set to: * - Do not translate: hide the field. * - Copy: make it disabled so users cannot edit. * - Translate: do nothing. * * @param array $field Field parameters. * * @return mixed */ public function modify_field( $field ) { global $wpml_post_translations; if ( empty( $field['id'] ) ) { return $field; } // Get post ID. $request = rwmb_request(); $post_id = $request->filter_get( 'post', FILTER_SANITIZE_NUMBER_INT ); if ( ! $post_id ) { $post_id = $request->filter_post( 'post_ID', FILTER_SANITIZE_NUMBER_INT ); } // If the post is the original one: do nothing. if ( ! method_exists( $wpml_post_translations, 'get_source_lang_code' ) || ! $wpml_post_translations->get_source_lang_code( $post_id ) ) { return $field; } // Get setting for the custom field translation. $custom_fields_translation = apply_filters( 'wpml_sub_setting', false, 'translation-management', 'custom_fields_translation' ); if ( ! isset( $custom_fields_translation[ $field['id'] ] ) ) { return $field; } $setting = intval( $custom_fields_translation[ $field['id'] ] ); if ( 0 === $setting ) { // Do not translate: hide it. $field['class'] .= ' hidden'; } elseif ( 1 === $setting ) { // Copy: disable editing. $field['disabled'] = true; } return $field; } }