Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meta_boxes[] = [
- 'title' => esc_html__( 'Video & Quote Testimonials - Section I', 'lhk' ),
- 'post_types' => [
- 'page',
- ],
- 'context' => 'after_title',
- 'priority' => 'default',
- 'autosave' => false,
- 'include' => [
- 'relation' => 'AND',
- 'template' => [
- 'templates/template-testimonials.php',
- ],
- ],
- 'fields' => [
- [
- 'id' => 'group_default_video',
- 'type' => 'group',
- 'clone' => true,
- 'sort_clone' => true,
- 'collapsible' => true,
- 'group_title' => esc_html__( 'Video Testimonial', 'lhk' ), // ID of the subfield
- 'save_state' => true,
- 'fields' => [
- [
- 'id' => 'default_title',
- 'type' => 'text',
- 'name' => esc_html__('Video Title', 'lhk'),
- 'desc' => esc_html__('Please insert your text.','lhk'),
- 'size' => 85,
- ],
- [
- 'id' => 'default_url',
- 'type' => 'url',
- 'name' => esc_html__('Video URL', 'lhk'),
- 'desc' => esc_html__('Please insert video url address','lhk'),
- 'size' => 85,
- ],
- ],
- ],
- [
- 'id' => 'group_default_quote',
- 'type' => 'group',
- 'clone' => true,
- 'sort_clone' => true,
- 'collapsible' => true,
- 'group_title' => esc_html__( 'Quote Testimonial', 'lhk' ), // ID of the subfield
- 'save_state' => true,
- 'fields' => [
- [
- 'id' => 'default_text',
- 'type' => 'textarea',
- 'name' => esc_html__('Quote Text', 'lhk'),
- 'desc' => esc_html__('Please insert your text.','lhk'),
- 'cols' => 50,
- 'rows' => 3,
- ],
- [
- 'id' => 'default_author',
- 'type' => 'text',
- 'name' => esc_html__('Author', 'lhk'),
- 'desc' => esc_html__('Please insert your text.','lhk'),
- 'size' => 65,
- ],
- [
- 'id' => 'default_company',
- 'type' => 'text',
- 'name' => esc_html__('Company', 'lhk'),
- 'desc' => esc_html__('Please insert your text.','lhk'),
- 'size' => 85,
- ],
- [
- 'id' => 'default_image',
- 'type' => 'single_image',
- 'name' => esc_html__('Logo/Image', 'lhk'),
- 'desc' => esc_html__('Please upload the image.','lhk'),
- ],
- ],
- ],
- ],
- 'validation' => [
- 'rules' => [
- 'default_url' => [
- 'url' => true,
- ],
- ],
- ],
- 'message' => [
- 'default_url' => [
- 'url' => 'Valid URL required',
- ],
- ],
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement