Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Archimidis, I've just checked with WPML and found that if you select the fields as "Copy", it will work well. I have made a video to demo it: https://www.loom.com/share/f18133cb6bcb46658599aa8060f66237.
Please check that if that's your setup. If you have a different setup, please let me know.
Anh Tran
KeymasterHi Archimidis, I'm working on it right now.
Anh Tran
KeymasterHi Kevin,
The meta boxes are added to the registry at
inithook with priority = 20. Can you try to run the code after that?Anh Tran
KeymasterHi Pascal,
The tabs extension works for top-level fields only. It doesn't support for sub-fields in groups (yet). I've added this as a note and will consider to work on it.
January 29, 2020 at 9:45 AM in reply to: ✅Manually/Programmatically update Image Advanced field values #18046Anh Tran
KeymasterHi Mohammad,
For image fields, each image ID is stored in a single row in the DB. If you don't want to delete old rows, then you can get them all via
get_post_metafunction and do some check before updating. But I guess it takes more (maybe a lot) of code to check. A better and simpler way to do that is delete all old rows and add new rows.Anh Tran
KeymasterHi Archimedes, thanks for your feedback. Let us check the problem and will fix it as soon as we can.
Anh Tran
KeymasterHi,
It's not available in the plugin yet. There was a request to add it. I'll merge this topic into the older topic so we'll have discussion on the same place.
January 28, 2020 at 9:54 PM in reply to: ✅Manually/Programmatically update Image Advanced field values #18034Anh Tran
KeymasterHi Mohammad,
You can do that with this code:
// Add $your_images_ids = [1,2,3]; foreach ( $your_images_ids as $image_id ) { add_post_meta( $post_id, $field_id, $image_id, false ); // Notice the last parameter. } // Delete delete_post_meta( $post_id, $field_id, $image_id );January 28, 2020 at 9:51 PM in reply to: ✅How to get a label from a select_advanced field that is in a group field? #18033Anh Tran
KeymasterHi Martin,
The helper function doesn't return labels for the field, but only values. You can get the label with this code:
$parts_name = rwmb_meta( 'group' ); $group_settings = rwmb_get_field_settings( 'group' ); $select_settings = $group_settings['fields']['select_field_id']; foreach ( $parts_name as $part_name ) { $value = $part_name['item']; $label = $select_settings['options'][$value]; echo $label; }Anh Tran
KeymasterI meant the MB User Meta extension. Its changelog is here. I've just tested your code and it works fine to me.
Anh Tran
KeymasterAnh Tran
KeymasterHi pza,
Have you updated the plugin to the latest version? There was an issue with enqueuing assets in MB User Meta extension and that was fixed recently.
Anh Tran
KeymasterHi Nick,
Thanks for your reply. I just noticed I have a setter method public, which is quite simple (and naive). So, it's fine to make the property public. I just released a new version for the extension. Please update.
Anh Tran
KeymasterHi Dave,
Please try to add multiple popups. Each popup corresponds to a post. That way you don't need to populate the popup dynamically.
Anh Tran
KeymasterHi Nick, the reason we make the property protected is because we don't want people to change it.
Can you tell me why do you want to the the table name? Is that the table you created with your own code? Why don't you just pass the string (table name) instead of getting from fields?
-
AuthorPosts