$prefix . 'about', 'title' => esc_html__( 'About Section Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_about->add_field( array( 'name' => esc_html__( 'The about section', 'boden' ), 'description' => esc_html__( '', 'boden' ), 'id' => $prefix . 'about_description', 'type' => 'title', ) ); $cmb_about->add_field( array( 'name' => esc_html__( 'Enable About Section', 'boden' ), 'desc' => esc_html__( 'Do you want to enable the about section?', 'boden' ), 'type' => 'select', 'id' => $prefix . 'about_enable', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Enabled', 'boden' ), 'off' => esc_html__( 'Disabled', 'boden' ), ), ) ); $cmb_about->add_field( array( 'name' => esc_html__( 'About Title', 'boden' ), 'description' => esc_html__( 'Write a title for the about section.', 'boden' ), 'id' => $prefix . 'about_title', 'type' => 'text', ) ); $cmb_about->add_field( array( 'name' => esc_html__( 'About Text', 'boden' ), 'description' => esc_html__( 'Write a title for the about section.', 'boden' ), 'id' => $prefix . 'about_text', 'type' => 'textarea', ) ); $cmb_about->add_field( array( 'name' => esc_html__( 'Button Text', 'boden' ), 'description' => esc_html__( '(Optional) Write a text for the button.', 'boden' ), 'id' => $prefix . 'about_button_text', 'type' => 'text', ) ); $cmb_about->add_field( array( 'name' => esc_html__( 'Button URL', 'boden' ), 'description' => esc_html__( 'Insert a URL for the button.', 'boden' ), 'id' => $prefix . 'about_button_url', 'type' => 'text_url', ) ); // Metabox: Quotes $cmb_quotes = new_cmb2_box( array( 'id' => $prefix . 'quotes', 'title' => esc_html__( 'Quotes Section Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_quotes->add_field( array( 'name' => esc_html__( 'The quotes section', 'boden' ), 'description' => esc_html__( '', 'boden' ), 'id' => $prefix . 'quotes_description', 'type' => 'title', ) ); $cmb_quotes->add_field( array( 'name' => esc_html__( 'Enable Quotes Section', 'boden' ), 'desc' => esc_html__( 'Do you want to enable the quotes section?', 'boden' ), 'type' => 'select', 'id' => $prefix . 'quotes_enable', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Enabled', 'boden' ), 'off' => esc_html__( 'Disabled', 'boden' ), ), ) ); $quotes_group = $cmb_quotes->add_field( array( 'id' => $prefix . 'quotes_group', 'type' => 'group', 'description' => esc_html__( '', 'boden' ), 'options' => array( 'group_title' => esc_html__( 'Quote {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Quote', 'boden' ), 'remove_button' => esc_html__( 'Remove Quote', 'boden' ), 'sortable' => true, ), ) ); $cmb_quotes->add_group_field( $quotes_group, array( 'name' => esc_html__( 'Quote Author', 'boden' ), 'description' => esc_html__( 'Write an author name for this quote.', 'boden' ), 'id' => 'quote_author', 'type' => 'text', ) ); $cmb_quotes->add_group_field( $quotes_group, array( 'name' => esc_html__( 'Quote Text', 'boden' ), 'description' => esc_html__( 'Write a text for this quote.', 'boden' ), 'id' => 'quote_text', 'type' => 'textarea', ) ); $cmb_quotes->add_group_field( $quotes_group, array( 'name' => esc_html__( 'Quote Background Image', 'boden' ), 'description' => esc_html__( 'Upload a background image for this quote.', 'boden' ), 'id' => 'quote_background_image', 'type' => 'file', ) ); $cmb_quotes->add_group_field( $quotes_group, array( 'name' => esc_html__( 'Quote Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => 'quote_background_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); // Metabox: Services $cmb_services = new_cmb2_box( array( 'id' => $prefix . 'services', 'title' => esc_html__( 'Services Section Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_services->add_field( array( 'name' => esc_html__( 'The services section', 'boden' ), 'description' => esc_html__( '', 'boden' ), 'id' => $prefix . 'services_description', 'type' => 'title', ) ); $cmb_services->add_field( array( 'name' => esc_html__( 'Enable Services Section', 'boden' ), 'desc' => esc_html__( 'Do you want to enable the services section?', 'boden' ), 'type' => 'select', 'id' => $prefix . 'services_enable', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Enabled', 'boden' ), 'off' => esc_html__( 'Disabled', 'boden' ), ), ) ); $cmb_services->add_field( array( 'name' => esc_html__( 'Services Section Title', 'boden' ), 'description' => esc_html__( 'Write a title for the "Services" section.', 'boden' ), 'id' => $prefix . 'services_title', 'type' => 'text', ) ); $services_group = $cmb_services->add_field( array( 'id' => $prefix . 'services_group', 'type' => 'group', 'description' => esc_html__( '', 'boden' ), 'options' => array( 'group_title' => esc_html__( 'Service {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Service', 'boden' ), 'remove_button' => esc_html__( 'Remove Service', 'boden' ), 'sortable' => true, ), ) ); $cmb_services->add_group_field( $services_group, array( 'name' => esc_html__( 'Service Title', 'boden' ), 'description' => esc_html__( 'Write a headline text for this service.', 'boden' ), 'id' => 'service_title', 'type' => 'text', ) ); $cmb_services->add_group_field( $services_group, array( 'name' => esc_html__( 'Service Description', 'boden' ), 'description' => esc_html__( 'Write a tagline text for this service.', 'boden' ), 'id' => 'service_text', 'type' => 'textarea', ) ); $cmb_services->add_group_field( $services_group, array( 'name' => esc_html__( 'Service Icon', 'boden' ), 'desc' => esc_html__( 'Select whether you want to upload an image for this service or select an icon?', 'boden' ), 'type' => 'select', 'id' => 'service_image_type', 'default' => 'icon', 'options' => array( 'image' => esc_html__( 'Image', 'boden' ), 'icon' => esc_html__( 'Icon', 'boden' ), ), ) ); $cmb_services->add_group_field( $services_group, array( 'name' => esc_html__( 'Service Image File', 'boden' ), 'description' => esc_html__( 'Upload an image for this service.', 'boden' ), 'id' => 'service_image_file', 'type' => 'file', ) ); $cmb_services->add_group_field( $services_group, array( 'name' => esc_html__( 'Service Icon', 'boden' ), 'desc' => esc_html__( 'Select the icon you want to display for this service.', 'boden' ), 'type' => 'select', 'id' => 'service_icon', 'options' => array( 'Agenda' => esc_html__( 'Agenda', 'boden' ), 'Anchor' => esc_html__( 'Anchor', 'boden' ), 'Antenna1' => esc_html__( 'Antenna1', 'boden' ), 'Antenna2' => esc_html__( 'Antenna2', 'boden' ), 'Arrow' => esc_html__( 'Arrow', 'boden' ), 'Astronaut' => esc_html__( 'Astronaut', 'boden' ), 'Bag' => esc_html__( 'Bag', 'boden' ), 'Bascketball' => esc_html__( 'Bascketball', 'boden' ), 'BatteryFull' => esc_html__( 'BatteryFull', 'boden' ), 'BatteryLow' => esc_html__( 'BatteryLow', 'boden' ), 'Bicycle' => esc_html__( 'Bicycle', 'boden' ), 'BigTruck' => esc_html__( 'BigTruck', 'boden' ), 'Blog' => esc_html__( 'Blog', 'boden' ), 'Bomb' => esc_html__( 'Bomb', 'boden' ), 'Book' => esc_html__( 'Book', 'boden' ), 'BottleofWIne' => esc_html__( 'BottleofWIne', 'boden' ), 'Bourbon' => esc_html__( 'Bourbon', 'boden' ), 'Bread' => esc_html__( 'Bread', 'boden' ), 'Briefcase' => esc_html__( 'Briefcase', 'boden' ), 'Bulb' => esc_html__( 'Bulb', 'boden' ), 'Calculator' => esc_html__( 'Calculator', 'boden' ), 'Car' => esc_html__( 'Car', 'boden' ), 'Carioca' => esc_html__( 'Carioca', 'boden' ), 'Cassette' => esc_html__( 'Cassette', 'boden' ), 'CD' => esc_html__( 'CD', 'boden' ), 'Chart' => esc_html__( 'Chart', 'boden' ), 'Chart2' => esc_html__( 'Chart2', 'boden' ), 'ChartDown' => esc_html__( 'ChartDown', 'boden' ), 'ChartUp' => esc_html__( 'ChartUp', 'boden' ), 'ChemicalGlass' => esc_html__( 'ChemicalGlass', 'boden' ), 'Click' => esc_html__( 'Click', 'boden' ), 'ClipboardChart' => esc_html__( 'ClipboardChart', 'boden' ), 'ClipboardText' => esc_html__( 'ClipboardText', 'boden' ), 'ClosedLock' => esc_html__( 'ClosedLock', 'boden' ), 'Cloud' => esc_html__( 'Cloud', 'boden' ), 'CoffeeToGo' => esc_html__( 'CoffeeToGo', 'boden' ), 'Column' => esc_html__( 'Column', 'boden' ), 'CompactCamera' => esc_html__( 'CompactCamera', 'boden' ), 'Compass' => esc_html__( 'Compass', 'boden' ), 'CompassTool' => esc_html__( 'CompassTool', 'boden' ), 'Controller' => esc_html__( 'Controller', 'boden' ), 'Corkscrew' => esc_html__( 'Corkscrew', 'boden' ), 'Crown' => esc_html__( 'Crown', 'boden' ), 'Cup' => esc_html__( 'Cup', 'boden' ), 'Delete' => esc_html__( 'Delete', 'boden' ), 'DesktopMonitor' => esc_html__( 'DesktopMonitor', 'boden' ), 'DiamondRing' => esc_html__( 'DiamondRing', 'boden' ), 'Dislike' => esc_html__( 'Dislike', 'boden' ), 'Dollar' => esc_html__( 'Dollar', 'boden' ), 'Dollars' => esc_html__( 'Dollars', 'boden' ), 'Download' => esc_html__( 'Download', 'boden' ), 'DownloadCloud' => esc_html__( 'DownloadCloud', 'boden' ), 'Drop' => esc_html__( 'Drop', 'boden' ), 'DSLRCamera' => esc_html__( 'DSLRCamera', 'boden' ), 'Edit' => esc_html__( 'Edit', 'boden' ), 'EmptyBox' => esc_html__( 'EmptyBox', 'boden' ), 'Espresso' => esc_html__( 'Espresso', 'boden' ), 'Exit' => esc_html__( 'Exit', 'boden' ), 'ExitFullScreen' => esc_html__( 'ExitFullScreen', 'boden' ), 'Export' => esc_html__( 'Export', 'boden' ), 'Eye' => esc_html__( 'Eye', 'boden' ), 'FemaleFigure' => esc_html__( 'FemaleFigure', 'boden' ), 'File' => esc_html__( 'File', 'boden' ), 'FileBox' => esc_html__( 'FileBox', 'boden' ), 'Files' => esc_html__( 'Files', 'boden' ), 'Flag' => esc_html__( 'Flag', 'boden' ), 'Floppy' => esc_html__( 'Floppy', 'boden' ), 'Folder' => esc_html__( 'Folder', 'boden' ), 'Footbal' => esc_html__( 'Footbal', 'boden' ), 'ForkandKnife' => esc_html__( 'ForkandKnife', 'boden' ), 'Forward' => esc_html__( 'Forward', 'boden' ), 'FullScreen' => esc_html__( 'FullScreen', 'boden' ), 'FullShoppingCart' => esc_html__( 'FullShoppingCart', 'boden' ), 'Gameboy' => esc_html__( 'Gameboy', 'boden' ), 'Glasses' => esc_html__( 'Glasses', 'boden' ), 'Goto' => esc_html__( 'Goto', 'boden' ), 'Handicap' => esc_html__( 'Handicap', 'boden' ), 'Hanger' => esc_html__( 'Hanger', 'boden' ), 'Headset' => esc_html__( 'Headset', 'boden' ), 'Heart' => esc_html__( 'Heart', 'boden' ), 'Help' => esc_html__( 'Help', 'boden' ), 'Hourglass' => esc_html__( 'Hourglass', 'boden' ), 'House' => esc_html__( 'House', 'boden' ), 'Icecream1' => esc_html__( 'Icecream1', 'boden' ), 'Icecream2' => esc_html__( 'Icecream2', 'boden' ), 'Imbox' => esc_html__( 'Imbox', 'boden' ), 'Info' => esc_html__( 'Info', 'boden' ), 'Ipod' => esc_html__( 'Ipod', 'boden' ), 'Key' => esc_html__( 'Key', 'boden' ), 'Keyboard' => esc_html__( 'Keyboard', 'boden' ), 'Layers' => esc_html__( 'Layers', 'boden' ), 'Like' => esc_html__( 'Like', 'boden' ), 'Linked' => esc_html__( 'Linked', 'boden' ), 'List' => esc_html__( 'List', 'boden' ), 'Magnet' => esc_html__( 'Magnet', 'boden' ), 'Mail' => esc_html__( 'Mail', 'boden' ), 'ManFigure' => esc_html__( 'ManFigure', 'boden' ), 'Mastercard' => esc_html__( 'Mastercard', 'boden' ), 'Medal' => esc_html__( 'Medal', 'boden' ), 'Media' => esc_html__( 'Media', 'boden' ), 'Megaphone' => esc_html__( 'Megaphone', 'boden' ), 'Menu' => esc_html__( 'Menu', 'boden' ), 'Message' => esc_html__( 'Message', 'boden' ), 'MessageLeft' => esc_html__( 'MessageLeft', 'boden' ), 'MessageRight' => esc_html__( 'MessageRight', 'boden' ), 'Microphone' => esc_html__( 'Microphone', 'boden' ), 'Microphone2' => esc_html__( 'Microphone2', 'boden' ), 'Mouse' => esc_html__( 'Mouse', 'boden' ), 'Movie' => esc_html__( 'Movie', 'boden' ), 'Mug' => esc_html__( 'Mug', 'boden' ), 'MusicMixer' => esc_html__( 'MusicMixer', 'boden' ), 'MusicNote' => esc_html__( 'MusicNote', 'boden' ), 'MusicNote2' => esc_html__( 'MusicNote2', 'boden' ), 'Mute' => esc_html__( 'Mute', 'boden' ), 'Next' => esc_html__( 'Next', 'boden' ), 'Notebook' => esc_html__( 'Notebook', 'boden' ), 'Notes' => esc_html__( 'Notes', 'boden' ), 'On-Off' => esc_html__( 'On-Off', 'boden' ), 'OpenedLock' => esc_html__( 'OpenedLock', 'boden' ), 'PaperClip' => esc_html__( 'PaperClip', 'boden' ), 'Pause' => esc_html__( 'Pause', 'boden' ), 'Pen' => esc_html__( 'Pen', 'boden' ), 'Pencil' => esc_html__( 'Pencil', 'boden' ), 'Phone' => esc_html__( 'Phone', 'boden' ), 'Phone2' => esc_html__( 'Phone2', 'boden' ), 'PicnicBasket' => esc_html__( 'PicnicBasket', 'boden' ), 'Picture' => esc_html__( 'Picture', 'boden' ), 'Pill' => esc_html__( 'Pill', 'boden' ), 'Pizza' => esc_html__( 'Pizza', 'boden' ), 'Plaine' => esc_html__( 'Plaine', 'boden' ), 'Planet' => esc_html__( 'Planet', 'boden' ), 'Plaster' => esc_html__( 'Plaster', 'boden' ), 'Play' => esc_html__( 'Play', 'boden' ), 'Podium' => esc_html__( 'Podium', 'boden' ), 'Pointer' => esc_html__( 'Pointer', 'boden' ), 'Pool' => esc_html__( 'Pool', 'boden' ), 'PowerOff' => esc_html__( 'PowerOff', 'boden' ), 'Printer' => esc_html__( 'Printer', 'boden' ), 'Pulse' => esc_html__( 'Pulse', 'boden' ), 'Puzzle' => esc_html__( 'Puzzle', 'boden' ), 'Radio' => esc_html__( 'Radio', 'boden' ), 'Restart' => esc_html__( 'Restart', 'boden' ), 'Resume' => esc_html__( 'Resume', 'boden' ), 'Ringer' => esc_html__( 'Ringer', 'boden' ), 'Rolodex' => esc_html__( 'Rolodex', 'boden' ), 'Scisors' => esc_html__( 'Scisors', 'boden' ), 'Screwdriver' => esc_html__( 'Screwdriver', 'boden' ), 'Search' => esc_html__( 'Search', 'boden' ), 'Seringe' => esc_html__( 'Seringe', 'boden' ), 'Settings' => esc_html__( 'Settings', 'boden' ), 'Shaker' => esc_html__( 'Shaker', 'boden' ), 'Share' => esc_html__( 'Share', 'boden' ), 'Shield' => esc_html__( 'Shield', 'boden' ), 'ShoppingCart' => esc_html__( 'ShoppingCart', 'boden' ), 'Signal' => esc_html__( 'Signal', 'boden' ), 'SimCard' => esc_html__( 'SimCard', 'boden' ), 'Snikers' => esc_html__( 'Snikers', 'boden' ), 'Soccer' => esc_html__( 'Soccer', 'boden' ), 'Soda' => esc_html__( 'Soda', 'boden' ), 'SodaCan' => esc_html__( 'SodaCan', 'boden' ), 'Speaker' => esc_html__( 'Speaker', 'boden' ), 'Speaker2' => esc_html__( 'Speaker2', 'boden' ), 'Speedometter' => esc_html__( 'Speedometter', 'boden' ), 'Star' => esc_html__( 'Star', 'boden' ), 'Starship' => esc_html__( 'Starship', 'boden' ), 'Starship2' => esc_html__( 'Starship2', 'boden' ), 'Stop' => esc_html__( 'Stop', 'boden' ), 'StorageBox' => esc_html__( 'StorageBox', 'boden' ), 'Tablet' => esc_html__( 'Tablet', 'boden' ), 'Tag' => esc_html__( 'Tag', 'boden' ), 'TeaMug' => esc_html__( 'TeaMug', 'boden' ), 'Telesocpe' => esc_html__( 'Telesocpe', 'boden' ), 'TennisBall' => esc_html__( 'TennisBall', 'boden' ), 'Tie' => esc_html__( 'Tie', 'boden' ), 'Time' => esc_html__( 'Time', 'boden' ), 'Timer' => esc_html__( 'Timer', 'boden' ), 'Tools' => esc_html__( 'Tools', 'boden' ), 'Trousers' => esc_html__( 'Trousers', 'boden' ), 'Truck' => esc_html__( 'Truck', 'boden' ), 'Tshirt' => esc_html__( 'Tshirt', 'boden' ), 'TV' => esc_html__( 'TV', 'boden' ), 'Typing' => esc_html__( 'Typing', 'boden' ), 'Umbrella' => esc_html__( 'Umbrella', 'boden' ), 'Underpants' => esc_html__( 'Underpants', 'boden' ), 'Unlinked' => esc_html__( 'Unlinked', 'boden' ), 'UploadCLoud' => esc_html__( 'UploadCLoud', 'boden' ), 'User' => esc_html__( 'User', 'boden' ), 'Users' => esc_html__( 'Users', 'boden' ), 'Video' => esc_html__( 'Video', 'boden' ), 'Volume' => esc_html__( 'Volume', 'boden' ), 'Wallet' => esc_html__( 'Wallet', 'boden' ), 'Watch' => esc_html__( 'Watch', 'boden' ), 'Water' => esc_html__( 'Water', 'boden' ), 'Web' => esc_html__( 'Web', 'boden' ), 'Webcam' => esc_html__( 'Webcam', 'boden' ), 'Wheelbarrow' => esc_html__( 'Wheelbarrow', 'boden' ), 'WineGlass' => esc_html__( 'WineGlass', 'boden' ), 'WorldGlobe' => esc_html__( 'WorldGlobe', 'boden' ), 'WorldWide' => esc_html__( 'WorldWide', 'boden' ), 'Wrench' => esc_html__( 'Wrench', 'boden' ), ), ) ); // Metabox: Team $cmb_team = new_cmb2_box( array( 'id' => $prefix . 'team', 'title' => esc_html__( 'Team Section Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_team->add_field( array( 'name' => esc_html__( 'The team section', 'boden' ), 'description' => esc_html__( '', 'boden' ), 'id' => $prefix . 'team_description', 'type' => 'title', ) ); $cmb_team->add_field( array( 'name' => esc_html__( 'Enable Team Section', 'boden' ), 'desc' => esc_html__( 'Do you want to enable the team section?', 'boden' ), 'type' => 'select', 'id' => $prefix . 'team_enable', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Enabled', 'boden' ), 'off' => esc_html__( 'Disabled', 'boden' ), ), ) ); $team_group = $cmb_team->add_field( array( 'id' => $prefix . 'team_group', 'type' => 'group', 'description' => esc_html__( '', 'boden' ), 'options' => array( 'group_title' => esc_html__( 'Team Member {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Team Member', 'boden' ), 'remove_button' => esc_html__( 'Remove Team Member', 'boden' ), 'sortable' => true, ), ) ); $cmb_team->add_group_field( $team_group, array( 'name' => esc_html__( 'Team Member Name', 'boden' ), 'description' => esc_html__( 'Write a headline text for this team member.', 'boden' ), 'id' => 'team_member_title', 'type' => 'text', ) ); $cmb_team->add_group_field( $team_group, array( 'name' => esc_html__( 'Team Member Role', 'boden' ), 'description' => esc_html__( 'Write a tagline text for this team member.', 'boden' ), 'id' => 'team_member_text', 'type' => 'text', ) ); $cmb_team->add_group_field( $team_group, array( 'name' => esc_html__( 'Team Member Image', 'boden' ), 'description' => esc_html__( 'Upload an image for this team member.', 'boden' ), 'id' => 'team_member_image_file', 'type' => 'file', ) ); // Metabox: Facts $cmb_facts = new_cmb2_box( array( 'id' => $prefix . 'facts', 'title' => esc_html__( 'Facts Section Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_facts->add_field( array( 'name' => esc_html__( 'The facts section', 'boden' ), 'description' => esc_html__( '', 'boden' ), 'id' => $prefix . 'facts_description', 'type' => 'title', ) ); $cmb_facts->add_field( array( 'name' => esc_html__( 'Enable Facts Section', 'boden' ), 'desc' => esc_html__( 'Do you want to enable the "facts" section?', 'boden' ), 'type' => 'select', 'id' => $prefix . 'facts_enable', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Enabled', 'boden' ), 'off' => esc_html__( 'Disabled', 'boden' ), ), ) ); $facts_group = $cmb_facts->add_field( array( 'id' => $prefix . 'facts_group', 'type' => 'group', 'description' => esc_html__( '', 'boden' ), 'options' => array( 'group_title' => esc_html__( 'Fact {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Fact', 'boden' ), 'remove_button' => esc_html__( 'Remove Fact', 'boden' ), 'sortable' => true, ), ) ); $cmb_facts->add_group_field( $facts_group, array( 'name' => esc_html__( 'Fact Title', 'boden' ), 'description' => esc_html__( 'Write a headline text for this fact.', 'boden' ), 'id' => 'fact_title', 'type' => 'text', ) ); $cmb_facts->add_group_field( $facts_group, array( 'name' => esc_html__( 'Fact Value', 'boden' ), 'description' => esc_html__( 'Write a tagline text for this fact.', 'boden' ), 'id' => 'fact_text', 'type' => 'text', ) ); } /** * Register Metabox for Page with page-blog template */ add_action( 'cmb2_init', 'boden_metabox_blog' ); function boden_metabox_blog() { $prefix = 'boden_metabox_blog_'; // Metabox: Basic Settings $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'basic', 'title' => esc_html__( 'Blog Settings', 'boden' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Blog Headline', 'boden' ), 'description' => esc_html__( 'Write a headline text for the page.', 'boden' ), 'id' => $prefix . 'headline', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Background Image', 'boden' ), 'description' => esc_html__( 'Upload an image for the background.', 'boden' ), 'id' => $prefix . 'image_background', 'type' => 'file', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => $prefix . 'image_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); /*$cmb_basic->add_field( array( 'name' => 'Blog Categories', 'desc' => 'Select the categories you want to include in this blog page.', 'id' => $prefix . 'categories', 'taxonomy' => 'category', 'type' => 'taxonomy_multicheck', 'options' => array( 'no_terms_text' => 'Sorry, no categories could be found.', ), ) );*/ /*$cmb_basic->add_field( array( 'name' => esc_html__( 'Blog Pagination', 'boden' ), 'description' => esc_html__( 'Select the number of posts you want to display per page.', 'boden' ), 'id' => $prefix . 'paged', 'default' => '6', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Sort Blog By', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display the posts in the blog page.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'sort', 'default' => 'date', 'options' => array( 'date' => esc_html__( 'Date', 'boden' ), 'rand' => esc_html__( 'Random', 'boden' ), 'title' => esc_html__( 'Title', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Order Blog By', 'boden' ), 'desc' => esc_html__( 'Select the way you want to order the posts in the blog.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'order', 'default' => 'DESC', 'options' => array( 'ASC' => esc_html__( 'Ascending', 'boden' ), 'DESC' => esc_html__( 'Descending', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Show Post Date', 'boden' ), 'desc' => esc_html__( 'Select whether you want to show or hide the post date.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'date', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Show', 'boden' ), 'off' => esc_html__( 'Hide', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Show Post Categories', 'boden' ), 'desc' => esc_html__( 'Select whether you want to show or hide the post categories.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'cats', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Show', 'boden' ), 'off' => esc_html__( 'Hide', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Show Post Tags', 'boden' ), 'desc' => esc_html__( 'Select whether you want to show or hide the post tags.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'tags', 'default' => 'off', 'options' => array( 'on' => esc_html__( 'Show', 'boden' ), 'off' => esc_html__( 'Hide', 'boden' ), ), ) );*/ } /** * Register Metabox for Page with page-contact template */ add_action( 'cmb2_init', 'boden_metabox_contact' ); function boden_metabox_contact() { $prefix = 'boden_metabox_contact_'; $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'contact', 'title' => esc_html__( 'Contact Page Settings', 'boden' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Page Headline', 'boden' ), 'description' => esc_html__( 'Write a headline text for the page.', 'boden' ), 'id' => $prefix . 'headline', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Contact Form Email', 'boden' ), 'description' => esc_html__( 'Enter the email address for the contact form (If you leave it empty, we will use the WordPress admin email).', 'boden' ), 'id' => $prefix . 'form_email', 'type' => 'text_email', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Contact Links', 'boden' ), 'desc' => esc_html__( 'This will help you create links on your contact page.', 'boden' ), 'id' => $prefix . 'links_title', 'type' => 'title', ) ); $contact_links = $cmb_basic->add_field( array( 'id' => $prefix . 'links', 'type' => 'group', 'options' => array( 'group_title' => esc_html__( 'Link {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Link', 'boden' ), 'remove_button' => esc_html__( 'Remove Link', 'boden' ), 'sortable' => true, ), ) ); $cmb_basic->add_group_field( $contact_links, array( 'name' => esc_html__( 'Link Text', 'boden' ), 'description' => esc_html__( 'Write the text for this link.', 'boden' ), 'id' => 'link_text', 'type' => 'text', ) ); $cmb_basic->add_group_field( $contact_links, array( 'name' => esc_html__( 'Link URL', 'boden' ), 'description' => esc_html__( 'Write the URL for this link (Leave it empty for EMAIL and PHONE links).', 'boden' ), 'id' => 'link_url', 'type' => 'text_url', ) ); $cmb_basic->add_group_field( $contact_links, array( 'name' => esc_html__( 'Link Type', 'boden' ), 'desc' => esc_html__( 'Select the type of this link.', 'boden' ), 'type' => 'select', 'id' => 'link_type', 'default' => 'other', 'options' => array( 'address' => esc_html__( 'Address', 'boden' ), 'email' => esc_html__( 'Email', 'boden' ), 'phone' => esc_html__( 'Phone', 'boden' ), 'other' => esc_html__( 'Other..', 'boden' ), ), ) ); } /** * Register Metabox for Page with page-landing template */ add_action( 'cmb2_init', 'boden_metabox_landing' ); function boden_metabox_landing() { $prefix = 'boden_metabox_landing_'; // Metabox: Basic Settings $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'basic', 'title' => esc_html__( 'Landing Page Settings', 'boden' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Landing Page Style', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display the landing page.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'page_type', 'options' => array( 'image' => esc_html__( 'Background Image', 'boden' ), 'slider' => esc_html__( 'Content Slider', 'boden' ), 'video' => esc_html__( 'Background Video', 'boden' ), ), ) ); // Metabox: Image Settings $cmb_image = new_cmb2_box( array( 'id' => $prefix . 'image', 'title' => esc_html__( 'Background Image Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Headline Text', 'boden' ), 'description' => esc_html__( 'Write a headline text.', 'boden' ), 'id' => $prefix . 'image_headline', 'type' => 'text', ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Tagline Text', 'boden' ), 'description' => esc_html__( 'Write a tagline text.', 'boden' ), 'id' => $prefix . 'image_tagline', 'type' => 'text', ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Button Text', 'boden' ), 'description' => esc_html__( 'Write a button text.', 'boden' ), 'id' => $prefix . 'image_button_text', 'type' => 'text', ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Button URL', 'boden' ), 'description' => esc_html__( 'Insert a button URL.', 'boden' ), 'id' => $prefix . 'image_button_url', 'type' => 'text_url', ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Background Image', 'boden' ), 'description' => esc_html__( 'Upload an image for the background.', 'boden' ), 'id' => $prefix . 'image_background', 'type' => 'file', ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => $prefix . 'image_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); // Metabox: Video Settings $cmb_video = new_cmb2_box( array( 'id' => $prefix . 'video', 'title' => esc_html__( 'Background Video Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Headline Text', 'boden' ), 'description' => esc_html__( 'Write a headline text.', 'boden' ), 'id' => $prefix . 'video_headline', 'type' => 'text', ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Tagline Text', 'boden' ), 'description' => esc_html__( 'Write a tagline text.', 'boden' ), 'id' => $prefix . 'video_tagline', 'type' => 'text', ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Button Text', 'boden' ), 'description' => esc_html__( 'Write a button text.', 'boden' ), 'id' => $prefix . 'video_button_text', 'type' => 'text', ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Button URL', 'boden' ), 'description' => esc_html__( 'Insert a button URL.', 'boden' ), 'id' => $prefix . 'video_button_url', 'type' => 'text_url', ) ); /*$cmb_video->add_field( array( 'name' => esc_html__( 'Background Video', 'boden' ), 'description' => esc_html__( 'Upload a video for the background.', 'boden' ), 'id' => $prefix . 'video_background', 'type' => 'file', ) );*/ $cmb_video->add_field( array( 'name' => esc_html__( 'Background Video', 'boden' ), 'description' => esc_html__( 'Insert the Video URL from Youtube or Vimeo.', 'boden' ), 'id' => $prefix . 'video_background', 'type' => 'text_url', ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => $prefix . 'video_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); // Metabox: Slider Settings $cmb_slider = new_cmb2_box( array( 'id' => $prefix . 'slider', 'title' => esc_html__( 'Content Slider Settings', 'boden' ), 'object_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_slider->add_field( array( 'id' => $prefix . 'slider_settings_title', 'name' => esc_html__( 'Slider Settings', 'boden' ), 'desc' => esc_html__( 'Customize your configuration for the slider.', 'boden' ), 'type' => 'title', ) ); $cmb_slider->add_field( array( 'name' => esc_html__( 'Slider Images Animation', 'boden' ), 'desc' => esc_html__( 'Do you want to animate the slider images?', 'boden' ), 'type' => 'select', 'id' => $prefix . 'slider_animation', 'default' => 'kenburns', 'options' => array( 'none' => esc_html__( 'None', 'boden' ), 'kenburns' => esc_html__( 'Ken Burns', 'boden' ), ), ) ); /*$cmb_slider->add_field( array( 'name' => esc_html__( 'Slideshow Animation Type', 'boden' ), 'desc' => esc_html__( 'Select the way you want to slider to switch between slides.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'slider_slideshow_animation_type', 'options' => array( 'fade' => esc_html__( 'Fade', 'boden' ), 'slide' => esc_html__( 'Slide', 'boden' ), ), ) );*/ /*$cmb_slider->add_field( array( 'name' => esc_html__( 'Slider Animation Speed', 'boden' ), 'description' => esc_html__( 'Set the speed of the slider animation (in milliseconds).', 'boden' ), 'id' => $prefix . 'slider_slideshow_animation_speed', 'type' => 'text', 'default' => '4000' ) );*/ /*$cmb_slider->add_field( array( 'name' => esc_html__( 'Slider Speed', 'boden' ), 'description' => esc_html__( 'Set the speed of the slider cycling (in milliseconds).', 'boden' ), 'id' => $prefix . 'slider_slideshow_speed', 'type' => 'text', 'default' => '7000' ) );*/ $cmb_slider->add_field( array( 'id' => $prefix . 'slider_slides_title', 'name' => esc_html__( 'Slider Slides', 'boden' ), 'desc' => esc_html__( 'You can add the slides for the landing page. You can add as many slides as you want.', 'boden' ), 'type' => 'title', ) ); $group = $cmb_slider->add_field( array( 'id' => $prefix . 'slides', 'type' => 'group', 'description' => esc_html__( '', 'boden' ), 'options' => array( 'group_title' => esc_html__( 'Slide {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Slide', 'boden' ), 'remove_button' => esc_html__( 'Remove Slide', 'boden' ), 'sortable' => true, ), ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slide Headline', 'boden' ), 'description' => esc_html__( 'Write a headline text for this slide.', 'boden' ), 'id' => 'slide_headline', 'type' => 'text', ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slide Tagline', 'boden' ), 'description' => esc_html__( 'Write a tagline text for this slide.', 'boden' ), 'id' => 'slide_tagline', 'type' => 'text', ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Button Text', 'boden' ), 'description' => esc_html__( 'Write a button text for this slide.', 'boden' ), 'id' => 'slide_button_text', 'type' => 'text', ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Button URL', 'boden' ), 'description' => esc_html__( 'Insert a button URL for this slide.', 'boden' ), 'id' => 'slide_button_url', 'type' => 'text_url', ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slider Background Type', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display a background for this slide.', 'boden' ), 'type' => 'select', 'id' => 'slide_background_type', 'options' => array( 'image' => esc_html__( 'Background Image', 'boden' ), 'video' => esc_html__( 'Background Video', 'boden' ), ), ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slide Background Image', 'boden' ), 'description' => esc_html__( 'Upload a background image for this slide.', 'boden' ), 'id' => 'slide_background_image', 'type' => 'file', ) ); /*$cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slide Background Video', 'boden' ), 'description' => esc_html__( 'Upload a background video for this slide.', 'boden' ), 'id' => 'slide_background_video', 'type' => 'file', ) );*/ $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slide Background Video', 'boden' ), 'description' => esc_html__( 'Insert the Video URL from Youtube or Vimeo for this slide.', 'boden' ), 'id' => 'slide_background_video', 'type' => 'text_url', ) ); $cmb_slider->add_group_field( $group, array( 'name' => esc_html__( 'Slide Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => 'slide_background_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); } /** * Register Metabox for pages. */ add_action( 'cmb2_init', 'boden_metabox_page_general' ); function boden_metabox_page_general() { $prefix = 'boden_metabox_page_general_'; // Metabox: General Settings $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'general', 'title' => esc_html__( 'General Page Settings', 'boden' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Header Color Mode', 'boden' ), 'desc' => esc_html__( 'Select the color mode for the header of this page.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'page_header', 'default' => 'dark', 'options' => array( 'dark' => esc_html__( 'Dark', 'boden' ), 'light' => esc_html__( 'Light', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Display Sidebar', 'boden' ), 'desc' => esc_html__( 'Enable / Disable Page sidebar.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'page_sidebar', 'options' => array( 'on' => esc_html__( 'Enabled', 'boden' ), 'off' => esc_html__( 'Disabled', 'boden' ), ), ) ); } /** * Register Metabox for Page with page-portfolio template */ add_action( 'cmb2_init', 'boden_metabox_portfolio' ); function boden_metabox_portfolio() { $prefix = 'boden_metabox_portfolio_'; // Metabox: Basic Settings $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'basic', 'title' => esc_html__( 'Portfolio Settings', 'boden' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Filter Style', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display the categories filter feature.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'filter_style', 'default' => 'filtermenu', 'options' => array( 'filterbar' => esc_html__( 'Filter Bar', 'boden' ), 'filtermenu' => esc_html__( 'Filter Menu', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Headline Style', 'boden' ), 'desc' => esc_html__( 'Select whether you want to put a simple text or an image for the headline.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'headline_style', 'default' => 'filtermenu', 'options' => array( 'text' => esc_html__( 'Text', 'boden' ), 'image' => esc_html__( 'Image', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Portfolio Headline', 'boden' ), 'description' => esc_html__( 'Write a headline text for the page.', 'boden' ), 'id' => $prefix . 'headline', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Portfolio Tagline', 'boden' ), 'description' => esc_html__( 'Write a tagline text for the page.', 'boden' ), 'id' => $prefix . 'tagline', 'type' => 'textarea', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Headline Text', 'boden' ), 'description' => esc_html__( 'Write a headline text for the page.', 'boden' ), 'id' => $prefix . 'headline_text', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Headline Image', 'boden' ), 'description' => esc_html__( 'Upload an image for the headline.', 'boden' ), 'id' => $prefix . 'headline_image', 'type' => 'file', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Background Image', 'boden' ), 'description' => esc_html__( 'Upload an image for the background.', 'boden' ), 'id' => $prefix . 'image_background', 'type' => 'file', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => $prefix . 'image_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => 'Portfolio Categories', 'desc' => 'Select the categories you want to include in this portfolio page.', 'id' => $prefix . 'categories', 'taxonomy' => 'portfolio-category', 'type' => 'taxonomy_multicheck', 'options' => array( 'no_terms_text' => 'Sorry, no categories could be found.', ), ) ); $cmb_basic->add_field( array( 'name' => __( 'Categories Sort', 'boden' ), 'desc' => __( 'Select the way you want to sort the categories in the portfolio filter area.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'category_sort', 'default' => 'name', 'options' => array( 'term_id' => __( 'ID', 'boden' ), 'name' => __( 'Name', 'boden' ), 'slug' => __( 'Slug', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => __( 'Categories Order', 'boden' ), 'desc' => __( 'Select the way you want to order the categories in the portfolio filter area.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'category_order', 'default' => 'ASC', 'options' => array( 'ASC' => __( 'Ascending', 'boden' ), 'DESC' => __( 'Descending', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Portfolio Items Sort', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display the files in the portfolio page.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'sort', 'default' => 'filtermenu', 'options' => array( 'date' => esc_html__( 'Date', 'boden' ), 'rand' => esc_html__( 'Random', 'boden' ), 'title' => esc_html__( 'Title', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Portfolio Items Order', 'boden' ), 'desc' => esc_html__( 'Select the way you want to order the files in the portfolio.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'order', 'default' => 'DESC', 'options' => array( 'ASC' => esc_html__( 'Ascending', 'boden' ), 'DESC' => esc_html__( 'Descending', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Show "All" Button', 'boden' ), 'desc' => esc_html__( 'Enable / Disable "All" button in the filter area.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'showall', 'default' => 'on', 'options' => array( 'on' => esc_html__( 'Enable', 'boden' ), 'off' => esc_html__( 'Disable', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Items per Page', 'boden' ), 'description' => esc_html__( 'How many portfolio items you want per page?', 'boden' ), 'id' => $prefix . 'count', 'type' => 'text', 'default' => '9', ) ); } /** * Register Portfolio Post File Source Metabox */ add_action( 'cmb2_init', 'boden_metabox_portfolio_item' ); function boden_metabox_portfolio_item() { $prefix = 'boden_metabox_portfolio_item_'; // Metabox: Basic Settings $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'basic', 'title' => esc_html__( 'Post Settings', 'boden' ), 'object_types' => array( 'portfolio-item', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Post Text', 'boden' ), 'description' => esc_html__( 'The text for this post goes here.', 'boden' ), 'id' => $prefix . 'text', 'type' => 'textarea', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Post Button Text', 'boden' ), 'description' => esc_html__( 'If you want to add a button with a link below the post text, add a text for the button here.', 'boden' ), 'id' => $prefix . 'button_text', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Post Button URL', 'boden' ), 'description' => esc_html__( 'And then insert a URL for the button.', 'boden' ), 'id' => $prefix . 'button_url', 'type' => 'text_url', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Post Attachment Type', 'boden' ), 'desc' => esc_html__( 'Select the type for this post.', 'boden' ), 'type' => 'select', 'id' => $prefix . 'type', 'options' => array( 'gallery' => esc_html__( 'Image Gallery', 'boden' ), 'image' => esc_html__( 'Full Width Image', 'boden' ), 'video' => esc_html__( 'Video (MP4)', 'boden' ), 'youtube' => esc_html__( 'Youtube Video', 'boden' ), 'vimeo' => esc_html__( 'Vimeo Video', 'boden' ), ), ) ); // Metabox: Image Settings $cmb_image = new_cmb2_box( array( 'id' => $prefix . 'image', 'title' => esc_html__( 'Image Settings', 'boden' ), 'object_types' => array( 'portfolio-item', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_image->add_field( array( 'name' => esc_html__( 'Image file', 'boden' ), 'desc' => esc_html__( 'Select the image for this post.', 'boden' ), 'type' => 'file', 'id' => $prefix . 'image_file', 'options' => array( 'url' => true, 'add_upload_file_text' => esc_html__( 'Add image', 'boden' ), ), ) ); // Metabox: GalleryImage file Settings $cmb_gallery = new_cmb2_box( array( 'id' => $prefix . 'gallery', 'title' => esc_html__( 'Gallery Settings', 'boden' ), 'object_types' => array( 'portfolio-item', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $gallery = $cmb_gallery->add_field( array( 'id' => $prefix . 'gallery_images', 'type' => 'group', 'description' => esc_html__( '', 'boden' ), 'options' => array( 'group_title' => esc_html__( 'Image {#}', 'boden' ), 'add_button' => esc_html__( 'Add Another Image', 'boden' ), 'remove_button' => esc_html__( 'Remove Image', 'boden' ), 'sortable' => true, ), ) ); $cmb_gallery->add_group_field( $gallery, array( 'name' => esc_html__( 'Image file', 'boden' ), 'desc' => esc_html__( 'Select the image file.', 'boden' ), 'type' => 'file', 'id' => 'image_file', 'options' => array( 'url' => true, 'add_upload_file_text' => esc_html__( 'Add Image', 'boden' ), ), ) ); $cmb_gallery->add_group_field( $gallery, array( 'name' => esc_html__( 'Image Type', 'boden' ), 'desc' => esc_html__( 'Select the way this image will be displayed.', 'boden' ), 'type' => 'select', 'id' => 'image_type', 'options' => array( 'one-full' => esc_html__( 'Full Width', 'boden' ), 'one-half' => esc_html__( 'Half Width', 'boden' ), ), ) ); // Metabox: Hosted Video Settings $cmb_video = new_cmb2_box( array( 'id' => $prefix . 'video', 'title' => esc_html__( 'Video Settings', 'boden' ), 'object_types' => array( 'portfolio-item', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Thumbnail Image', 'boden' ), 'desc' => esc_html__( 'Select the video thumbnail image for this post.', 'boden' ), 'type' => 'file', 'id' => $prefix . 'video_thumb', 'options' => array( 'url' => true, 'add_upload_file_text' => esc_html__( 'Add image', 'boden' ), ), ) ); $cmb_video->add_field( array( 'name' => esc_html__( 'Video file', 'boden' ), 'desc' => esc_html__( 'Select the video for this post.', 'boden' ), 'type' => 'file', 'id' => $prefix . 'video_file', 'options' => array( 'url' => true, 'add_upload_file_text' => esc_html__( 'Add video', 'boden' ), ), ) ); // Metabox: Youtube Settings $cmb_youtube = new_cmb2_box( array( 'id' => $prefix . 'youtube', 'title' => esc_html__( 'Youtube Settings', 'boden' ), 'object_types' => array( 'portfolio-item', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_youtube->add_field( array( 'name' => esc_html__( 'Post Thumbnail', 'boden' ), 'desc' => esc_html__( 'Select the thumbnail for this post.', 'boden' ), 'type' => 'file', 'id' => $prefix . 'youtube_thumb', 'options' => array( 'url' => true, 'add_upload_file_text' => esc_html__( 'Add image', 'boden' ), ), ) ); $cmb_youtube->add_field( array( 'name' => esc_html__( 'Youtube URL', 'boden' ), 'desc' => esc_html__( 'Insert the Youtube video URL.', 'boden' ), 'id' => $prefix . 'youtube_url', 'type' => 'text', ) ); // Metabox: Vimeo Settings $cmb_vimeo = new_cmb2_box( array( 'id' => $prefix . 'vimeo', 'title' => esc_html__( 'Vimeo Settings', 'boden' ), 'object_types' => array( 'portfolio-item', ), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, ) ); $cmb_vimeo->add_field( array( 'name' => esc_html__( 'Thumbnail Image', 'boden' ), 'desc' => esc_html__( 'Select the thumbnail for this post.', 'boden' ), 'type' => 'file', 'id' => $prefix . 'vimeo_thumb', 'options' => array( 'url' => true, 'add_upload_file_text' => esc_html__( 'Add image', 'boden' ), ), ) ); $cmb_vimeo->add_field( array( 'name' => esc_html__( 'Vimeo URL', 'boden' ), 'desc' => esc_html__( 'Insert the Vimeo video URL.', 'boden' ), 'id' => $prefix . 'vimeo_url', 'type' => 'text', ) ); } /** * Register Metabox for Page with page-blog template */ add_action( 'cmb2_init', 'boden_metabox_start' ); function boden_metabox_start() { $prefix = 'boden_metabox_start_'; // Metabox: Basic Settings $cmb_basic = new_cmb2_box( array( 'id' => $prefix . 'basic', 'title' => esc_html__( 'Start a Project Page Settings', 'boden' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'default', 'show_names' => true, ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Page Headline', 'boden' ), 'description' => esc_html__( 'Write a headline text for the page.', 'boden' ), 'id' => $prefix . 'headline', 'default' => 'Work With Us', 'type' => 'text', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Background Image', 'boden' ), 'description' => esc_html__( 'Upload an image for the background.', 'boden' ), 'id' => $prefix . 'image_background', 'type' => 'file', ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Background Overlay', 'boden' ), 'desc' => esc_html__( 'Select the way you want to display an overlay for the background', 'boden' ), 'type' => 'select', 'id' => $prefix . 'image_overlay', 'options' => array( 'dark' => esc_html__( 'Dark Overlay', 'boden' ), 'light' => esc_html__( 'Light Overlay', 'boden' ), 'none' => esc_html__( 'No Overlay', 'boden' ), ), ) ); $cmb_basic->add_field( array( 'name' => esc_html__( 'Form Email', 'boden' ), 'description' => esc_html__( 'Enter the email address for the form (If you leave it empty, we will use the WordPress admin email).', 'boden' ), 'id' => $prefix . 'email', 'type' => 'text_email', ) ); } ?>