Forum Replies Created
-
AuthorPosts
-
March 6, 2017 at 10:03 AM in reply to: How to display a custom file upload error in a plupload_image field? #5219
Anh Tran
KeymasterHi @tgarda,
That's true. The errors are handled by the JS of plupload. The error messages are sent to JS via the file
wp-includes/script-loader.phpand then used inwp-includes/js/plupload/wp-plupload.js(line 327). I haven't found any PHP hook or how to add a custom error while uploading.March 4, 2017 at 1:42 PM in reply to: Orderby and Sort Order on frontend for Post Checkbox List. #5210Anh Tran
KeymasterThe
menu_orderis used by WP_Query which has effect only when you use a custom query.Because the
rwmb_metafunction only returns the values stored in the post meta, it doesn't use the WP_Query and thus doesn't have themenu_orderaffected. However, after you change the post order, IF you edit the post and save the post meta again, then the new values might have the new order affected.In general, if you want to make sure it always work, you should use a custom query like this:
$posts_array = rwmb_meta( '_posts_select' ); $query = new WP_Query( array( 'post_type' => 'post', 'orderby' => 'menu_order', 'order' => 'ASC', 'post__in' => $posts_array, ) ); if ( $query->have_posts() ) { while ( $query->have_posts() ) : $query->the_post(); // Do something endwhile; }Anh Tran
KeymasterHi, thanks for letting me know. The problem is the PHP function I used doesn't work with the multi-bytes languages. I've just fixed it and updated the plugin, please update.
Anh Tran
KeymasterAh, I got it. Unfortunately, this is the limitation of the plugin when working in the modal mode. WordPress limits how fields are outputted and saved. We also can't enqueue JavaScript for it as well. So, please just use the simple fields there.
Anh Tran
KeymasterCan you post the code you use? It seems to work for me ๐
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.
-
AuthorPosts