Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 856 through 870 (of 3,958 total)
  • Author
    Posts
  • in reply to: Trouble with license #15752
    Anh TranAnh Tran
    Keymaster

    Hi, 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.

    in reply to: Updating usermeta for a custom meta_key #15737
    Anh TranAnh Tran
    Keymaster

    Hi, can you try the taxonomy_advanced field? The taxonomy field will set post terms, which doesn't work for users.

    in reply to: Updating usermeta for a custom meta_key #15735
    Anh TranAnh Tran
    Keymaster

    Hi,

    Did you create a meta box with premium_categories field for the users?

    in reply to: Fields are not displayed in custom post type edit form #15731
    Anh TranAnh Tran
    Keymaster

    Hi,

    I see you miss the post_types parameter for the meta box. It should point to your custom post type:

    'post_types' => ['so_offer'],
    
    in reply to: Sanitization of Fields input #15730
    Anh TranAnh Tran
    Keymaster

    Hey 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_callback parameter. 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 if sanitize_callback is 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!

    in reply to: Custom block not saving #15729
    Anh TranAnh Tran
    Keymaster

    Hey 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.

    in reply to: Conditional logic fails on switch in 1.6.6 #15727
    Anh TranAnh Tran
    Keymaster

    Hey 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.js with this?

    if ( ! isGutenbergElement( logic[0] ) && ! dependentFieldSelector && $scope && $scope.hasClass( 'rwmb-group-clone' ) ) {
    

    I'll release a new version when it's confirmed. Thanks!

    in reply to: datetime field error #15726
    Anh TranAnh Tran
    Keymaster

    Hi, this bug is fixed here. New version of Meta Box will come next week.

    in reply to: Sanitization of Fields input #15719
    Anh TranAnh Tran
    Keymaster

    Hi 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.

    in reply to: Some field types are not displayed within the block #15718
    Anh TranAnh Tran
    Keymaster

    Hi, 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.

    in reply to: Meta not displaying in Live Preview or Front end #15717
    Anh TranAnh Tran
    Keymaster

    Hi,

    I found the problem. You're using a child theme, and in the register.php function 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.

    in reply to: Addition of labels view for taxonomy field? #15712
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, it's possible.

    You can use the taxonomy_advanced field, and set the field_type to select_advanced (default) and enable multiple to true, 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
    ]
    in reply to: Sanitization of Fields input #15711
    Anh TranAnh Tran
    Keymaster

    Hi 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:

    1. 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.
    2. 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 );
    }
    1. I'm thinking about this, too. Need to find a good way to implement that without breaking things.
    2. That's available via custom sanitize_callback param (see the example above). Developers can define their own sanitize callback or bypass the sanitization with this code:
    'sanitize_callback' => function( $value ) { return $value; }
    
    in reply to: Some field types are not displayed within the block #15710
    Anh TranAnh Tran
    Keymaster

    Hi,

    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.

    in reply to: Sanitization of Fields input #15706
    Anh TranAnh Tran
    Keymaster

    Hi David,

    Glad you like it. I've just pushed the finished code to the "sanitize" branch. The full code is now available here.

    There are also some things left that I would love to hear your feedback:

    • textarea field: at the moment, I force to use wp_kses_post as default. But as I said in a reply earlier, some developers make this field available for users to enter scripts (such as Google Analytics or Google Adsense). What do you think best in this way? Is forcing a callback is good?
    • Custom field type are not sanitized by default. Developers are required to sanitize themselves. Do you think it's fine? Or forcing a default sanitize callback?
Viewing 15 posts - 856 through 870 (of 3,958 total)