Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Stefan,
Can you please try this fix?
https://github.com/wpmetabox/meta-box/commit/2c2e7da9e3cb340edcff2d80069e1fb27f1910a2
June 20, 2019 at 2:45 PM in reply to: ✅Gutenberg Sidebar Media Upload Clash with image_advanced #15010Anh Tran
KeymasterHi @latlong,
That's exactly the problem in the topic you mentioned above. The problem is media items (models) used in Gutenberg and our Backbone collection are shared (the WP's API does that). And Gutenberg clears the collection (which removes the items) when selecting another image (which is weird, since in the classic editor, it doesn't happen). I'm still looking for a fix.
Anh Tran
KeymasterHi Bruno,
Please try to set a custom CSS class for the inputs which starts with
rwmb. See here to understand how the clone works.Anh Tran
KeymasterHi Ryan,
Can you send me a screenshot of the bug? And the code?
I tested with
maxattribute and validation, and both work without problem. I'm using Firefox.Anh Tran
KeymasterHi Engo,
I've just updated the link for MB Builder 3.0.0-RC1. It's a RC-version and the link is temporary. I'll release the final version when it's fully tested.
Anh Tran
KeymasterHi, I've just tested the plugin and it works fine to me. Here is the video I made for that:
Update 1: I replied too fast. I didn't notice you were talking about custom table. Let me check that again.
Update 2: I've just pushed a fix to the plugin here. Can you please try it?
Anh Tran
KeymasterHi Dave,
I've just push a fix for MB Conditional Logic extension. Now that works for elements outside cloneable groups.
The update for Meta Box AIO will come later.
June 12, 2019 at 9:30 AM in reply to: Can I use Metabox to create forms for Woocommerce My Account Session? #14941Anh Tran
KeymasterHi Jefferson,
We have 2 extensions for front-end forms: MB Frontend Submission (for submitting posts) and MB User Profile (for editing user details). If your forms have some similarity, then you can use them.
Anh Tran
KeymasterHi @SWS,
You're right about creating taxonomies in 2 places. I've just added a commit that adds
remove_defaultparam for taxonomy field, which helps removing the default WordPress taxonomy meta box (it's enabled by default). Please try it.Anh Tran
KeymasterAh, I got it.
To show the taxonomy on the front end, you need to create a field with the field type
taxonomyortaxonomy_advanced.The meta box for the taxonomy field on the right is the default WordPress's meta box, which won't show on the front end.
June 10, 2019 at 1:43 PM in reply to: ✅Allow editing form data which is submitted by "that" author #14909Anh Tran
KeymasterSorry, please try this code for the 2nd step:
add_filter( 'do_shortcode_tag', function ( $output, $tag, $attr ) { if ( $tag !== 'mb_frontend_form' || $attr['id'] !== 'my_form' ) { return $output; } // Check if current user is the post author. $post_id = filter_input( INPUT_GET, 'rwmb-post-id', FILTER_SANITIZE_NUMBER_INT ); if ( ! $post_id ) { return $output; } $post = get_post( $post_id ); if ( $post->post_author != get_current_user_id() ) { return 'You are not allowed to edit this post'; } return $output; }, 10, 3 );Anh Tran
KeymasterHi @Jefferson,
Can you post the code of the gallery field and do you know why the first item is empty?
June 10, 2019 at 11:55 AM in reply to: ✅Allow editing form data which is submitted by "that" author #14906Anh Tran
KeymasterIf you try to edit the existing posts, then only admin can edit them. Because their post author is the admin (technically when submitting posts, the plugin doesn't set the post author, and that falls back to the admin).
This code will work with new submitted posts, where the code in the step 1 sets the proper post author.
For the existing posts, you need to set the post author manually. Then the code will work properly.
Anh Tran
KeymasterHi Brian,
Can we actually do this with WooCommerce & the MB Custom Table or was this just a hypothetical example?
I'm afraid we can't. This involves a lot of the internal logic in WooCommerce. Modifying the data will break the logic and make it not working.
-
AuthorPosts