Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,836 through 2,850 (of 3,702 total)
  • Author
    Posts
  • in reply to: Get Image Attachment ID #5171
    Anh TranAnh Tran
    Keymaster

    Yes, the array of info contains a parameter ID for the image ID.

    in reply to: Bug with keeping visible the fields which are already saved #5170
    Anh TranAnh Tran
    Keymaster

    Hi, thanks for reporting. It's actually a bug in the plugin. I've just fixed it in version 1.0.5. Please update.

    in reply to: add more issues - not working #5169
    Anh TranAnh Tran
    Keymaster

    Hi Alois,

    Can you please re-try it again? I couldn't replicate it. The + Add More works for me.

    In case it still happens, please verify all the fields, make sure them have unique ID (even in the sub-groups). Also try to deactivate all other plugins to see if there's any JS conflicts.

    Let me know if it still happens.

    in reply to: Bug with keeping visible the fields which are already saved #5156
    Anh TranAnh Tran
    Keymaster

    Hi,

    Can you send me the code you use? I tried to replicate the bug but I couldn't. It works fine to me.

    in reply to: Speed of Cloning #5147
    Anh TranAnh Tran
    Keymaster

    Hi,

    Thank you very much for asking. The problem is the jQuery working on DOM elements. You can help us by giving us a testing code to register meta boxes and probably some help on working with jQuery & DOM elements.

    in reply to: max_status dosen't work #5146
    Anh TranAnh Tran
    Keymaster

    Thanks for letting me know. I've just fixed it on Github. New version will be released soon: https://github.com/rilwis/meta-box

    in reply to: Radio button with image #5136
    Anh TranAnh Tran
    Keymaster

    Hi, you can use image_select field. It's very similar to radio field. This is the demo code:

    https://github.com/rilwis/meta-box/blob/master/demo/image-select.php

    in reply to: Metas for Attachment Post Type #5135
    Anh TranAnh Tran
    Keymaster

    Sorry, I missed a check for WPML which causes the Fatal error. Please try again.

    in reply to: Metas for Attachment Post Type #5128
    Anh TranAnh Tran
    Keymaster

    Hi again,

    I was able to do this! You need to download the development version on Github to have this feature: https://github.com/rilwis/meta-box

    To enable a meta box for media modal, you need to set:

    'post_types' => 'attachment',
    'media_modal' => true,

    to the meta box parameters.

    Take a look at the demo here: https://github.com/rilwis/meta-box/blob/master/demo/media-modal.php

    in reply to: Front End Forms #5126
    Anh TranAnh Tran
    Keymaster

    I'm afraid I can't tell the timeline for now :(. I will work on that until the end of next month and hopefully can resolve it.

    in reply to: Field Description #5118
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    I've just pushed a commit on Github to add supports for this. Please download the development version here: https://github.com/rilwis/meta-box (I will update the plugin a little bit later).

    Instead of "move" description under the label, you just need to add parameter label_description to the field and that's done.

    in reply to: Front End Forms #5117
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    This feature is not available yet in Meta Box. It's still being developed. We have some technical issues that relates with the core and need to fix it.

    I will let you know when it's available.

    in reply to: Define Metas for certain role (Contributor) #5116
    Anh TranAnh Tran
    Keymaster

    Hi,

    1. You need to put this code in the meta box parameters, for more info, please read this docs:

    https://metabox.io/docs/validation/

    2. The current version of Meta Box only supports validating fields when editing posts/pages. I've made and improvement to support user meta and term meta. That feature is available on Github: https://github.com/rilwis/meta-box. I will update the plugin a little bit later when we fix some other bugs.

    in reply to: Margin Issues #5100
    Anh TranAnh Tran
    Keymaster

    Hi,

    I've just checked the CSS of the rows and found that the CSS you're seeing is in the old version of the extension. Please update the extension to have that fixed.

    in reply to: Add filters to select array #5099
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think you can do like this in your plugin:

    $options = array(
        'ea' => 'Each',
        'hr' => 'Hourly',
        'day' => 'Daily',
        'wk' => 'Weekly',
        'mth' => 'Month',
        'yr' => 'Yearly',
    );
    $options = apply_filters( 'prefix_unit_options', $options );

    Then when registering meta boxes, just specify 'options' => $options.

    It might be a better idea to wrap the value of options to a function like:

    function prefix_get_unit_option() {
       $options = ...;
       return apply_filters( 'prefix_unit_options', $options );
    }

    And use 'options' => prefix_get_unit_option().

    This way you can make a repeatable field in your settings page and get the values, passing them to the prefix_get_unit_option() to build the array of options.

    function prefix_get_unit_option() {
       $options = ...; // Default options
       
       $settings = get_option( 'option_name' );
       if ( ! empty( $settings['unit_options'] ) ) {
           foreach ( $settings['unit_options'] as $value => $label ) {
               $options[$value] = $label;
           } 
       }
       return apply_filters( 'prefix_unit_options', $options );
    }
Viewing 15 posts - 2,836 through 2,850 (of 3,702 total)