Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,131 through 2,145 (of 3,958 total)
  • Author
    Posts
  • in reply to: required fields #9966
    Anh TranAnh Tran
    Keymaster

    Yes, your last snippet will work.

    I just wander why do you need to update a custom user meta? Doesn't it belong to a Meta Box? If it does, the Meta Box can handle all the saving. In case you want to add custom meta, beyond the scope of Meta Box, yes, it makes sense.

    in reply to: Best way to Bundle MetaBox.io? #9958
    Anh TranAnh Tran
    Keymaster

    Hey guys,

    To use Composer with free plugins on wordpress.org (where MB Rest API & MB Relationships are hosted), please use https://wpackagist.org/. It allows you to bundle any plugins for Composer.

    Updated: I've just written a guide on doing that. See it here:

    https://metabox.io/how-to-use-composer-to-install-meta-box-extensions-from-wordpress-org/

    It has a video tutorial in case you prefer watching!

    @Dave: Thanks for your suggestion. That's what we talked about on Facebook :). I really appreciate that. We talked about making a customizer, where users can select what they want and it will generate a package for that. Yes, I guess it's possible and it's on my plan. What you say about the AIO is true and let me try if I can bundle free plugins inside that.

    in reply to: required fields #9938
    Anh TranAnh Tran
    Keymaster

    Ah, if you want to keep the email field, then in the 2nd snippet, it's available in the $data, so you should keep it (e.g. don't assign it to a completely new array).

    The 2nd snippet should be:

    add_filter( 'rwmb_profile_insert_user_data', function ( $data, $config ) {
        // User strpos because the $config also contains default register form.
        if ( false === strpos( $config['id'], 'user-account' ) ) {
            return $data;
        }
        // Custom data for user.
        $data['user_login'] = 'my_user3';
        $data['user_pass']  = 'my_user_pass';
        return $data;
    }, 10, 2 );
    in reply to: โœ…edit profile #9937
    Anh TranAnh Tran
    Keymaster

    Hi,

    #1: Did you include the ID of the meta box?

    #2: Yes, the shortcode mb_user_profile_info has an attribute id for user ID. Please just use it.

    in reply to: Custom Table: new data not saved, old data not migrated #9936
    Anh TranAnh Tran
    Keymaster

    No, the data is where it is. Only new entries are saved in the custom table. You can write a custom script to migrate if you want.

    Anh TranAnh Tran
    Keymaster

    Hi Mauro,

    If your fields are just simple fields, you don't need to migrate at all. Meta Box, CMB2 and Alchemy use the same way to store value. So, all you need to do is creating same fields in Meta Box, make sure their IDs match the meta key in CMB2 / Alchemy.

    That even works for repeater in CMB2. I haven't tried with all field types of CMB2, but so far it works for me pretty well. So please just try to create same fields in MB first. If something goes wrong, then you should write a small PHP script to:

    That's it.

    in reply to: โœ…Ooops! No Api Key Found even if it's there #9934
    Anh TranAnh Tran
    Keymaster

    Oops, sorry. For geolocation extension, the API key is loaded via a filter, please see the sample code here:

    https://docs.metabox.io/extensions/meta-box-geolocation/#google-api-key

    in reply to: How do I create a notice like this? #9932
    Anh TranAnh Tran
    Keymaster

    Hi Iman,

    It's a meta box with:

    'context' => 'after_title',
    'style' => 'seemless',

    Please see here for more details about these params:

    https://docs.metabox.io/creating-meta-boxes/

    in reply to: Custom Post Type menu within another Custom Post Type? #9930
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, that's possible only through code. The MB Custom Post Type plugin allows you to put the CPT menu in the WordPress's main menu only. I'll try to make an update to support that.

    in reply to: Custom Table: new data not saved, old data not migrated #9929
    Anh TranAnh Tran
    Keymaster

    Hello Mauro,

    Did you create the custom table first? This docs demonstrates how to create the table:

    https://docs.metabox.io/extensions/mb-custom-table/

    It requires some code and you have to put it in your functions.php or the PHP file of your plugin.

    Only after creating the custom table, you can save data into it. Please try it and let me know how it goes.

    in reply to: Best way to Bundle MetaBox.io? #9928
    Anh TranAnh Tran
    Keymaster

    Hi Mauro,

    To make it completely transparent, Composer is the best solution. All premium extensions have supported Composer. Please see this docs for how to use it:

    https://docs.metabox.io/extensions/composer/

    in reply to: How to create columns? #9898
    Anh TranAnh Tran
    Keymaster

    No problem. Let me know if you need anything else ๐Ÿ™‚

    in reply to: required fields #9882
    Anh TranAnh Tran
    Keymaster

    Can you please try updating again? I've just checked and there's no problem.

    If the update fails, can you send me the error message? The #2 error will be still there if you couldn't update.

    in reply to: map field #9881
    Anh TranAnh Tran
    Keymaster

    Hi there,

    Thanks for the bug report! I've fixed it in this commit. I'll release new version soon.

    in reply to: How to create columns? #9880
    Anh TranAnh Tran
    Keymaster

    Hi,

    I'm making some improvement to the text_list field, regarding your suggestion :). What do you think about this layout?

    https://imgur.elightup.com/d4qxPLa.png

    Or do you prefer everything in 1 column, like this?

    https://imgur.elightup.com/WNFY0wp.png

    PS: To upload screenshot, please upload it to a service https://imgur.com and paste the link here.

Viewing 15 posts - 2,131 through 2,145 (of 3,958 total)