Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
I guess you're using Meta Box Updater extension, aren't you? If that's the case, please remove it. You don't need it anymore, since the updater is bundled inside Meta Box.
If you are not, then please take screenshot of the License page after you submit the license key and post here. I just want to see the status message. It will show if a license is valid, expired or invalid.
Anh Tran
KeymasterHi, what is the problem that you experienced? Can you provide more details?
Also, please go to Dashboard > Updates and click "Check Again" button. That might refresh the updates.
Anh Tran
KeymasterHi, can you try the
taxonomy_advancedfield? Thetaxonomyfield will set post terms, which doesn't work for users.Anh Tran
KeymasterHi,
Did you create a meta box with
premium_categoriesfield for the users?August 17, 2019 at 9:12 PM in reply to: ✅Fields are not displayed in custom post type edit form #15731Anh Tran
KeymasterHi,
I see you miss the
post_typesparameter for the meta box. It should point to your custom post type:'post_types' => ['so_offer'],Anh Tran
KeymasterHey guys,
I finish the code for the sanitizer part.
It works like this:
- Sanitization is auto applied for all built-in types.
- For custom field types, developers needs to implement their sanitization via
sanitize_callbackparameter. If no sanitize callback is provided, the field won't be sanitize. I do this to not break the websites at the moment. In the future, I might add default sanitization for all custom field types ifsanitize_callbackis not defined. At this stage, I think this is enough. - Developers can also bypass sanitization by setting
'sanitize_callback' => 'none'(if set to a callable, it will be used for sanitization).
I'll merge the commits and release a new version for Meta Box next week.
Thank you all for your feedback!
Anh Tran
KeymasterHey Steven,
I've just updated MB Blocks to 1.0.4 to address this issue. I have confirmed with Alex that it's working. Please update the extension.
Anh Tran
KeymasterHey guys,
Thanks for your feedback. Based on what FED offered, I think this patch is a little better. Can you please try replace the line 240 in the
conditional-logic.jswith this?if ( ! isGutenbergElement( logic[0] ) && ! dependentFieldSelector && $scope && $scope.hasClass( 'rwmb-group-clone' ) ) {I'll release a new version when it's confirmed. Thanks!
Anh Tran
KeymasterHi, this bug is fixed here. New version of Meta Box will come next week.
Anh Tran
KeymasterHi David,
Your feedback is great and that's exactly what I'm looking for. My reply above was just a discussion about your ideas.
I'll consider your suggestions. Thanks.
Anh Tran
KeymasterHi, I've tested with your code and it works. Please see my video: https://www.loom.com/share/b104b120c7d64513a7b7a1e10f605949
Please try clear the browser cache and try again. I guess some scripts are missing. Please check the console as well.
Anh Tran
KeymasterHi,
I found the problem. You're using a child theme, and in the
register.phpfunction that registers the block it refers to the parent theme folder:'render_template' => get_template_directory() . '/blocks/hero/template.php', 'enqueue_style' => get_template_directory_uri() . '/blocks/hero/style.css',It should change to:
'render_template' => get_stylesheet_directory() . '/blocks/hero/template.php', 'enqueue_style' => get_stylesheet_directory_uri() . '/blocks/hero/style.css',I made the change in your site and it works.
Anh Tran
KeymasterHi,
Yes, it's possible.
You can use the
taxonomy_advancedfield, and set thefield_typetoselect_advanced(default) and enablemultipletotrue, like this:'fields' => [ [ 'id' => 'purchased_tags', 'type' => 'taxonomy_advanced', 'taxonomy' => 'your_tax', 'name' => 'Apply tags when purchased', 'field_type' => 'select_advanced', 'multiple' => true, ], // Other fields ]Anh Tran
KeymasterHi David,
Thanks for your feedback. Yes, I want to complete this thing as it's important and I don't want to postpone at the middle.
Regarding your feedback:
- I think sanitize_textarea_field is too limited. It seems fine with the function name, but people usually use it for HTML content. I'm using wp_kses_post, which I think is okay.
- Adding params for wp_kses_post can be done. But it will make the code more complicated in both plugin's side and developer's side. I think in this case, developers can do that easier with a custom sanitize callback like this:
'sanitize_callback' => function( $value ) { $allowed_tags = []; return wp_kses( $value, $allowed_tags ); }- I'm thinking about this, too. Need to find a good way to implement that without breaking things.
- That's available via custom
sanitize_callbackparam (see the example above). Developers can define their own sanitize callback or bypass the sanitization with this code:
'sanitize_callback' => function( $value ) { return $value; }August 15, 2019 at 11:43 PM in reply to: ✅Some field types are not displayed within the block #15710Anh Tran
KeymasterHi,
Are you using the AIO plugin or MB Blocks plugin individually? I fixed this bug in MB Blocks, but haven't deployed to API yet.
-
AuthorPosts