Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Jackky,
Your idea about column class is nice. Will think about it. The suggested syntax I think will be problematic if we use with groups. So let's just keep it as it is.
Anh Tran
KeymasterThanks a lot. Just fixed the bug with the editor!
Cheers
AnhAnh Tran
KeymasterJust added 2 options
submit_buttonandmessagefor you 🙂Anh Tran
KeymasterHi,
I guess the problem is when you hook
send_mails_on_publish. Probably it's hook too soon, sooner when Meta Box updates post meta.Currently Meta Box uses
save_post_{$post_type}with priority = 10 to save post meta. You should hook after that (atsave_postor at the same hook with higher priority).Looking at the function params, I think you're using
transition_post_status. It's fired inwp_transition_post_statusfunction that runs beforesave_post_*hook.Anh Tran
KeymasterSomehow my code that remove slashed was removed from the released version. Probably it was an error while merging. I've just pushed a fix for that. Also added 2 options:
submit_buttonandmessagefor the text of submit button and successful message.Please update.
PS: Can you post the screenshot of your screen when replying this thread? Don't you see any button in the reply box?
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.
-
AuthorPosts