Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
We've never changed plugin slug. It's always
meta-box-group. I think you or someone made a typo mistake totmeta-box-group. There's no reason for a "t" here.Anh Tran
KeymasterHi Thomas,
Let me see if I can find a workaround for this.
Anh Tran
KeymasterHi Ahmed,
I have fixed the 1st issue with this commit. Can you please try it?
Regarding the 2nd issue with the remove clone button, it's actually a bug in your code. Please just close the
</b>tag properly and the bug will go away.Let me know if you still see any bug.
Anh Tran
KeymasterHi,
Thanks for a great question. There was no such functions. I've just added it on Github and added example in the documentation. Please update the code for Meta Box from Github and follow the documentation. I will release a new version soon.
Anh Tran
KeymasterHi Thomas,
I got it. The easiest way to order those fields is just order the code for them. The code that write first will display first.
Let's say you want to move "Hide Post/Page Theme Header" to the top of the list, then just move this code to the top
if ( isset( $meta_box['id'] ) && 'totalpress-post-page-options' == $meta_box['id'] ) { $meta_boxes[$tp_primo_mb]['fields'][] = array( 'id' => 'tp_primo_page_options_hide_header', 'type' => 'checkbox', 'desc' => esc_html__('Hide Post/Page Theme Header','tp-primo'), 'tab' => 'totalpress_hide_post_page_elements', ); // Code for other checkboxes goes here }January 3, 2018 at 9:12 AM in reply to: Function similar to update_post_meta for MetaBox.io custom table plugin #8106Anh Tran
KeymasterWe don't have such function yet. Please use
$wpdb->insert. It's short and fast.Anh Tran
KeymasterOh I see. Glad that you figured it out ๐
Anh Tran
KeymasterI can't access the site. Can you send me the username/password via contact form?
Anh Tran
KeymasterAnh Tran
KeymasterHmm, that's strange. Can you post your code to create meta boxes here?
Anh Tran
KeymasterHi Thomas,
Thanks for a nice question. Yes, it's doable. In the code from the tutorial, notice this part:
add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes', 20 );The last number is the priority of the code to add fields to a meta box. The plugin which has lower number will run first. So, if you have 6 plugins, just set different numbers for them in a order you want, like this:
add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes_1', 20 ); add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes_2', 30 ); add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes_3', 40 );Anh Tran
KeymasterHi,
I'm afraid to say it's not possible at the moment. Fields must be created with Meta Box in order to work with the Group extension. Fields created by other plugins work in a different way. So, they're not compatible.
We're planning to write a conversion tool to convert fields created from other plugins to Meta Box. We haven't started it yet, because there are some higher priorities. But we'll try to do it asap.
Anh Tran
KeymasterHi Thomas,
Glad that you have resolved this problem. If you don't mind, please share your solution (or link to the tutorial) here so others can refer if they have a similar problem.
Thanks,
AnhAnh Tran
KeymasterI got it. The updating process for Builder is running. When it's finished, you'll see that option.
Anh Tran
KeymasterHi,
Regarding the 1st question: I think adding restriction to the form is ok, we can do that. However, even if the form is restricted, you still need to prevent non-wanted users to access that page? What do you think about this?
Regarding the 2nd problem: all post data is processed via
wp_update_postandwp_insert_post. We don't run any sanitize feature for that. However, you can use these filters to perform an extra check.This is an interesting question and I'd love to hear your feedback.
Thanks,
Anh -
AuthorPosts