Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHmm, can you post your full code here to check? Also, what is your PHP version and OS?
Anh Tran
KeymasterI understand the issue. It’s what I designed to work like that. I will update the group to maintain the collapsible state.
Anh Tran
KeymasterIMHO, making these 2 strings part of default meta box translation causes a problem: those strings are not in the Meta Box plugin. The good way to add translation is actually translate those strings using
.potfile in the plugin. (You can always send me back the files when it's translated so I can put it in the extension of others to use).Anyway, I like the idea of using options for these strings. It's more flexible for users.
Anh Tran
KeymasterHi,
Are you using the latest version of Meta Box and MB Settings Page? I've updated the plugins yesterday with a fix for this bug. I use
wp_unslash()function to remove slashes from submitted value before saving.Anh Tran
KeymasterAh, it's the default behavior. When cloning a group, all the states are cleared and thus, sub-groups are expanded.
Anh Tran
KeymasterHi, I've just updated the MB Settings Page extension to the version 1.3. Please update both Meta Box (to version 4.12.2) and the MB Settings Page extension. Thanks.
Anh Tran
KeymasterI got it. We're updating the MB Settings Page extension to fix all the styling issues. Please wait a little.
Anh Tran
KeymasterHi,
I think the problem is the order of execution.
The
wp_insert_post_dataruns before the post meta is saved. So, first time you submit, post meta is blank (it hasn't been save), and the post title is blank. After submission, Joe is saved. And when you submit the 2nd time, it gets from post meta (now it is the previous value "Joe") and you get it as the post title.The sequence looks like this:
1. Filter post data with
wp_insert_post_data(where you change the post title)
2. Save post data
3. Save post meta (where your meta are saved)So, in this case, you should not get post meta via
get_post_metato apply to post title. Instead, you can get the new submitted post meta via$_POST['obh_member_first_name'].Hope that makes sense.
Anh Tran
KeymasterHi,
Yes, it's possible. This is the code on doing that:
$group = get_post_meta( get_the_ID(), 'group_id', true ); $images = isset( $group['gallery'] ) ? $group['gallery'] : array(); foreach ( $images as $image ) { $image_info = RWMB_Image_Field::file_info( $image, array( 'size' => 'thumbnail' ) ); }The
RWMB_Image_Field::file_infohelper function will get all the info of the image for you to use.Anh Tran
KeymasterHi Jason,
I haven't tested with BuddyPress yet. I think it's similar to user profile in WordPress admin. I'll take a closer look at that.
Anh Tran
KeymasterHi,
Currently it's not possible yet. But you can add a separate meta box for WC products. I will look into the WC and will find if there's an API to integrate Meta Box fields for WC tabs.
Anh Tran
KeymasterCan you post your code here? I tested it many times before 🙁
Anh Tran
KeymasterI've just tested with settings page and it works for me. Can you try in the browser private mode (with history and cookie cleared)? On some browsers like Firefox, the state of the inputs is saved by the browser, so if you open it once, it will be opened next time you access the page, regardless the settings.
Anh Tran
KeymasterHi,
This is a good idea! I've just added a new param for group "default_state" which accepts "collapsed" value. So you can see it collapsed by default.
Please update group to the latest version (1.2.8).
Anh Tran
KeymasterHi,
Do you mean the "full-height editor and distraction-free functionality" settings set in the screen options:

If it is, then it's not supported at the moment :(.
-
AuthorPosts