Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterYes, the array of info contains a parameter
IDfor the image ID.February 27, 2017 at 11:02 AM in reply to: ✅Bug with keeping visible the fields which are already saved #5170Anh Tran
KeymasterHi, thanks for reporting. It's actually a bug in the plugin. I've just fixed it in version 1.0.5. Please update.
Anh Tran
KeymasterHi Alois,
Can you please re-try it again? I couldn't replicate it. The + Add More works for me.
In case it still happens, please verify all the fields, make sure them have unique ID (even in the sub-groups). Also try to deactivate all other plugins to see if there's any JS conflicts.
Let me know if it still happens.
February 23, 2017 at 8:39 AM in reply to: ✅Bug with keeping visible the fields which are already saved #5156Anh Tran
KeymasterHi,
Can you send me the code you use? I tried to replicate the bug but I couldn't. It works fine to me.
Anh Tran
KeymasterHi,
Thank you very much for asking. The problem is the jQuery working on DOM elements. You can help us by giving us a testing code to register meta boxes and probably some help on working with jQuery & DOM elements.
Anh Tran
KeymasterThanks for letting me know. I've just fixed it on Github. New version will be released soon: https://github.com/rilwis/meta-box
Anh Tran
KeymasterHi, you can use
image_selectfield. It's very similar to radio field. This is the demo code:https://github.com/rilwis/meta-box/blob/master/demo/image-select.php
Anh Tran
KeymasterSorry, I missed a check for WPML which causes the Fatal error. Please try again.
Anh Tran
KeymasterHi again,
I was able to do this! You need to download the development version on Github to have this feature: https://github.com/rilwis/meta-box
To enable a meta box for media modal, you need to set:
'post_types' => 'attachment', 'media_modal' => true,to the meta box parameters.
Take a look at the demo here: https://github.com/rilwis/meta-box/blob/master/demo/media-modal.php
Anh Tran
KeymasterI'm afraid I can't tell the timeline for now :(. I will work on that until the end of next month and hopefully can resolve it.
Anh Tran
KeymasterHi Dave,
I've just pushed a commit on Github to add supports for this. Please download the development version here: https://github.com/rilwis/meta-box (I will update the plugin a little bit later).
Instead of "move" description under the label, you just need to add parameter
label_descriptionto the field and that's done.Anh Tran
KeymasterHi Dave,
This feature is not available yet in Meta Box. It's still being developed. We have some technical issues that relates with the core and need to fix it.
I will let you know when it's available.
Anh Tran
KeymasterHi,
1. You need to put this code in the meta box parameters, for more info, please read this docs:
https://metabox.io/docs/validation/
2. The current version of Meta Box only supports validating fields when editing posts/pages. I've made and improvement to support user meta and term meta. That feature is available on Github: https://github.com/rilwis/meta-box. I will update the plugin a little bit later when we fix some other bugs.
Anh Tran
KeymasterHi,
I've just checked the CSS of the rows and found that the CSS you're seeing is in the old version of the extension. Please update the extension to have that fixed.
Anh Tran
KeymasterHi,
I think you can do like this in your plugin:
$options = array( 'ea' => 'Each', 'hr' => 'Hourly', 'day' => 'Daily', 'wk' => 'Weekly', 'mth' => 'Month', 'yr' => 'Yearly', ); $options = apply_filters( 'prefix_unit_options', $options );Then when registering meta boxes, just specify
'options' => $options.It might be a better idea to wrap the value of options to a function like:
function prefix_get_unit_option() { $options = ...; return apply_filters( 'prefix_unit_options', $options ); }And use
'options' => prefix_get_unit_option().This way you can make a repeatable field in your settings page and get the values, passing them to the
prefix_get_unit_option()to build the array of options.function prefix_get_unit_option() { $options = ...; // Default options $settings = get_option( 'option_name' ); if ( ! empty( $settings['unit_options'] ) ) { foreach ( $settings['unit_options'] as $value => $label ) { $options[$value] = $label; } } return apply_filters( 'prefix_unit_options', $options ); } -
AuthorPosts