Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
I think hooking to
wp_insert_post_datais too generic as it fires every time a post is added/updated.The extension already have 2 filters that you can use to change the post data when saving:
rwmb_frontend_update_post_datafor updating posts andrwmb_frontend_insert_post_datafor creating new posts. Previously it has only 1 params: the submitted post data. But I've just updated the extension, adding 2nd parameter: the shortcode params, so you can use to check whether you are on the right meta box.This is sample code:
add_filter( 'rwmb_frontend_insert_post_data', 'your_function', 10, 2 ); add_filter( 'rwmb_frontend_update_post_data', 'your_function', 10, 2 ); function your_function( $data, $config ) { if ( $config['id'] !== 'your_meta_box_id' ) { return $data; } // Your code to get post_title $data['post_title'] = ...; return $data; }Please try it and let me know if you need anything. I can update the extension to make it works for you.
Anh Tran
KeymasterHi, I see the bug. I'm debugging it and will fix it as soon as I can.
Anh Tran
KeymasterHi Hazmi,
Regarding the 1st problem, can you please describe steps to replicate it? I couldn't replicate on my side. But my guess is the saved value in the DB. If you already saved values of your fields into an option, then when you add a new field which has name already registered before, then the value might be taken from the previous one. Not sure if that's the case, but you can try remove the option in the DB and try again.
Regarding the problem with QTag, do you have any wysiwyg field in your settings page? QTags is available only for the editor. With the code above, I can't see anything in the console:
Anh Tran
KeymasterHi,
I've just fixed it on Github. The error message now will display below the inputs. Can you please try it?
Anh Tran
KeymasterHi,
I've just tried your code and this is my screenshot:
Can you guys post the code that includes the heading field?
Anh Tran
KeymasterHi, I've fixed this bug on Github. Can you please try it?
PS: My previous reply was for the PHP warning that you posted. Sorry for misunderstanding.
Anh Tran
KeymasterHi, I'm still checking it. Please wait.
Anh Tran
KeymasterHi,
The field type "sidebar" has just been added. Demo here.
Anh Tran
KeymasterThanks, I will check it now.
Anh Tran
KeymasterCan you please post the code of meta box so I can check?
Thanks,
AnhAnh Tran
KeymasterHi,
You can bundle the extensions in a plugin. Just copy the extensions to plugin's folder, then include the main PHP file of each extension. For more info, please follow this docs.
Regarding Composer, unfortunately we don't support extensions for now. They're hosted on private repos on Bitbucket.
Thanks,
AnhAnh Tran
KeymasterOh, that's great. I will contact Joe now.
Edit: Email is sent. Waiting for replies.
Anh Tran
KeymasterThe error says that a meta box misses
titleparameter. Can you please check your code that create meta boxes, checking if any meta box doesn't havetitleparameter?Anh Tran
KeymasterHi David,
This is not available for now. But that's a good idea. We'll think about how to implement that ๐
-
AuthorPosts