Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,731 through 2,745 (of 3,958 total)
  • Author
    Posts
  • in reply to: Save button label #6295
    Anh TranAnh Tran
    Keymaster

    IMHO, making these 2 strings part of default meta box translation causes a problem: those strings are not in the Meta Box plugin. The good way to add translation is actually translate those strings using .pot file in the plugin. (You can always send me back the files when it's translated so I can put it in the extension of others to use).

    Anyway, I like the idea of using options for these strings. It's more flexible for users.

    in reply to: Options escaping quotes #6294
    Anh TranAnh Tran
    Keymaster

    Hi,

    Are you using the latest version of Meta Box and MB Settings Page? I've updated the plugins yesterday with a fix for this bug. I use wp_unslash() function to remove slashes from submitted value before saving.

    in reply to: Collapsible Attribute #6293
    Anh TranAnh Tran
    Keymaster

    Ah, it's the default behavior. When cloning a group, all the states are cleared and thus, sub-groups are expanded.

    in reply to: Collapsible Attribute #6279
    Anh TranAnh Tran
    Keymaster

    Hi, I've just updated the MB Settings Page extension to the version 1.3. Please update both Meta Box (to version 4.12.2) and the MB Settings Page extension. Thanks.

    in reply to: Collapsible Attribute #6274
    Anh TranAnh Tran
    Keymaster

    I got it. We're updating the MB Settings Page extension to fix all the styling issues. Please wait a little.

    in reply to: How to set post title on save/publish from meta values? #6273
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think the problem is the order of execution.

    The wp_insert_post_data runs before the post meta is saved. So, first time you submit, post meta is blank (it hasn't been save), and the post title is blank. After submission, Joe is saved. And when you submit the 2nd time, it gets from post meta (now it is the previous value "Joe") and you get it as the post title.

    The sequence looks like this:

    1. Filter post data with wp_insert_post_data (where you change the post title)
    2. Save post data
    3. Save post meta (where your meta are saved)

    So, in this case, you should not get post meta via get_post_meta to apply to post title. Instead, you can get the new submitted post meta via $_POST['obh_member_first_name'].

    Hope that makes sense.

    in reply to: Get Image_advanced args using Metabox Group #6269
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, it's possible. This is the code on doing that:

    $group = get_post_meta( get_the_ID(), 'group_id', true );
    $images = isset( $group['gallery'] ) ? $group['gallery'] : array();
    foreach ( $images as $image ) {
        $image_info = RWMB_Image_Field::file_info( $image, array( 'size' => 'thumbnail' ) ); 
    }

    The RWMB_Image_Field::file_info helper function will get all the info of the image for you to use.

    in reply to: Buddypress X-Profile Fields #6261
    Anh TranAnh Tran
    Keymaster

    Hi Jason,

    I haven't tested with BuddyPress yet. I think it's similar to user profile in WordPress admin. I'll take a closer look at that.

    in reply to: Add Meta Box to Woocommerce Product data Tabs #6260
    Anh TranAnh Tran
    Keymaster

    Hi,

    Currently it's not possible yet. But you can add a separate meta box for WC products. I will look into the WC and will find if there's an API to integrate Meta Box fields for WC tabs.

    in reply to: Collapsible Attribute #6259
    Anh TranAnh Tran
    Keymaster

    Can you post your code here? I tested it many times before ๐Ÿ™

    in reply to: Collapsible Attribute #6254
    Anh TranAnh Tran
    Keymaster

    I've just tested with settings page and it works for me. Can you try in the browser private mode (with history and cookie cleared)? On some browsers like Firefox, the state of the inputs is saved by the browser, so if you open it once, it will be opened next time you access the page, regardless the settings.

    in reply to: Collapsible Attribute #6247
    Anh TranAnh Tran
    Keymaster

    Hi,

    This is a good idea! I've just added a new param for group "default_state" which accepts "collapsed" value. So you can see it collapsed by default.

    Please update group to the latest version (1.2.8).

    in reply to: WYSIWYG Editor field autoresize #6245
    Anh TranAnh Tran
    Keymaster

    Hi,

    Do you mean the "full-height editor and distraction-free functionality" settings set in the screen options:

    If it is, then it's not supported at the moment :(.

    in reply to: Disable functionality of WYSIWYG editor #6244
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think the easier way to change the wysiwyg is using options parameter. Using filter is the last method you should think about. Of course this will work. I'll demonstrate both methods here:

    If you want to disable "Add Media" button, use this code:

    array(
        'type'    => 'wysiwyg',
        'name'    => 'Editor',
        'id'      => 'test_editor',
        'options' => array(
            'media_buttons' => false,
        ),
    ),

    If you want to disable the text mode), use this code:

    array(
        'type'    => 'wysiwyg',
        'name'    => 'Editor',
        'id'      => 'test_editor',
        'options' => array(
            'media_buttons' => false,
            'quicktags'     => false,
        ),
    ),

    If you want to disable visual mode, use this code:

    array(
        'type'    => 'wysiwyg',
        'name'    => 'Editor',
        'id'      => 'test_editor',
        'options' => array(
            'media_buttons' => false,
            'tinymce'       => false,
        ),
    ),

    Using filter is similar:

    add_filter( 'rwmb_wysiwyg_settings', function ( $settings ) {
        $settings['media_buttons'] = false;
        // $settings['tinymce']       = false;
        $settings['quicktags']     = false;
    
        return $settings;
    } );

    Note that using filter affects all wysiwyg fields. That's why it's more preferable to use field settings instead.

    in reply to: Google Map custom styles #6229
    Anh TranAnh Tran
    Keymaster

    FYI, the new version 4.12 of Meta Box fixed this. Please update.

Viewing 15 posts - 2,731 through 2,745 (of 3,958 total)