Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 3,958 total)
  • Author
    Posts
  • in reply to: Data storage type #19153
    Anh TranAnh Tran
    Keymaster

    Hi prafgon,

    The clone_as_multiple is available for all fields, not just group. So it's nice to make query for those fields. But due to the fact that group already store group value as a serialized array of all sub-fields, this option doesn't change the serialization issue.

    I'm afraid we haven't got a plan for moving from serialization for group in a near future. I'll check the ACF repeater to see if we can learn from them. Thanks a lot for the reference.

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

    Hi David,

    Allowing HTML in textarea doesn't mean less secured. In fact, it's the recommended way to sanitize content that contains HTML. WordPress is smart enough to filter the allowed HTML tags based on the role of the current user. Using it actually prevents websites from being compromised. So, I think no problems using it on the frontend.

    PS: The topic is always open for discussion.

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

    Hi guys,

    Rao pointed some valid point over the decision.

    I want to clarify that:

    sanitize_textarea_field is the best for textarea field from the developer point of view and I agree with that. However, there are some reasons we consider using wp_kses_post as the default sanitize callback:

    First: from user point of view, as David said, they don't know what happen behind the scene. And in fact, they do use textarea for storing HTML a lot! Something like footer credit or some text for the top bar. Some even use it for embeded videos. We see this behavior all the time. So we decide to use wp_kses_post to bring more comfort to users. Note that, this doesn't mean less secured! Both wp_kses_post and sanitize_textarea_field are secured (and that's the main point of the sanitization). We need to keep balance between comfort and strictness.

    Second: as Rao said, backward compatibility is important. Being activated on 500k sites, we don't want to get thousands of complaints and support topics for the same broken textarea. In fact, there are many topics here and on wordpress.org forums asking why their textarea field not working as expected (because they store embeded videos HTML code).

    I can say, if I build Meta Box again from scratch, sanitize_textarea_field might be the best choice. But at this time, wp_kses_post is a better choice.

    And remember, they're both secured. That's the main point.

    in reply to: Ajax Form Submission Isn't Working #19047
    Anh TranAnh Tran
    Keymaster

    Hi Jason, can you please share the code of the meta box to test? I don't see the problem on my localhost.

    in reply to: Feature Request: Add 'capabilities' condition #19043
    Anh TranAnh Tran
    Keymaster

    That's a good idea, Drake. I'll add to the plugin.

    Updated: Added to version 1.0.11.

    in reply to: Without FacetWP #19016
    Anh TranAnh Tran
    Keymaster

    Hi John,

    I'm very sorry for what you feel. Long didn't give enough information on the answer, but he didn't mean to be rude.

    Regarding to your question, if I understand correctly, you want to build a custom filter for Facet using Meta Box. Is that correct? I'm not sure if that's right when you say "hard coded".

    Just FYI, the integration with Meta Box and Facet allows you to use Facet to create your own filters based on custom fields created with Meta Box. I think Facet has a good collection of filter types (checkboxes, radio, select) and the data sources. What we did in the integration is adding Meta Box fields as a data source for Facet, which will allow you to use them to filter posts later.

    I'm not sure how to write custom filter for Facet, cause that's not what we do with the integration. I also look at Facet docs, and the only resource I found is the facetwp_facet_types hook, which probably the right hook you want to use to add more filter type:

    https://facetwp.com/documentation/developers/advanced/facetwp_facet_types/

    If I don't understand your question correctly, please clarify it. I'll try my best to help. And if you're not happy with the product, I can issue a refund without any problem.

    in reply to: JavaScript Error: Invalid DOM property `class` #18936
    Anh TranAnh Tran
    Keymaster

    Hi Drake,

    I've just tested again with the latest version of Meta Box AIO and don't see any errors in the console. Please see my video:

    https://www.loom.com/share/9e7ea11e6a974e1db22dd8d82258a32e

    I remember I fixed this bug in the latest version of MB Views.

    in reply to: Having an issue and can't post a new topic #18917
    Anh TranAnh Tran
    Keymaster

    The site puts your topics in pending mode, probably due to spam protection. I've restored your topic and it's visible now.

    Anh TranAnh Tran
    Keymaster

    We have resolved this issue on Github! The change was merged into the plugin. Thanks Content Pilot for your help!

    in reply to: ℹ️Registering Fields with Schema for API #18836
    Anh TranAnh Tran
    Keymaster

    Hi Austin,

    Thanks for your feedback. I have it on the backlog, but not really sure what it does. With the MB REST API extension, all fields are available for the REST API already. Can you share your thoughts?

    in reply to: URGENT Problem when installing plugin #18819
    Anh TranAnh Tran
    Keymaster

    Hmm, Paypal didn't process the refund. I've just done that again. https://imgur.com/1saExap

    in reply to: URGENT Problem when installing plugin #18778
    Anh TranAnh Tran
    Keymaster

    I got it. The LearnPress team included an old version of Meta Box in their plugin and causes the problem. I'll contact them to fix this.

    In the meantime, I've issued the refund for you.

    in reply to: post Excerpt #18767
    Anh TranAnh Tran
    Keymaster

    @B: You don't need to set custom attributes, all you need to do in MB Builder is set the field ID to content or excerpt, like this: https://imgur.com/998hlgP. Nothing more.

    And if you can, add this code to your theme's functions.php file. Or you can install the Code Snippet plugin (free on .org) and add the following code:

    add_filter( 'rwmb_content_field_meta', function() {
        $post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT );
        return get_post_field( 'post_content', $post_id );
    } );
    add_filter( 'rwmb_content_value', '__return_empty_string' );
    
    add_filter( 'rwmb_excerpt_field_meta', function() {
        $post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT );
        return get_post_field( 'post_excerpt', $post_id );
    } );
    add_filter( 'rwmb_excerpt_value', '__return_empty_string' );
    in reply to: post Excerpt #18766
    Anh TranAnh Tran
    Keymaster

    @hartsook:

    #1. The thing with excerpt/content and which is chosen to display is probably another thing from WordPress in general, not BB or Meta Box. I think it's better to put it here for clarity:

    If you display post excerpt: in BB, you might want to use text/html module and connect to post excerpt (not Meta Box field), then it will does the following thing:

    • If the post excerpt is not empty -> take it
    • If the post excerpt is empty -> generate excerpt from the post content

    In both case, the excerpt length will be still applied, e.g. the text displayed is truncated to the specific length of your choice.

    It's the default behavior in WordPress in general. And it's confusing for a lot of people!

    If you display post content: then only text in the post content is get and displayed. Nothing is confusing here.

    #2. The other thing is using the field connector in BB

    When we do all the things in the previous replies, Meta Box think these fields are for post content and post excerpt and doesn't store any value in the custom fields. Therefore, you must connect the text/html module in BB to post content/post excerpt instead of Meta Box Fields.

    This is what you already did, and correctly. I just make it clearer!

    in reply to: post Excerpt #18741
    Anh TranAnh Tran
    Keymaster

    I made a short video to explain things here:

    https://www.loom.com/share/0b651f654cce47aa82419cd91631e100

    And here is the code for both content and excerpt:

    https://pastebin.com/1tL0bNhW

Viewing 15 posts - 226 through 240 (of 3,958 total)