Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 391 through 405 (of 3,958 total)
  • Author
    Posts
  • Anh TranAnh Tran
    Keymaster

    Hi Mohammad,

    For image fields, each image ID is stored in a single row in the DB. If you don't want to delete old rows, then you can get them all via get_post_meta function and do some check before updating. But I guess it takes more (maybe a lot) of code to check. A better and simpler way to do that is delete all old rows and add new rows.

    in reply to: WPML Issue with file_advanced input #18036
    Anh TranAnh Tran
    Keymaster

    Hi Archimedes, thanks for your feedback. Let us check the problem and will fix it as soon as we can.

    in reply to: Missing 'Link field' #18035
    Anh TranAnh Tran
    Keymaster

    Hi,

    It's not available in the plugin yet. There was a request to add it. I'll merge this topic into the older topic so we'll have discussion on the same place.

    Anh TranAnh Tran
    Keymaster

    Hi Mohammad,

    You can do that with this code:

    // Add
    $your_images_ids = [1,2,3];
    foreach ( $your_images_ids as $image_id ) {
        add_post_meta( $post_id, $field_id, $image_id, false ); // Notice the last parameter.
    }
    
    // Delete
    delete_post_meta( $post_id, $field_id, $image_id );
    Anh TranAnh Tran
    Keymaster

    Hi Martin,

    The helper function doesn't return labels for the field, but only values. You can get the label with this code:

    $parts_name = rwmb_meta( 'group' );
    $group_settings = rwmb_get_field_settings( 'group' );
    $select_settings = $group_settings['fields']['select_field_id'];
    foreach ( $parts_name as $part_name ) {
        $value = $part_name['item'];
        $label = $select_settings['options'][$value];
        echo $label;
    }
    in reply to: Field data is not going to the table #18032
    Anh TranAnh Tran
    Keymaster

    I meant the MB User Meta extension. Its changelog is here. I've just tested your code and it works fine to me.

    in reply to: Include pro version in a Theme #18031
    Anh TranAnh Tran
    Keymaster

    Hi Mohammad,

    1) The MB Core extension doesn't include the Meta Box plugin. If you don't want to install it separately, you can bundle it in your theme.
    2) Please see the link above for the Meta Box plugin and this link for extensions.

    in reply to: MB profile within buddypress tab #18030
    Anh TranAnh Tran
    Keymaster

    Hi pza,

    Have you updated the plugin to the latest version? There was an issue with enqueuing assets in MB User Meta extension and that was fixed recently.

    in reply to: How to get the table name given the field_id #18029
    Anh TranAnh Tran
    Keymaster

    Hi Nick,

    Thanks for your reply. I just noticed I have a setter method public, which is quite simple (and naive). So, it's fine to make the property public. I just released a new version for the extension. Please update.

    in reply to: Edit MB Frontend Submission in Popup #18012
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    Please try to add multiple popups. Each popup corresponds to a post. That way you don't need to populate the popup dynamically.

    in reply to: How to get the table name given the field_id #18011
    Anh TranAnh Tran
    Keymaster

    Hi Nick, the reason we make the property protected is because we don't want people to change it.

    Can you tell me why do you want to the the table name? Is that the table you created with your own code? Why don't you just pass the string (table name) instead of getting from fields?

    in reply to: Relationship translations #18010
    Anh TranAnh Tran
    Keymaster

    Hi Nick,

    Thanks for your reply. I'll take a note on this. Currently, the plugin doesn't copy values to the translations. It only add connections between items if they're chosen.

    I think you can hook to the plugin to add your own connections between connected items. I'll add more hooks to let you do that. What do you think?

    in reply to: Query Posts With WP_Query #18009
    Anh TranAnh Tran
    Keymaster

    Hi Dave, thanks for your feedback. I've just fixed the typo and updated the code in the docs regarding the empty case.

    Anh TranAnh Tran
    Keymaster

    Hi Nick, thanks for your feedback. It's a good thing to change and will be available in the next version of the plugin.

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

    Hi Pieter, please see my reply above and the documentation.

Viewing 15 posts - 391 through 405 (of 3,958 total)