<?php $accordions = new PuzzleSection(); $accordions->set_group_name('Accordions')->set_group_name_slug('accordions')->set_single_name('Accordion')->set_multiple(true)->set_admin_column_classes('xs-span12')->set_order(30)->set_markup_attr(array('headline' => array('name' => 'Headline', 'input_type' => 'text', 'save_as' => 'h4'), 'content' => array('name' => 'Content', 'input_type' => 'textarea', 'rows' => 5, 'save_as' => 'content')))->set_options(array('headline' => array('name' => 'Headline', 'width' => 'xs-span12 sm-span6', 'input_type' => 'text', 'save_as' => 'h2'), 'id' => array('name' => 'Section ID', 'width' => 'xs-span12 sm-span6', 'tip' => '<strong>Use this for linking directly to a section. Lowercase letters, numbers, dashes, and underscores only.</strong> If left blank, the Section ID will be the headline lowercase with words separated by dashes (symbols will be deleted). If both the Section ID and headline are blank, the Section ID will be "section-n" where "n" is the place that the section is in on the page (e.g. the 4th section on the page will be "section-4").', 'input_type' => 'text'), 'background_color' => array('name' => 'Background Color', 'width' => 'xs-span12 sm-span4', 'input_type' => 'select', 'options' => array('White' => 'white-background', 'Light blue' => 'light-blue-background', 'Blue' => 'blue-background', 'Orange' => 'orange-background')), 'padding_top' => array('name' => 'Top Padding', 'width' => 'xs-span12 sm-span4', 'input_type' => 'select', 'options' => array('Large' => 'large', 'Normal' => 'normal', 'None' => 'no'), 'selected' => 'normal'), 'padding_bottom' => array('name' => 'Bottom Padding', 'width' => 'xs-span12 sm-span4', 'input_type' => 'select', 'options' => array('Large' => 'large', 'Normal' => 'normal', 'None' => 'no'), 'selected' => 'normal'), 'main_content' => array('name' => 'Main Content', 'input_type' => 'textarea', 'rows' => 10, 'save_as' => 'content'))); $puzzle_pieces = new PuzzlePieces(); $puzzle_pieces->add_section($accordions);
<?php $two_column = new PuzzleSection(); $two_column->set_group_name('Two Column')->set_group_name_slug('two-column')->set_single_name('Column')->set_fixed_column_num(2)->set_admin_column_classes('xs-span12 sm-span6')->set_order(20)->set_markup_attr(array('align_text' => array('name' => 'Align Text', 'input_type' => 'select', 'options' => array('Left' => 'left', 'Center' => 'center', 'Right' => 'right')), 'content' => array('name' => 'Content', 'input_type' => 'textarea', 'rows' => 10, 'save_as' => 'content')))->set_options(array('headline' => array('name' => 'Headline', 'width' => 'xs-span12 sm-span6', 'input_type' => 'text', 'save_as' => 'h2'), 'id' => array('name' => 'Section ID', 'width' => 'xs-span12 sm-span6', 'tip' => '<strong>Use this for linking directly to a section. Lowercase letters, numbers, dashes, and underscores only.</strong> If left blank, the Section ID will be the headline lowercase with words separated by dashes (symbols will be deleted). If both the Section ID and headline are blank, the Section ID will be "section-n" where "n" is the place that the section is in on the page (e.g. the 4th section on the page will be "section-4").', 'input_type' => 'text'), 'column_widths' => array('name' => 'Column Widths', 'width' => 'xs-span12 sm-span6', 'input_type' => 'select', 'options' => array('1/2 1/2' => '1-2_1-2', '1/3 2/3' => '1-3_2-3', '2/3 1/3' => '2-3_1-3')), 'align_items' => array('name' => 'Vertically Align Columns', 'width' => 'xs-span12 sm-span6', 'input_type' => 'select', 'options' => array('Top' => 'top', 'Center' => 'center')), 'background_color' => array('name' => 'Background Color', 'width' => 'xs-span12 sm-span4', 'input_type' => 'select', 'options' => array('White' => 'white-background', 'Light blue' => 'light-blue-background', 'Blue' => 'blue-background', 'Orange' => 'orange-background')), 'padding_top' => array('name' => 'Top Padding', 'width' => 'xs span12 sm-span4', 'input_type' => 'select', 'options' => array('Large' => 'large', 'Normal' => 'normal', 'None' => 'no'), 'selected' => 'normal'), 'padding_bottom' => array('name' => 'Bottom Padding', 'width' => 'xs span12 sm-span4', 'input_type' => 'select', 'options' => array('Large' => 'large', 'Normal' => 'normal', 'None' => 'no'), 'selected' => 'normal'))); $puzzle_pieces = new PuzzlePieces(); $puzzle_pieces->add_section($two_column);
<?php /* * Puzzle * Config */ $puzzle_pieces = new PuzzlePieces(); /* Add shortcode buttons to WYSIWYG editor */ $puzzle_pieces->set_shortcodes(false); /* Add Icon Library to page builder */ $puzzle_pieces->set_icon_library(false); /* * Set default icon in page builder * This will only take effect if the icon library is available. */ $puzzle_pieces->set_default_icon('fa fa-star'); /* * Add FontAwesome library to Icon Library * This will only take effect if ICON_LIBRARY is set to true. */ $puzzle_pieces->set_font_awesome_library(false); /* * Add custom icon libraries before and after Font Awesome library * Icon library must be available. * The Font Awesome library does not have to be available for these to load. */ $puzzle_pieces->set_custom_icon_libraries_before(false); $puzzle_pieces->set_custom_icon_libraries_after(false); /* * Add a "no icon" choice to Icon Library * This will only take effect if the icon library is available.
<?php $one_column = new PuzzleSection(); $one_column->set_group_name('One Column')->set_group_name_slug('one-column')->set_single_name('Column')->set_fixed_column_num(1)->set_admin_column_classes('xs-span12')->set_order(10)->set_markup_attr(array('width' => array('name' => 'Width', 'width' => 'xs-span12 sm-span6', 'input_type' => 'select', 'options' => array('Full Width' => 'full', 'Medium' => 'medium', 'Narrow' => 'narrow')), 'align_text' => array('name' => 'Align Text', 'width' => 'xs-span12 sm-span6', 'input_type' => 'select', 'options' => array('Left' => 'left', 'Center' => 'center', 'Right' => 'right')), 'content' => array('name' => 'Content', 'input_type' => 'textarea', 'rows' => 10, 'save_as' => 'content')))->set_options(array('headline' => array('name' => 'Headline', 'width' => 'xs-span12 sm-span6', 'input_type' => 'text', 'save_as' => 'h2'), 'id' => array('name' => 'Section ID', 'width' => 'xs-span12 sm-span6', 'tip' => '<strong>Use this for linking directly to a section. Lowercase letters, numbers, dashes, and underscores only.</strong> If left blank, the Section ID will be the headline lowercase with words separated by dashes (symbols will be deleted). If both the Section ID and headline are blank, the Section ID will be "section-n" where "n" is the place that the section is in on the page (e.g. the 4th section on the page will be "section-4").', 'input_type' => 'text'), 'background_color' => array('name' => 'Background Color', 'width' => 'xs-span12 sm-span4', 'input_type' => 'select', 'options' => array('White' => 'white-background', 'Light blue' => 'light-blue-background', 'Blue' => 'blue-background', 'Orange' => 'orange-background')), 'padding_top' => array('name' => 'Top Padding', 'width' => 'xs span12 sm-span4', 'input_type' => 'select', 'options' => array('Large' => 'large', 'Normal' => 'normal', 'None' => 'no'), 'selected' => 'normal'), 'padding_bottom' => array('name' => 'Bottom Padding', 'width' => 'xs span12 sm-span4', 'input_type' => 'select', 'options' => array('Large' => 'large', 'Normal' => 'normal', 'None' => 'no'), 'selected' => 'normal'))); $puzzle_pieces = new PuzzlePieces(); $puzzle_pieces->add_section($one_column);