Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,341 through 2,355 (of 3,702 total)
  • Author
    Posts
  • in reply to: Default Meta Values not working #8669
    Anh TranAnh Tran
    Keymaster

    It gets the stored valued in the post meta with the helper function rwmb_meta. If the value is empty, then get the default value from std.

    in reply to: Multisite User Meta #8668
    Anh TranAnh Tran
    Keymaster

    Can you try again?

    in reply to: JSON Data getting reformated on Save/Edit #8660
    Anh TranAnh Tran
    Keymaster

    But when you imported, you already used add_post_meta() which converts the array into serialized string. So it's not JSON anymore. I'm quite confused about that.

    in reply to: Default Meta Values not working #8659
    Anh TranAnh Tran
    Keymaster

    You can create a helper function for that:

    function your_helper( $field_id ) {
        $field = rwmb_get_field_settings( $field_id );
        $value = rwmb_meta( $field_id );
        return $value ? $value : $field['std'];
    }
    
    // In your template
    echo your_helper( 'your_title_field' );
    in reply to: Multisite User Meta #8657
    Anh TranAnh Tran
    Keymaster

    You're right. For multisite, the settings page should be put in the network admin instead of each site's admin and the license key should be stored in the network options. I didn't think about this at first. Let me try to update the plugin.

    PS: Just updated the plugin to support multisite. In Multisite environment, the settings page is moved to Network > Settings > Meta Box Updater. Normal site admins won't see the message and that settings page. Please update and let me know how it goes.

    PS2: Your license for Core extension bundle is expired. Please update to get updates for other plugins.

    in reply to: getting some errors after metabox builder update #8656
    Anh TranAnh Tran
    Keymaster

    Hello, I've just added some checks to prevent the error. Please update and let me know how it goes.

    in reply to: JSON Data getting reformated on Save/Edit #8646
    Anh TranAnh Tran
    Keymaster

    Hello,

    Now I have a Metabox.io Text box that is read only on the post that just displays that JSON data for reference.

    Where does the JSON data come from? I see you store an array in the post meta, which is a serialized array.

    Anh TranAnh Tran
    Keymaster

    Hi,

    Can you send me the code of the meta box to check?

    in reply to: Multisite User Meta #8644
    Anh TranAnh Tran
    Keymaster

    Hello, thanks for your feedback. We haven't checked it for Multisite environment. Let me try that.

    Edit: I've just fixed the bug. Please update.

    in reply to: Default Meta Values not working #8643
    Anh TranAnh Tran
    Keymaster

    Hello,

    Do you mean that when getting the field value, if the meta box hasn't been saved yet, the std value is not returned?

    Well, if the meta box hasn't been saved yet, there's actually no values are saved in the post meta. Thus, the helper functions return empty string. Because the helper functions are just the wrap of get_post_meta(), which connects to post meta to get the saved value.

    I'd suggest you do a check to see if the title is empty first.

    The reason we don't set the std when retrieving field value is it's nearly impossible to differentiate a saved empty string (if users really want to save an empty string) to non-saved field value.

    in reply to: Bug with radio buttons inside repeatable group #8641
    Anh TranAnh Tran
    Keymaster

    I see. I fixed that bug 2 weeks ago. I've just released new version of the Meta Box plugin, please update it.

    in reply to: MB Revisions in combination with MB Custom Table #8630
    Anh TranAnh Tran
    Keymaster

    Hello,

    Unfortunately, the MB Revisions doesn't work with MB Custom Table yet. Give us some time to work on that.

    Thanks

    in reply to: Validation w3 Org #8629
    Anh TranAnh Tran
    Keymaster

    Hello,

    That JS part comes from the MB Conditional Logic extension. It uses WordPress's wp_localize_script to output PHP variables to JavaScript. Any code that use wp_localize_script will have similar output, because it's WordPress's behavior. So we can't do anything here.

    Besides, this is not an error, just a warning. In HTML5, to make things short, type attribute is not necessary for script tag, but having it doesn't cause any harm or invalidation.

    in reply to: Bug with radio buttons inside repeatable group #8628
    Anh TranAnh Tran
    Keymaster

    Hello,

    When clone a field or a group, the values of that field or sub-fields will be cleared. This is the expected behavior so users can enter new values in the new cloned fields.

    In case you want to keep a pre-defined value for a field/sub-field, please set 'clone_default' => true for the field/sub-field (in this case, probably is the radio field). This parameter will auto set the std value for new cloned field.

    in reply to: A Strange Problem #8627
    Anh TranAnh Tran
    Keymaster

    Hello, I tested with many active plugins:

    https://imgur.elightup.com/1dHGPHX.png

Viewing 15 posts - 2,341 through 2,355 (of 3,702 total)