[json] werwe
Viewer
- <?php
- use \StoutLogic\AcfBuilder\FieldsBuilder;
- // Reusable button fields
- $button = new FieldsBuilder('button');
- $button
- ->addGroup('button')
- ->setConfig('display', 'table')
- ->addText('label')
- ->setWidth(40)
- ->addLink('link')
- ->setWidth(40)
- ->addTrueFalse('whatsapp')
- ->setLabel('Whatsapp?')
- ->setConfig('ui', 1)
- ->setWidth(20);
- // Reusable settings fields
- $partial_settings = new FieldsBuilder('partial_settings');
- $partial_settings
- ->addGroup('padding')
- ->addField('top', 'button_group')
- ->setConfig('choices', [
- 'none' => 'None',
- 'sm' => 'Small',
- 'md' => 'Medium',
- 'lg' => 'Large',
- 'xl' => 'X-Large'
- ])
- ->setWidth(50)
- ->addField('bottom', 'button_group')
- ->setConfig('choices', [
- 'none' => 'None',
- 'sm' => 'Small',
- 'md' => 'Medium',
- 'lg' => 'Large',
- 'xl' => 'X-Large'
- ])
- ->setWidth(50)
- ->endGroup();
- $partials = [];
- $partials['hero'] = new FieldsBuilder('hero', ['label' => '23. Hero']);
- $partials['hero']
- ->addTab('Content')
- ->addText('super_title')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('list')
- ->addText('text')
- ->setConfig('button_label', 'Add List Item')
- ->endRepeater()
- ->addRepeater('buttons')
- ->setConfig('max', 3)
- ->addGroup('button')
- ->setConfig('display', 'table')
- ->addText('label')
- ->setWidth(25)
- ->addLink('link')
- ->setWidth(25)
- ->addTrueFalse('whatsapp')
- ->setLabel('Whatsapp?')
- ->setConfig('ui', 1)
- ->setWidth(20)
- ->addField('colour', 'button_group')
- ->setWidth(20)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-blue-bg' => 'Blue',
- 'btn-red-bg' => 'Red',
- 'btn-green' => 'Green'
- ]
- )
- ->endRepeater()
- ->addImage('icon')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image')
- ->setWidth(40)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'center' => 'Center',
- 'left' => 'Left'
- ])
- ->setWidth(30)
- ->addField('filter', 'button_group')
- ->setConfig('label', 'Background Filter')
- ->setConfig('allow_null', 1)
- ->setConfig('choices', [
- 'blue' => 'Blue',
- 'black' => 'Black'
- ])
- ->setWidth(30)
- ->addTrueFalse('0%_finance')
- ->setConfig('ui', 0);
- $partials['breadcrumbs'] = new FieldsBuilder('breadcrumbs', ['label' => '13. Breadcrumbs']);
- $partials['breadcrumbs'];
- $partials['hero_book'] = new FieldsBuilder('hero_book', ['label' => '24. Hero Book']);
- $partials['hero_book']
- ->addTab('Content')
- ->addText('title')
- ->addRepeater('list')
- ->addText('text')
- ->setConfig('button_label', 'Add List Item')
- ->endRepeater()
- ->addRepeater('buttons')
- ->setConfig('max', 2)
- ->addGroup('button')
- ->setConfig('display', 'table')
- ->addText('label')
- ->setWidth(25)
- ->addLink('link')
- ->setWidth(25)
- ->addTrueFalse('whatsapp')
- ->setLabel('Whatsapp?')
- ->setConfig('ui', 1)
- ->setWidth(20)
- ->addField('colour', 'button_group')
- ->setWidth(20)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-blue-bg' => 'Blue',
- 'btn-red-bg' => 'Red',
- ]
- )
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image')
- ->setWidth(50)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'right' => 'Box Right',
- 'left' => 'Box Left'
- ])
- ->setWidth(50)
- ->addTrueFalse('0%_finance')
- ->setConfig('ui', 0);
- $partials['about_hero'] = new FieldsBuilder('about_hero', ['label' => '2. About Hero']);
- $partials['about_hero']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image');
- $partials['banner'] = new FieldsBuilder('banner', ['label' => '6. Banner']);
- $partials['banner']
- ->addTab('Content')
- ->addText('title')
- ->addRepeater('list')
- ->addText('list_item')
- ->endRepeater()
- ->addWysiwyg('optional_text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('buttons')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Button')
- ->setConfig('min', 1)
- ->setConfig('max', 2)
- ->addGroup('button')
- ->setConfig('display', 'table')
- ->addText('label')
- ->setWidth(50)
- ->addLink('link')
- ->setWidth(50)
- ->addTrueFalse('whatsapp')
- ->setLabel('Whatsapp?')
- ->setConfig('ui', 1)
- ->setWidth(50)
- ->addField('colour', 'button_group')
- ->setWidth(50)
- ->setConfig('choices', ['btn-red-bg' => 'Red', 'btn-blue-bg' => 'Blue'])
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('image');
- $partials['image_content'] = new FieldsBuilder('image_content', ['label' => '28. Image Content']);
- $partials['image_content']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('summary')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addText('heading')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addImage('image')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'left' => 'Image Left',
- 'right' => 'Image Right'
- ])
- ->setWidth(50);
- $partials['simple_content'] = new FieldsBuilder('simple_content', ['label' => '47. Simple Content']);
- $partials['simple_content']
- ->addTab('Content')
- ->addRepeater('columns')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Column')
- ->setConfig('min', 1)
- ->setConfig('max', 3)
- ->setConfig('collapsed', 'title')
- ->addImage('icon')
- ->addText('title')
- ->addText('header')
- ->setWidth(75)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'text-left' => 'Left',
- 'text-center' => 'Center'
- ])
- ->setWidth(25)
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addField('btn-colour', 'button_group')
- ->setLabel('Button colour')
- ->setWidth(20)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-red-bg' => 'Red',
- 'btn-blue-bg' => 'Blue'
- ])
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image');
- $partials['icon_list'] = new FieldsBuilder('icon_list', ['label' => '26. Icon List']);
- $partials['icon_list']
- ->addTab('Content')
- ->addRepeater('items')
- ->setConfig('button_label', 'Add Item')
- ->setConfig('min', 1)
- ->addText('text')
- ->setLabel('')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('icons', 'button_group')
- ->setConfig('choices', ['check' => 'Checks', 'caret' => 'Carets'])
- ->setWidth(50)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '1' => '1',
- '2' => '2',
- '3' => '3',
- '4' => '4'
- ])
- ->setWidth(50)
- ->addImage('background_image');
- $partials['icon_grid'] = new FieldsBuilder('icon_grid', ['label' => '25. Icon Grid']);
- $partials['icon_grid']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addField('btn-colour', 'button_group')
- ->setLabel('Button colour')
- ->setWidth(20)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-red-bg' => 'Red',
- 'btn-blue-bg' => 'Blue'
- ])
- ->addTab('Items')
- ->addRepeater('items')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Item')
- ->setConfig('min', 1)
- ->setConfig('collapsed', 'title')
- ->addImage('icon')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->conditional('style', '==', 'text')
- ->addLink('link')
- ->conditional('style', '==', 'link')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setWidth(30)
- ->setConfig('choices', [
- '1' => '1',
- '2' => '2',
- '3' => '3',
- '4' => '4'
- ])
- ->addField('title_colour', 'button_group')
- ->setWidth(30)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'text-brand-dark-grey' => 'Black',
- 'text-brand-dark-blue' => 'Teal',
- ])
- ->addField('style', 'button_group')
- ->setWidth(30)
- ->setConfig('choices', [
- 'text' => 'Text',
- 'link' => 'Link',
- ]);
- $partials['icon_row'] = new FieldsBuilder('icon_row', ['label' => '27. Icon Row']);
- $partials['icon_row']
- ->addTab('Content')
- ->addField('icons', 'button_group')
- ->setConfig('choices', ['numbers' => 'Numbers', 'icons' => 'Icons'])
- ->setWidth(50)
- ->addText('title')
- ->addRepeater('items')
- ->setConfig('button_label', 'Add Item')
- ->setConfig('min', 1)
- ->setConfig('layout', 'block')
- ->addImage('icon')
- ->conditional('icons', '==', 'icons')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '1' => '1',
- '2' => '2',
- '3' => '3',
- '4' => '4'
- ])
- ->setWidth(50);
- $partials['tabs'] = new FieldsBuilder('tabs', ['label' => '53. Tabs']);
- $partials['tabs']
- ->addTab('Content')
- ->addRepeater('tabs')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Tab')
- ->setConfig('min', 1)
- ->setConfig('max', 6)
- ->setConfig('collapsed', 'name')
- ->addText('name')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'vertical' => 'Vetical',
- 'horizontal' => 'Horizontal'
- ]);
- $partials['accordion'] = new FieldsBuilder('accordion', ['label' => '3. Accordion']);
- $partials['accordion']
- ->addTab('Content')
- ->addWysiwyg('bottom_text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('tabs')
- ->setConfig('layout', 'block')
- ->setConfig('min', 1)
- ->setConfig('collapsed', 'title')
- ->addText('title')
- ->addRepeater('rows')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Item')
- ->setConfig('min', 1)
- ->setConfig('collapsed', 'name')
- ->addText('name')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->endRepeater()
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['image_grid'] = new FieldsBuilder('image_grid', ['label' => '30. Image Grid']);
- $partials['image_grid']
- ->addTab('Content')
- ->addText('title')
- ->addRepeater('grid')
- ->setConfig('button_label', 'Add Item')
- ->setConfig('min', 1)
- ->setConfig('layout', 'block')
- ->addImage('image')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addLink('link')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '2' => '2',
- '3' => '3'
- ])
- ->setDefaultValue('2');
- $partials['image_gallery'] = new FieldsBuilder('image_gallery', ['label' => '29. Image Gallery']);
- $partials['image_gallery']
- ->addTab('Content')
- ->addGallery('images')
- ->setConfig('min', 1)
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '1' => '1',
- '2' => '2',
- '3' => '3',
- '4' => '4'
- ])
- ->setWidth(50)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'grid' => 'Grid',
- 'masonry' => 'Masonry',
- 'carousel' => 'Carousel'
- ])
- ->setWidth(50);
- $partials['video'] = new FieldsBuilder('video', ['label' => '62. Video']);
- $partials['video']
- ->addTab('Content')
- ->addText('title')
- ->addText('video_url')
- ->addFields($button)
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('colour', 'button_group')
- ->setConfig('choices', [
- 'bg-brand-blue' => 'Blue',
- 'bg-white' => 'White'
- ])
- ->setWidth(25)
- ->addField('size', 'button_group')
- ->setConfig('choices', [
- 'small' => 'Small',
- 'large' => 'Large'
- ])
- ->setWidth(25)
- ->addField('style', 'button_group')
- ->setConfig('choices', [
- 'rounded' => 'Rounded',
- 'bubbles' => 'Bubbles'
- ])
- ->setWidth(25)
- ->addTrueFalse('shadow')
- ->setConfig('ui', 1)
- ->setWidth(25);
- $partials['map'] = new FieldsBuilder('map', ['label' => '34. Map']);
- $partials['map']
- ->addTab('Content')
- ->addText('title')
- ->addFields($button)
- ->addTab('Map')
- ->addRepeater('locations')
- ->setConfig('button_label', 'Add Location')
- ->setConfig('min', 1)
- ->addText('latitude')
- ->addText('longitude')
- ->endRepeater()
- ->addNumber('height')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('size', 'button_group')
- ->setConfig('choices', [
- 'small' => 'Small',
- 'large' => 'Large'
- ]);
- $partials['form'] = new FieldsBuilder('form', ['label' => '22. Form']);
- $partials['form']
- ->addTab('Content')
- ->addText('title')
- ->addTextarea('text')
- ->setConfig('rows', 2)
- ->addPostObject('form')
- ->setConfig('post_type', 'forms')
- ->setConfig('return_format', 'id')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('size', 'button_group')
- ->setConfig('choices', [
- 'small' => 'Small',
- 'medium' => 'Medium',
- 'large' => 'Large'
- ]);
- $partials['newsletter'] = new FieldsBuilder('newsletter', ['label' => '35. Newsletter']);
- $partials['newsletter']
- ->addTab('Content')
- ->addText('title')
- ->addText('text')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'vertical' => 'Vetical',
- 'horizontal' => 'Horizontal'
- ])
- ->setWidth(50)
- ->addTrueFalse('show_name_inputs')
- ->setConfig('ui', 1)
- ->setWidth(50);
- $partials['testimonials'] = new FieldsBuilder('testimonials', ['label' => '54. Testimonials']);
- $partials['testimonials']
- ->addTab('Content')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Testimonial')
- ->setConfig('min', 1)
- ->setConfig('collapsed', 'name')
- ->addText('title')
- ->addTextarea('quote')
- ->addText('name')
- ->setWidth(50)
- ->addText('location')
- ->setLabel('Company / Location')
- ->setWidth(50)
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '1' => '1',
- '2' => '2'
- ])
- ->setWidth(50)
- ->addTrueFalse('show_quote_icons')
- ->setConfig('ui', 1)
- ->setWidth(50);
- $partials['downloads'] = new FieldsBuilder('downloads', ['label' => '20. Downloads']);
- $partials['downloads']
- ->addTab('Content')
- ->addRepeater('files')
- ->setConfig('button_label', 'Add File')
- ->setConfig('min', 1)
- ->addFile('file')
- ->setLabel('')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '1' => '1',
- '2' => '2'
- ]);
- $partials['table'] = new FieldsBuilder('table', ['label' => '52. Table']);
- $partials['table']
- ->addTab('Content')
- ->addRepeater('rows')
- ->setConfig('button_label', 'Add Row')
- ->setConfig('min', 1)
- ->addRepeater('cells')
- ->setConfig('button_label', 'Add Cell')
- ->setConfig('min', 1)
- ->addText('cell')
- ->setLabel('')
- ->endRepeater()
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addTrueFalse('first_row_headings')
- ->setConfig('ui', 1);
- $partials['xmas_table'] = new FieldsBuilder('xmas_table', ['label' => '64. Xmas Table']);
- $partials['xmas_table']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addRepeater('rows')
- ->setConfig('button_label', 'Add Row')
- ->setConfig('min', 1)
- ->addRepeater('cells')
- ->setConfig('button_label', 'Add Cell')
- ->setConfig('min', 1)
- ->addText('cell')
- ->setLabel('')
- ->endRepeater()
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addTrueFalse('first_row_headings')
- ->setConfig('ui', 1);
- $partials['cards'] = new FieldsBuilder('cards', ['label' => '17. Cards']);
- $partials['cards']
- ->addTab('Content')
- ->addRepeater('cards')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Card')
- ->setConfig('min', 1)
- ->setConfig('max', 3)
- ->setConfig('collapsed', 'title')
- ->addField('colour', 'button_group')
- ->setConfig('choices', [
- 'blue' => 'Blue',
- 'light-blue' => 'Light Blue'
- ])
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addImage('image')
- ->conditional('layout', '==', 'image')
- ->addImage('icon')
- ->setConfig('mime_types', 'svg')
- ->conditional('layout', '==', 'icon')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('columns', 'button_group')
- ->setConfig('choices', [
- '2' => '2',
- '3' => '3'
- ])
- ->setWidth(50)
- ->addField('layout', 'button_group')
- ->setConfig('choices', [
- 'card' => 'Card',
- 'image' => 'Image Card',
- 'icon' => 'Icon Card'
- ])
- ->setWidth(50)
- ->addImage('background_image');
- $partials['call_to_action'] = new FieldsBuilder('call_to_action', ['label' => '16. Call To Action']);
- $partials['call_to_action']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addImage('image')
- ->addFields($button)
- ->addTab('Settings')
- ->addField('colour', 'button_group')
- ->setConfig('choices', [
- 'white' => 'White',
- 'blue' => 'Blue',
- 'orange' => 'Orange'
- ])
- ->addGroup('padding')
- ->addField('top', 'button_group')
- ->setConfig('choices', [
- 'none' => 'None',
- 'sm' => 'Small',
- 'md' => 'Medium',
- 'lg' => 'Large',
- 'xl' => 'X-Large'
- ])
- ->setWidth(50)
- ->addField('bottom', 'button_group')
- ->setConfig('choices', [
- 'none' => 'None',
- 'sm' => 'Small',
- 'md' => 'Medium',
- 'lg' => 'Large',
- 'xl' => 'X-Large'
- ])
- ->setWidth(50)
- ->endGroup();
- $partials['statistics'] = new FieldsBuilder('statistics', ['label' => '48. Statistics']);
- $partials['statistics']
- ->addTab('Content')
- ->addText('title')
- ->addRepeater('statistics')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Statistic')
- ->setConfig('min', 1)
- ->setConfig('max', 4)
- ->addImage('image')
- ->addTextarea('text')
- ->setConfig('rows', 2)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['alert'] = new FieldsBuilder('alert', ['label' => '4. Alert']);
- $partials['alert']
- ->addTab('Content')
- ->addTextarea('alert')
- ->setConfig('rows', 2)
- ->addField('alert_colour', 'button_group')
- ->setConfig('choices', [
- 'red' => 'Red',
- 'yellow' => 'Yellow',
- 'green' => 'Green',
- 'blue' => 'Blue',
- ])
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['policy'] = new FieldsBuilder('policy', ['label' => '37. Policy']);
- $partials['policy']
- ->addTab('Iubenda')
- ->addText('public_id')
- ->setLabel('Public ID')
- ->setWidth(70)
- ->addField('policy', 'button_group')
- ->setConfig('choices', [
- 'privacy' => 'Privacy Policy',
- 'cookie' => 'Cookie Policy',
- ])
- ->setWidth(30)
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['pricing_table'] = new FieldsBuilder('pricing_table', ['label' => '38. Pricing Table']);
- $partials['pricing_table']
- ->addTab('Content')
- ->addWysiwyg('terms')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('table')
- ->setConfig('layout', 'block')
- ->setConfig('button_label', 'Add Row')
- ->setConfig('min', 1)
- ->setConfig('collapsed', 'title')
- ->addText('title')
- ->addText('price')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['product_row'] = new FieldsBuilder('product_row', ['label' => '41. Product Row']);
- $partials['product_row']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRelationship('budget_boilers')
- ->setConfig('post_type', ['boilers'])
- ->setConfig('filters', ['search', 'taxonomy'])
- ->setConfig('min', 3)
- ->setConfig('max', 3)
- ->setConfig('return_format', 'id')
- ->addText('budget_button_label')
- ->addRelationship('premium_boilers')
- ->setConfig('post_type', ['boilers'])
- ->setConfig('filters', ['search', 'taxonomy'])
- ->setConfig('min', 1)
- ->setConfig('max', 1)
- ->setConfig('return_format', 'id')
- ->addText('premium_button_label')
- ->addText('note')
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['content_col'] = new FieldsBuilder('content_col', ['label' => '18. Content Column']);
- $partials['content_col']
- ->addTab('Content')
- ->addText('title_1')
- ->addText('video_url')
- ->addRepeater('list')
- ->setConfig('button_label', 'Add Item')
- ->addText('text')
- ->endRepeater()
- ->addText('title_2')
- ->addRepeater('info')
- ->setConfig('button_label', 'Add Item')
- ->setConfig('layout', 'block')
- ->addImage('icon')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['product_2_col'] = new FieldsBuilder('product_2_col', ['label' => '40. Product 2 Column']);
- $partials['product_2_col']
- ->addTab('Content')
- ->addGroup('col_1')
- ->addField('background', 'button_group')
- ->setConfig('choices', ['bg-brand-blue' => 'Blue', 'bg-brand-red' => 'Orange'])
- ->setWidth(50)
- ->addField('text_position', 'button_group')
- ->setConfig('choices', ['above' => 'Above Image', 'below' => 'Below Image'])
- ->setWidth(50)
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addImage('image')
- ->addFields($button)
- ->endGroup()
- ->addGroup('col_2')
- ->addField('background', 'button_group')
- ->setConfig('choices', ['bg-brand-blue' => 'Blue', 'bg-brand-red' => 'Orange'])
- ->setWidth(50)
- ->addField('text_position', 'button_group')
- ->setConfig('choices', ['above' => 'Above Image', 'below' => 'Below Image'])
- ->setWidth(50)
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addImage('image')
- ->addFields($button)
- ->endGroup()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['list_2_col'] = new FieldsBuilder('list_2_col', ['label' => '33. List 2 Column']);
- $partials['list_2_col']
- ->addTab('Content')
- ->addGroup('col_1')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addWysiwyg('note')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->endGroup()
- ->addGroup('col_2')
- ->addText('title')
- ->addRepeater('list')
- ->addText('item')
- ->endRepeater()
- ->endGroup()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['service_2_col'] = new FieldsBuilder('service_2_col', ['label' => '42. Service 2 Column']);
- $partials['service_2_col']
- ->addTab('Content')
- ->addText('title_1')
- ->addImage('image')
- ->addText('video_url')
- ->addText('title_2')
- ->addRepeater('list')
- ->addText('text')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['apprentice_2_col'] = new FieldsBuilder('apprentice_2_col', ['label' => '5. Apprentice 2 Column']);
- $partials['apprentice_2_col']
- ->addTab('Content')
- ->addGroup('col_1')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addText('header')
- ->addRepeater('list')
- ->addWysiwyg('item')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->endRepeater()
- ->addField('background', 'button_group')
- ->setConfig('choices', ['bg-brand-blue' => 'Blue', 'bg-brand-dark-blue' => 'Dark Blue'])
- ->endGroup()
- ->addGroup('col_2')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addText('header')
- ->addRepeater('list')
- ->addWysiwyg('item')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->endRepeater()
- ->addField('background', 'button_group')
- ->setConfig('choices', ['bg-brand-blue' => 'Blue', 'bg-brand-dark-blue' => 'Dark Blue'])
- ->endGroup()
- ->addFields($button)
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['about_2_col'] = new FieldsBuilder('about_2_col', ['label' => '1. About 2 Column']);
- $partials['about_2_col']
- ->addTab('Content')
- ->addRepeater('columns')
- ->setConfig('layout', 'block')
- ->setConfig('min', 2)
- ->setConfig('max', 2)
- ->addField('background', 'button_group')
- ->setConfig('choices', [
- 'white' => 'White',
- 'image' => 'Image'
- ])
- ->addImage('background_image')
- ->conditional('background', '==', 'image')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('buttons')
- ->setConfig('max', 2)
- ->addGroup('button')
- ->setConfig('display', 'table')
- ->addText('label')
- ->setWidth(25)
- ->addLink('link')
- ->setWidth(25)
- ->addTrueFalse('whatsapp')
- ->setLabel('Whatsapp?')
- ->setConfig('ui', 1)
- ->setWidth(20)
- ->addField('colour', 'button_group')
- ->setWidth(20)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-blue-bg' => 'Blue',
- 'btn-red-bg' => 'Red',
- 'btn-white-bg' => 'White',
- ]
- )
- ->endRepeater()
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['trees'] = new FieldsBuilder('trees', ['label' => '59. Trees']);
- $partials['trees']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image');
- $partials['tree_link'] = new FieldsBuilder('tree_link', ['label' => '58. Tree Link']);
- $partials['tree_link']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image');
- $partials['image_icon'] = new FieldsBuilder('image_icon', ['label' => '31. Image Icon']);
- $partials['image_icon']
- ->addTab('Content')
- ->addImage('image')
- ->addText('title')
- ->addRepeater('list')
- ->setConfig('button_label', 'Add Row')
- ->addImage('icon')
- ->addText('text')
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['finance_calculator'] = new FieldsBuilder('finance_calculator', ['label' => '21. Finance Calculator']);
- $partials['finance_calculator']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addText('note')
- ->addRepeater('ctas')
- ->setConfig('layout', 'block')
- ->setLabel('CTAs')
- ->addText('text')
- ->addFields($button)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['service_note'] = new FieldsBuilder('service_note', ['label' => '43. Service Note']);
- $partials['service_note']
- ->addTab('Content')
- ->addText('title')
- ->addRepeater('service')
- ->setConfig('layout', 'block')
- ->addText('title')
- ->addText('price')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addImage('image')
- ->endRepeater()
- ->addFields($button)
- ->addGroup('note')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addFields($button)
- ->endGroup()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['button_links'] = new FieldsBuilder('button_links', ['label' => '15. Button Links']);
- $partials['button_links']
- ->addTab("Content")
- ->addText('title')
- ->addTextarea('text')
- ->addRepeater('links')
- ->setConfig('layout', 'block')
- ->addText('header')
- ->addFields($button)
- ->addField('colour', 'button_group')
- ->setWidth(20)
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-teal-bg' => 'Dark Blue',
- 'btn-red-bg' => 'Red',
- ])
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['services'] = new FieldsBuilder('services', ['label' => '46. Services']);
- $partials['services']
- ->addTab("Content")
- ->addRepeater('service')
- ->setConfig('layout', 'block')
- ->setConfig('min', 1)
- ->addImage('image')
- ->addImage('icon')
- ->setWidth(20)
- ->addText('title')
- ->setWidth(40)
- ->addText('id')
- ->setWidth(40)
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addWysiwyg('learn_more')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('links')
- ->setConfig('layout', 'block')
- ->addFields($button)
- ->addField('colour', 'button_group')
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-red-bg' => 'Red',
- 'btn-blue-bg' => 'Blue'
- ])
- ->endRepeater()
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['blue_banner'] = new FieldsBuilder('blue_banner', ['label' => '7. Blue Banner']);
- $partials['blue_banner']
- ->addText('title');
- $partials['vendigo'] = new FieldsBuilder('vendigo', ['label' => '61. Vendigo']);
- $partials['vendigo']
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0);
- $partials['text'] = new FieldsBuilder('text', ['label' => '55. Text']);
- $partials['text']
- ->addTab('Content')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['button'] = new FieldsBuilder('button', ['label' => '14. Button']);
- $partials['button']
- ->addTab('Content')
- ->addFields($button)
- ->addField('colour', 'button_group')
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-red-bg' => 'Red',
- 'btn-blue-bg' => 'Blue',
- 'btn-green' => 'Green'
- ])
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['documents'] = new FieldsBuilder('documents', ['label' => '19. Documents']);
- $partials['documents']
- ->addTab('Content')
- ->addRepeater('documents')
- ->setConfig('layout', 'block')
- ->setConfig('min', 1)
- ->setConfig('max', 2)
- ->addGroup('document')
- ->setConfig('display', 'table')
- ->addText('text')
- ->setWidth(30)
- ->addFile('file')
- ->setWidth(30)
- ->addImage('icon')
- ->setWidth(30)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['booking_form'] = new FieldsBuilder('booking_form', ['label' => '12. Booking Form']);
- $partials['booking_form']
- ->addTab('Content')
- ->addText('title')
- ->addTab('Info Boxes')
- ->addRepeater('info_boxes')
- ->setConfig('layout', 'block')
- ->addText('title')
- ->addText('text')
- ->addRepeater('link')
- ->addText('text')
- ->addLink('link')
- ->endRepeater()
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['story'] = new FieldsBuilder('story', ['label' => '50. Story']);
- $partials['story']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addImage('image')
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['boiler_list'] = new FieldsBuilder('boiler_list', ['label' => '9. Boiler List']);
- $partials['boiler_list']
- ->addTrueFalse('tool_results')
- ->setConfig('ui', 1)
- ->setWidth(50)
- ->addPostObject('tool_page')
- ->conditional('tool_results', '==', 1)
- ->setConfig('post_type', 'page')
- ->setConfig('return_format', 'id')
- ->setWidth(50)
- ->addTrueFalse('show_filters')
- ->setConfig('ui', 1);
- $partials['boiler_tool_cta'] = new FieldsBuilder('boiler_tool_cta', ['label' => '11. Boiler Tool CTA']);
- $partials['boiler_tool_cta']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('top_text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addRepeater('buttons')
- ->addFields($button)
- ->addField('colour', 'button_group')
- ->setConfig('allow_null', 0)
- ->setConfig('choices', [
- 'btn-red-bg' => 'Red',
- 'btn-blue-bg' => 'Blue'
- ])
- ->endRepeater()
- ->addWysiwyg('bottom_text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addTab('Settings')
- ->addPostObject('tool_page')
- ->setConfig('post_type', 'page')
- ->setConfig('return_format', 'id')
- ->addFields($partial_settings);
- $partials['boiler_tool'] = new FieldsBuilder('boiler_tool', ['label' => '10. Boiler Tool']);
- $partials['boiler_tool']
- ->addPostObject('results_page')
- ->setConfig('post_type', 'page')
- ->setConfig('return_format', 'id')
- ->addPostObject('cta_page')
- ->setConfig('post_type', 'page')
- ->setConfig('return_format', 'id');
- $partials['tree_hero'] = new FieldsBuilder('tree_hero', ['label' => '57. Tree Hero']);
- $partials['tree_hero']
- ->addTab('Content')
- ->addText('text')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addImage('background_image')
- ->setWidth(40);
- $partials['trees_2_col'] = new FieldsBuilder('trees_2_col', ['label' => '60. Trees 2 Column']);
- $partials['trees_2_col']
- ->addTab('Content')
- ->addRepeater('columns')
- ->setConfig('layout', 'block')
- ->setConfig('min', 2)
- ->setConfig('max', 2)
- ->addImage('background_image')
- ->addText('title')
- ->addRepeater('list')
- ->addText('text')
- ->endRepeater()
- ->endRepeater()
- ->addFields($button)
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['tree_count'] = new FieldsBuilder('tree_count', ['label' => '56. Tree Count']);
- $partials['tree_count']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['product_1_col'] = new FieldsBuilder('product_1_col', ['label' => '39. Product 1 Column']);
- $partials['product_1_col']
- ->addTab('Content')
- ->addField('background', 'button_group')
- ->setConfig('choices', ['bg-brand-blue' => 'Blue', 'bg-brand-red' => 'Orange'])
- ->setWidth(50)
- ->addField('text_position', 'button_group')
- ->setConfig('choices', ['above' => 'Above Image', 'below' => 'Below Image'])
- ->setWidth(50)
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addText('lower_text')
- ->addImage('image')
- ->addFields($button)
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['job_list'] = new FieldsBuilder('job_list', ['label' => '32. Job List']);
- $partials['job_list']
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0);
- $partials['survey'] = new FieldsBuilder('survey', ['label' => '51. Survey']);
- $partials['survey']
- ->addTab('Content')
- ->addText('title')
- ->addText('text')
- ->addTextarea('note')
- ->addTab('Modal')
- ->addRepeater('inperson')
- ->setLabel('In Person')
- ->addText('row')
- ->endRepeater()
- ->addRepeater('virtual')
- ->setLabel('Virtual')
- ->addText('row')
- ->endRepeater()
- ->addTab('Settings')
- ->addPostObject('book_page')
- ->setConfig('post_type', 'page')
- ->setWidth(50);
- $partials['service_plans'] = new FieldsBuilder('service_plans', ['label' => '45. Service Plans']);
- $partials['service_plans']
- ->addTab('Content')
- ->addText('title')
- ->addText('text')
- ->addTab('Plans')
- ->addRepeater('plans')
- ->setConfig('layout', 'block')
- ->addText('title')
- ->addText('price_per_month')
- ->addRepeater('included_services')
- ->addText('item')
- ->endRepeater()
- ->addRepeater('not_included_services')
- ->addText('item')
- ->endRepeater()
- ->addFields($button)
- ->addTrueFalse('hidden')
- ->setConfig('ui', 1)
- ->endRepeater()
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['service_plan_benefits'] = new FieldsBuilder('service_plan_benefits', ['label' => '44. Service Plan Benefits']);
- $partials['service_plan_benefits']
- ->addTab('Content')
- ->addText('title')
- ->addText('text')
- ->addRepeater('list')
- ->addText('item_title')
- ->addText('item_text')
- ->addImage('item_image')
- ->endRepeater()
- ->addText('lower_text')
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['statutory_information'] = new FieldsBuilder('statutory_information', ['label' => '49. Statutory Information']);
- $partials['statutory_information']
- ->addTab('Content')
- ->addText('title')
- ->addWysiwyg('text')
- ->setConfig('toolbar', 'basic')
- ->setConfig('media_upload', 0)
- ->addTab('Map')
- ->addRepeater('locations')
- ->setConfig('button_label', 'Add Location')
- ->setConfig('min', 1)
- ->addText('latitude')
- ->addText('longitude')
- ->endRepeater()
- ->addNumber('height')
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('size', 'button_group')
- ->setConfig('choices', [
- 'small' => 'Small',
- 'large' => 'Large'
- ]);
- $partials['pay'] = new FieldsBuilder('pay', ['label' => '36. Pay']);
- $partials['pay']
- ->addTab('Content')
- ->addText('title')
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['boiler_help'] = new FieldsBuilder('boiler_help', ['label' => '8. Boiler Help']);
- $partials['boiler_help']
- ->addTab('Content')
- ->addText('page_1_title')
- ->addWysiwyg('page_1_text')
- ->addText('page_2_title')
- ->addWysiwyg('page_2_text')
- ->addTab('Settings')
- ->addFields($partial_settings);
- $partials['whatsapp'] = new FieldsBuilder('whatsapp', ['label' => '63. Whatsapp']);
- $partials['whatsapp']
- ->addTab('Content')
- ->addText('title')
- ->addText('text')
- ->addGroup('button')
- ->setConfig('display', 'table')
- ->addText('label')
- ->setWidth(50)
- ->addLink('link')
- ->setWidth(50)
- ->endGroup()
- ->addTab('Settings')
- ->addFields($partial_settings)
- ->addField('alignment', 'button_group')
- ->setConfig('choices', [
- 'left' => 'Left',
- 'center' => 'Center',
- ])
- ->setDefaultValue('left');
- // sorts partials alphabetically (leave this at bottom of page)
- usort($partials, function($a, $b) {
- $a_label = $a->getGroupConfig('label');
- $a_num = +preg_replace('/\D.+$/', '', $a_label);
- $b_label = $b->getGroupConfig('label');
- $b_num = +preg_replace('/\D.+$/', '', $b_label);
- return $a_num <=> $b_num;
- });
Editor
You can edit this paste and save as new: