Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • in reply to: Meta Box Group Clone not working it's replace #11346

    KwangGan
    Participant

    Thanks for reply this code generate from Meta box builder


    KwangGan
    Participant

    anyway I want to share my code to make Mb Relationships can select only single value

    in
    "inc/class-mb-relationships-relationship.php"

    search for function

    "parse_meta_box_to"

    put these code under line

    
    $field['name'] = $this->to['meta_box']['field_title'];
    

    like this

    
    $field['name'] = $this->to['meta_box']['field_title'];
    
    $field['clone'] = $this->to['clone'];// <<< option to selective clone on/off
    $field['attributes']['required'] = $this->to['attributes']['required']; // set it required field
    

    now we can use clone = false option

    like this :

    
    'to' => array(
            'object_type' => 'post',
            'post_type'   => 'gallery',
             'admin_column' => 'after title', // THIS!
             'clone' => false, // <<<< add this line for turn off clone 
              'attributes' => array(     // <<< for make field required
            'required' => true,  // <<< for make field required
          ),  // <<< for make field required
            'meta_box'    => array(
                    'context' => 'normal',
            ),
            ),
    
    
    in reply to: Exiting Image field delete when update #7701

    KwangGan
    Participant

    yeah problem cause by metabox latest not mb front end

    in reply to: Exiting Image field delete when update #7662

    KwangGan
    Participant

    any update ?

    User both git version and wordpress version

    mb front latest

    Image still delete

    in reply to: Exiting Image field delete when update #7631

    KwangGan
    Participant
    add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
    
    function your_prefix_register_meta_boxes( $meta_boxes ) {
    
        $meta_boxes[] = array (
          'id' => 'post-jobs',
          'title' => 'post jobs',
          'context' => 'normal',
          'post_types' => 'jobclsf',
          'priority' => 'high',
          
          'fields' =>   array (
            array(
    			'type'             => 'image',
    			'name'             => esc_html__( 'Thumbnail 1', 'rwmb-frontend-submission' ),
    			'id'               => '_thumbnail_id',
    			'force_delete'		=> false,
    			'max_file_uploads' => 1,
    		),
    		array(
    			'type'             => 'image',
    			'name'             => esc_html__( 'Thumbnail 2', 'rwmb-frontend-submission' ),
    			'id'               => '_thumbnail_id_2',
    			'force_delete'		=> false,
    			'max_file_uploads' => 1,
    		),
    		array(
    			'type'             => 'image',
    			'name'             => esc_html__( 'Thumbnail 3', 'rwmb-frontend-submission' ),
    			'id'               => '_thumbnail_id_3',
    			'force_delete'		=> false,
    			'max_file_uploads' => 1,
    		),
            array (
              'id' => '_jobclsf_cate',
              'type' => 'taxonomy',
              'name' => 'ประเภทของงาน',
              'taxonomy' => 'jobclsf_category',
              'field_type' => 'select_tree',
            ),
            array (
              'id' => '_jobclsf_address',
              'type' => 'text',
              'name' => 'Title',
              'placeholder' => 'กรุณากรอกพิกัด หรือ ที่อยู่',
            ),
            array (
              'id' => 'jobclsf_map',
              'type' => 'map',
              'name' => 'แผนที่ปฏิบัติงาน',
              'address_field' => '_jobclsf_address',
            ),
          ),
        );
    
        return $meta_boxes;
    
    }
    in reply to: I can't get FIX Patch update cause my licence is already expired #7402

    KwangGan
    Participant

    It’s a bit unfair for people when some issue is consider as BUG and people who bought it can’t get update or any guide to make extension work like it mention. at least you should release guide to fix this issue for older version.

    or keep selling BUG extension to people that support you.

Viewing 6 replies - 1 through 6 (of 6 total)