Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 3,707 total)
  • Author
    Posts
  • in reply to: Saving user meta in custom table not working #14001
    Anh TranAnh Tran
    Keymaster

    Thanks a lot for your feedback. It's a bug in the plugin and I've just fixed it in the version 1.1.8. Please update.

    in reply to: List of post to edit in frontend #14000
    Anh TranAnh Tran
    Keymaster

    Can't you get it via $_GET?

    in reply to: Dropdown disable option #13999
    Anh TranAnh Tran
    Keymaster

    I made a modification to that script, here is a working version: https://ghostbin.com/paste/tqqof

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    Unfortunately, users are required to have strong password. There's no way to set the level to "medium" at the moment.

    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    I've just tested the code and it works fine to me. I modified the code a little bit to work for my test (as I don't have your hook, I use the_content, everything else is the same):

    https://ghostbin.com/paste/fn24m

    Here is my screenshots:

    https://screenshots.firefox.com/iwwS8S5VJn85bYN6/localhost
    https://screenshots.firefox.com/3coKCuQPHAxCyH00/localhost

    in reply to: List of post to edit in frontend #13981
    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    Your question is great! I think checking the user privilege on template_redirect is the correct way. Maybe check if user is logged in, and is the user the author of that post / or is user an admin. That might be enough.

    in reply to: Problems with select in metabox frontend submission #13980
    Anh TranAnh Tran
    Keymaster

    Hello,

    I answered you on Facebook. I tested and couldn't replicate the bug. Am I missing something?

    in reply to: Use MB User Meta data in meta box #13979
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think it's possible. For example, if you have a select field, you can set the options from current user post meta like this:

    $user_id = get_current_user_id();
    $options = get_user_meta( $user_id, 'meta_key', false ); // false to returns an array
    
    // In select field
    'options' => $options,
    in reply to: Meta box fields as stock info? #13978
    Anh TranAnh Tran
    Keymaster

    Hi,

    Regarding the first option, to add constraints between fields, I think the only way to do that is with custom JS.

    To save sum of some fields, please use rwmb_after_save_post hook. Here you can get fields' values and update the sum to another field:

    add_action( 'rwmb_after_save_post', function( $post_id ) {
        $field_1 = get_post_meta( $post_id, 'field_1', true );
        $field_2 = get_post_meta( $post_id, 'field_2', true );
        $field_3 = get_post_meta( $post_id, 'field_3', true );
    
        $sum = $field_1 + $field_2 + $field_3;
        update_post_meta( $post_id, 'sum', $sum);
    } );
    in reply to: Custom Taxonomy and Advanced Taxonomy #13977
    Anh TranAnh Tran
    Keymaster

    Hi, I think that's doable with some hook.

    Like you use a taxonomy_advanced to save the term IDs in the custom table. Then you hook to "after save post" to set the terms for the post.

    This is what I have in my mind:

    add_action( 'rwmb_YOURFIELD_after_save_field', function ( $null, $field, $new, $old, $post_id ) {
        $taxonomy = reset( $field['taxonomy' );
        wp_set_object_terms( $post_id, $new, $taxonomy );
    }, 10, 5 );

    Change YOURFIELD to your field ID.

    in reply to: Default value in radio field #13976
    Anh TranAnh Tran
    Keymaster

    Hi, the std takes a value from the options attribute of the field.

    Don't that work on new posts?

    in reply to: WYSWIYG field and Shortcodes #13975
    Anh TranAnh Tran
    Keymaster

    Hi yumikom, please try the rwmb_the_value filter:

    add_filter( 'rwmb_get_value', function( $value, $field, $args, $object_id ) {
        if ( 'wysiwyg' === $field['type'] ) {
            $value = do_shortcode( $value );
        }
        return $value;
    }, 10, 4 );
    in reply to: How can I get an invoice for a purchased product? #13965
    Anh TranAnh Tran
    Keymaster

    Hi Gil, I've just got your contact message and sent you the invoice. Please check your inbox.

    in reply to: 500 Error after Checking Boxes in All in One Tab #13952
    Anh TranAnh Tran
    Keymaster

    Hi Galen, this error is caused when you have both AIO and MB Custom Post Type plugin enabled. I'll update the MB Custom Post Type to make a better check.

    Thanks for your feedback!

    in reply to: Marker size in map field. #13951
    Anh TranAnh Tran
    Keymaster

    Hi, please follow the docs here. It's quite clear (as I can't say anything clearer). And if there's something you don't understand, please let me know.

Viewing 15 posts - 1,246 through 1,260 (of 3,707 total)