Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterOops! What a big mistake! I've updated the docs, thanks for your comment ๐
Anh Tran
KeymasterHi again,
I've just updated the Meta Box plugin on Github with an improvement for clone feature, which includes fix for the clone icon in this topic. I will release the new version after testing. If you need it works immediately, you can try the development version on Github.
Thanks!
September 18, 2015 at 10:43 AM in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1460Anh Tran
KeymasterGreat, I just got the email. We'll talk in email for details ๐
Anh Tran
KeymasterHi Sam,
I tested your code and tried to replicate the bug. After testing, I found that this bug was reported in this topic before. It was also reported on Github and was fixed.
I've just released the new version of Meta Box (4.5.7) which has a fix for this. The new version works fine to me. Please update Meta Box plugin and let us know if it works for you.
Thanks.
Anh Tran
KeymasterI think that works, too. I will add this question to the Documentation as this is maybe useful for others as well.
Anh Tran
KeymasterHi again, I've just updated the Updater extension today with a fix for PHP notice bugs which I think caused the issue of wrong number of updates. I tested in my environments and it worked correctly. Can you please update and check that?
Thanks!
Anh Tran
KeymasterHi mendio,
Yes, you can do that using the
rwmb_{$field_id}_valueandrwmb_{$field_id}_metafilters (see this documentation) to change the displayed value and saved value. Here is the sample code:add_filter( 'rwmb_ID_value', function( $value ) { return date( 'Y-m-d', strtotime( $value ) ); } ); add_filter( 'rwmb_ID_meta', function( $value ) { return date( 'd-m-Y', strtotime( $value ) ); } );Don't forget to change
IDto your field ID.September 13, 2015 at 11:13 PM in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1434Anh Tran
KeymasterI received your email and replied. Please look at the email.
Anh Tran
KeymasterGlad to hear it's fixed!
Thanks for using Meta Box.
September 10, 2015 at 10:46 AM in reply to: Radio buttons not rendering/their value isn't recorded #1409Anh Tran
KeymasterThis is weird, please send me info (same as in the another ticket) so I can look into it for you.
September 10, 2015 at 10:45 AM in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1408Anh Tran
KeymasterHi, please send me info in the Contact page. I will look at the issue for you ๐
Anh Tran
KeymasterHi bravebits,
Does the answer in the topic https://support.metabox.io/topic/how-to-make-conditional-logic-for-image-upload/ solve your problem? My developer tested with similar code and said it was working.
Regarding your code above, what is your
$prefix? Is itwr?Anh Tran
KeymasterI think the best way to do that is via CSS. You can install a plugin like Add admin CSS. The CSS to make each label display in ins own line is quite simple:
.rwmb-radio-wrapper .rwmb-input > label { display: block; }If you don't want to use a plugin, you can enqueue a CSS file on Add new/Edit page with the same snippet above.
This way you also can add more margin to label for a better look.
But if you have to use PHP to output line break after each label tag, please use
rwmb_radio_htmlfilter, like this:add_filter( 'rwmb_radio_html', function html( $output, $field, $meta ) { $html = array(); $tpl = '<label><input type="radio" class="rwmb-radio" name="%s" value="%s"%s> %s</label>'; foreach ( $field['options'] as $value => $label ) { $html[] = sprintf( $tpl, $field['field_name'], $value, checked( $value, $meta, false ), $label ); } return implode( '<br>', $html ); }, 10, 3 );Anh Tran
KeymasterHi Jon, let me ask my developer if he is interested in working freelance with you on that project and will reply you via email.
Thanks.
Anh Tran
KeymasterHi Maurice,
If you want to display meta value in a template file like
single.php, please open that file (notfunctions.php) and insert the following code at the place you want to show the value:echo rwmb_meta( 'FIELD_ID', 'type=FIELD_TYPE' );Don't forget to change
FIELD_IDandFIELD_TYPEto your specific field ID and field type. -
AuthorPosts