Advertisement
Guest User

Untitled

a guest
Apr 15th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.92 KB | None | 0 0
  1. $meta_boxes[] = [
  2.         'title'  => esc_html__( 'Video & Quote Testimonials - Section I', 'lhk' ),
  3.         'post_types' =>   [
  4.          'page',
  5.         ],
  6.         'context' => 'after_title',
  7.         'priority' => 'default',
  8.         'autosave' => false,
  9.         'include' =>   [
  10.           'relation' => 'AND',
  11.           'template' =>     [
  12.             'templates/template-testimonials.php',
  13.           ],
  14.     ],
  15.     'fields' => [
  16.                 [
  17.                     'id'     => 'group_default_video',
  18.                     'type'   => 'group',
  19.                     'clone'  => true,
  20.                     'sort_clone' => true,
  21.                     'collapsible' => true,
  22.                     'group_title' => esc_html__( 'Video Testimonial', 'lhk' ), // ID of the subfield
  23.                     'save_state' => true,
  24.                     'fields' => [
  25.                         [
  26.                             'id' => 'default_title',
  27.                             'type' => 'text',
  28.                             'name' => esc_html__('Video Title', 'lhk'),
  29.                             'desc' => esc_html__('Please insert your text.','lhk'),
  30.                             'size' => 85,
  31.                         ],
  32.                        [
  33.                             'id' => 'default_url',
  34.                             'type' => 'url',
  35.                             'name' => esc_html__('Video URL', 'lhk'),
  36.                             'desc' => esc_html__('Please insert video url address','lhk'),
  37.                             'size' => 85,
  38.                        ],
  39.                     ],
  40.                 ],
  41.                 [
  42.                     'id'     => 'group_default_quote',
  43.                     'type'   => 'group',
  44.                     'clone'  => true,
  45.                     'sort_clone' => true,
  46.                     'collapsible' => true,
  47.                     'group_title' => esc_html__( 'Quote Testimonial', 'lhk' ), // ID of the subfield
  48.                     'save_state' => true,
  49.                     'fields' => [
  50.                         [
  51.                             'id' => 'default_text',
  52.                             'type' => 'textarea',
  53.                             'name' => esc_html__('Quote Text', 'lhk'),
  54.                             'desc' => esc_html__('Please insert your text.','lhk'),
  55.                             'cols' => 50,
  56.                             'rows' => 3,
  57.                         ],
  58.                         [
  59.                             'id' => 'default_author',
  60.                             'type' => 'text',
  61.                             'name' => esc_html__('Author', 'lhk'),
  62.                             'desc' => esc_html__('Please insert your text.','lhk'),
  63.                             'size' => 65,
  64.                         ],
  65.                          [
  66.                             'id' => 'default_company',
  67.                             'type' => 'text',
  68.                             'name' => esc_html__('Company', 'lhk'),
  69.                             'desc' => esc_html__('Please insert your text.','lhk'),
  70.                             'size' => 85,
  71.                         ],
  72.                        [
  73.                             'id' => 'default_image',
  74.                             'type' => 'single_image',
  75.                             'name' => esc_html__('Logo/Image', 'lhk'),
  76.                             'desc' => esc_html__('Please upload the image.','lhk'),
  77.                        ],                  
  78.  
  79.                 ],
  80.  
  81.         ],
  82.  
  83.     ],
  84.     'validation' => [
  85.         'rules' => [
  86.             'default_url' => [
  87.                  'url' => true,                    
  88.             ],
  89.  
  90.         ],
  91.     ],
  92.     'message' => [
  93.         'default_url' => [
  94.             'url' => 'Valid URL required',
  95.         ],
  96.  
  97.     ],
  98.  
  99. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement