Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'rwmb_meta_boxes', 'functionName' );
- function functionName( $meta_boxes ) {
- $prefix = 'services_';
- $meta_boxes[] = [
- 'title' => __( 'Services CPT', 'text-domain' ),
- 'id' => 'services',
- 'post_types' => ['service'],
- 'storage_type' => 'custom_table',
- 'tab_remember' => false,
- 'table' => 'wp_cpt_service',
- 'tabs' => [
- 'services_services_display_settings' => [
- 'label' => 'Public Display Settings',
- 'icon' => '',
- ],
- 'services_services_meta_tab' => [
- 'label' => 'Meta',
- 'icon' => '',
- ],
- 'services_services_main_copy' => [
- 'label' => 'Main Copy',
- 'icon' => '',
- ],
- 'services_services_features_tab' => [
- 'label' => 'Features',
- 'icon' => '',
- ],
- 'services_services_process_tab' => [
- 'label' => 'Process',
- 'icon' => '',
- ],
- 'services_services_comparisons_tab' => [
- 'label' => 'Comparisons',
- 'icon' => '',
- ],
- 'services_services_testimonials' => [
- 'label' => 'Testimonials',
- 'icon' => '',
- ],
- ],
- 'fields' => [
- [
- 'type' => 'custom_html',
- 'id' => $prefix . 'services_custom_html_ubrmpqq2thi',
- 'name' => __( 'Instructions', 'text-domain' ),
- 'std' => __( 'Default toggles for all sections is OFF. Turning these ON or OFF <b>does not affect your saved data for these sections.</b> It only decides whether these sections appear <b>publicly</b> on the page.', 'text-domain' ),
- 'tab' => 'services_services_display_settings',
- ],
- [
- 'name' => __( 'Features Section On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__features_section',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( 'This section is where you\'d put features and benefits, typically with images or icons accompanying each "feature item." See the Features tab for more information.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Process Section On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__process_section',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( 'This section is where you\'d put your 1-2-3-etc. process so your customers know how you work. See the Process tab for more information.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Comparisons Section On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__comparisons_section',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( 'This section is where you might address prospects\' objections early by differentiating yourself from other service providers. See the Comparisons tab for more information.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Testimonials Section On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__testimonials_section',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( 'This section is where you can select which testimonials to showcase for this service. See the Testimonials tab for more information.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'FAQ Section On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__faq_section',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( 'This section is where you can select FAQ questions to link to this service.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Gutenberg Content On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__gutenberg_content',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( '"Gutenberg Content" refers to the main content in the WordPress editor. Turning this on/off determines whether this content will appear publicly on the service page.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Bricksbuilder Content On/Off', 'text-domain' ),
- 'id' => $prefix . 'public__toggle__bricksbuilder_content',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'On',
- 'off_label' => 'Off',
- 'std' => false,
- 'tab' => 'services_services_display_settings',
- 'label_description' => __( '"Bricks Builder Content" refers to the pagebuilder content in Bricks Builder (if you used Bricks to create unique content for this service). Turning this on/off determines whether this content will appear publicly on the service page.', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'H1 Text', 'text-domain' ),
- 'id' => $prefix . 'meta__text__h1',
- 'type' => 'text',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_meta_tab',
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Description Heading Text', 'text-domain' ),
- 'id' => $prefix . 'meta__text__description_heading',
- 'type' => 'text',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_meta_tab',
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Description Body Text', 'text-domain' ),
- 'id' => $prefix . 'meta__text__description_body',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'tab' => 'services_services_meta_tab',
- ],
- [
- 'name' => __( 'Description Checklist', 'text-domain' ),
- 'id' => $prefix . 'meta__description_checklist',
- 'type' => 'group',
- 'collapsible' => true,
- 'clone' => true,
- 'sort_clone' => true,
- 'tab' => 'services_services_meta_tab',
- 'min_clone' => 0,
- 'max_clone' => 0,
- 'group_title' => __( '{service_description_item__text__heading}', 'text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Icon', 'text-domain' ),
- 'id' => $prefix . 'item_icon',
- 'type' => 'single_image',
- 'label_description' => __( 'Use an SVG', 'text-domain' ),
- 'columns' => 2,
- ],
- [
- 'name' => __( 'Description Item Heading Text', 'text-domain' ),
- 'id' => $prefix . 'item__text__heading',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'columns' => 5,
- ],
- [
- 'name' => __( 'Description Item Body Text', 'text-domain' ),
- 'id' => $prefix . 'description_item__text__body',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'columns' => 5,
- ],
- ],
- ],
- [
- 'name' => __( 'Main CTA Button Text', 'text-domain' ),
- 'id' => $prefix . 'meta__text__main_cta_button',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'tab' => 'services_services_meta_tab',
- ],
- [
- 'name' => __( 'Main Copy Accent Heading Text', 'text-domain' ),
- 'id' => $prefix . 'main_copy__text__heading_accent',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'tab' => 'services_services_main_copy',
- 'columns' => 4,
- ],
- [
- 'name' => __( 'Main Copy Heading Text', 'text-domain' ),
- 'id' => $prefix . 'main_copy__text__heading',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'tab' => 'services_services_main_copy',
- 'columns' => 4,
- ],
- [
- 'name' => __( 'Main Copy Body Text', 'text-domain' ),
- 'id' => $prefix . 'main_copy__text__body',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'tab' => 'services_services_main_copy',
- 'columns' => 4,
- ],
- [
- 'type' => 'custom_html',
- 'id' => $prefix . 'services_custom_html_8la1drp2p8n',
- 'name' => __( 'Instructions', 'text-domain' ),
- 'std' => __( 'This section is where you\'d put features and benefits, typically with images or icons accompanying each "feature item."', 'text-domain' ),
- 'tab' => 'services_services_features_tab',
- ],
- [
- 'name' => __( 'Use images instead of icons?', 'text-domain' ),
- 'id' => $prefix . 'features__toggle__use_images_instead_of_icons',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'Yes',
- 'off_label' => 'No',
- 'std' => false,
- 'tab' => 'services_services_features_tab',
- 'label_description' => __( 'For the section, do you want to use images (e.g. photographs, or anything in raster image format) or icons (i.e. SVG vector files)', 'text-domain' ),
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Include list, lede, or both in sidebar?', 'text-domain' ),
- 'id' => $prefix . 'features__select__includes',
- 'type' => 'select',
- 'options' => [
- 'list' => __( 'List', 'text-domain' ),
- 'lede' => __( 'Lede', 'text-domain' ),
- ],
- 'multiple' => true,
- 'select_all_none' => true,
- 'tab' => 'services_services_features_tab',
- 'columns' => 3,
- ],
- [
- 'type' => 'divider',
- 'id' => $prefix . 'services_divider_9lw04xgisjw',
- 'name' => __( 'Divider', 'text-domain' ),
- 'tab' => 'services_services_features_tab',
- ],
- [
- 'type' => 'heading',
- 'id' => $prefix . 'services_heading_f0i0h8pf47f',
- 'name' => __( 'Features Section Introduction', 'text-domain' ),
- 'desc' => __( 'This is where you\'ll build the introduction to the features section of this service page.', 'text-domain' ),
- 'tab' => 'services_services_features_tab',
- ],
- [
- 'name' => __( 'Accent Heading Text', 'text-domain' ),
- 'id' => $prefix . 'features__text__section_intro__heading_accent',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'tab' => 'services_services_features_tab',
- 'label_description' => __( 'This is the small "accent" text that appears just above your main heading.', 'text-domain' ),
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Heading Text', 'text-domain' ),
- 'id' => $prefix . 'features__text__section_intro__heading',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'tab' => 'services_services_features_tab',
- 'label_description' => __( 'This is the main heading text for your features section. It appears as the largest text in the introduction.', 'text-domain' ),
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Body Text', 'text-domain' ),
- 'id' => $prefix . 'features__text__section_intro__body',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'tab' => 'services_services_features_tab',
- 'label_description' => __( 'This is the body text (known as the "lede") that appears just below your heading. It\'s typically no longer than one short paragraph.', 'text-domain' ),
- ],
- [
- 'type' => 'divider',
- 'id' => $prefix . 'services_divider_rq10wz4qzxm',
- 'name' => __( 'Divider', 'text-domain' ),
- 'tab' => 'services_services_features_tab',
- ],
- [
- 'type' => 'heading',
- 'id' => $prefix . 'services_heading_834iz2g4l9u',
- 'name' => __( 'Feature Section Items', 'text-domain' ),
- 'desc' => __( 'This is where you\'ll build your "features and benefits" copy. Think of each item as it\'s own feature/benefit, complete with built-in sub-items for additional copy within it (if desired).', 'text-domain' ),
- 'tab' => 'services_services_features_tab',
- ],
- [
- 'name' => __( 'Feature Item', 'text-domain' ),
- 'id' => $prefix . 'features__item',
- 'type' => 'group',
- 'collapsible' => true,
- 'save_state' => true,
- 'group_title' => __( 'Item {#}: {service_item__text__heading}', 'text-domain' ),
- 'clone' => true,
- 'sort_clone' => true,
- 'tab' => 'services_services_features_tab',
- 'min_clone' => 0,
- 'max_clone' => 0,
- 'add_button' => __( '+ Add another feature to the features section', 'text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Icon', 'text-domain' ),
- 'id' => $prefix . 'feature_item__icon',
- 'type' => 'single_image',
- 'label_description' => __( 'What icon do you want to use for this feature/benefit?', 'text-domain' ),
- 'desc' => __( 'NOTE: only appears publicly if you left the "images" toggle OFF', 'text-domain' ),
- 'columns' => 2,
- ],
- [
- 'name' => __( 'Image', 'text-domain' ),
- 'id' => $prefix . 'feature_item__image',
- 'type' => 'single_image',
- 'label_description' => __( 'What image do you want to use for this feature/benefit?', 'text-domain' ),
- 'desc' => __( 'NOTE: only appears if you toggle "ON" the images setting', 'text-domain' ),
- 'columns' => 2,
- ],
- [
- 'type' => 'divider',
- 'id' => $prefix . 'services_divider_p5hxuv0eamn',
- 'name' => __( 'Divider', 'text-domain' ),
- ],
- [
- 'name' => __( 'Accent Heading Text', 'text-domain' ),
- 'id' => $prefix . 'feature_item__text__heading_accent',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'label_description' => __( 'This is the small "accent" text that appears just above this feature/benefit\'s heading.', 'text-domain' ),
- 'columns' => 5,
- ],
- [
- 'name' => __( 'Heading Text', 'text-domain' ),
- 'id' => $prefix . 'feature_item__text__heading',
- 'type' => 'text',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'label_description' => __( 'This is the main heading text for your features section. It appears as the largest text in this feature/benefit\'s copy.', 'text-domain' ),
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Body Text', 'text-domain' ),
- 'id' => $prefix . 'feature_item__text__body',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'label_description' => __( 'This is the body text (known as the "lede") that appears just below this feature/benefit\'s heading. It\'s typically no longer than one short paragraph.', 'text-domain' ),
- ],
- [
- 'type' => 'divider',
- 'id' => $prefix . 'services_divider_n8608ne4cc8',
- 'name' => __( 'Divider', 'text-domain' ),
- ],
- [
- 'name' => __( 'Feature Sub-Item', 'text-domain' ),
- 'id' => $prefix . 'feature_sub_item',
- 'type' => 'group',
- 'collapsible' => true,
- 'save_state' => false,
- 'group_title' => __( 'Sub-Item {#}: {service_subitem__text__heading}', 'text-domain' ),
- 'clone' => true,
- 'sort_clone' => true,
- 'label_description' => __( 'If you want more body copy below the above copy, this is where that magic happens!', 'text-domain' ),
- 'after' => '{translate}<p><em><strong>NOTE:</strong> FEATURE SUB-ITEMS APPEAR LIKE THE BELOW IN YOUR COPY:</em></p>
- ---BEGIN EXAMPLE---
- <ul>
- <li><p><strong>Sub-Item Heading Text</strong><br/>Sub-item Body Text</p></li><ul>
- ---END EXAMPLE---<p><em>SO IN PRACTICE, THAT MIGHT LOOK LIKE THIS EXAMPLE:</em></p>
- ---BEGIN EXAMPLE---
- <ul>
- <li><p><strong>Campaigns built around clear KPIs.</strong><br/>Generate immediate leads? Attract mid-funnel prospects? Raise brand awareness? Every goal measures success differently. I\'ll help you define KPIs for every campaign. So you can measure performance with confidence.</p></li></ul>
- ---END EXAMPLE---{/translate}',
- 'min_clone' => 0,
- 'max_clone' => 0,
- 'add_button' => __( '+ Add another sub-item to this feature', 'text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Sub-Item Heading Text', 'text-domain' ),
- 'id' => $prefix . 'feature_sub_item__text__heading',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'columns' => 5,
- ],
- [
- 'name' => __( 'Sub-Item Body Text', 'text-domain' ),
- 'id' => $prefix . 'feature_sub_item__text__body',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'columns' => 5,
- ],
- ],
- ],
- ],
- ],
- [
- 'name' => __( 'Accent Heading Text', 'text-domain' ),
- 'id' => $prefix . 'process__text__heading_accent',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'tab' => 'services_services_process_tab',
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Process Heading Text', 'text-domain' ),
- 'id' => $prefix . 'process__text__heading',
- 'type' => 'text',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_process_tab',
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Process Body Text', 'text-domain' ),
- 'id' => $prefix . 'process__text__body',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_process_tab',
- ],
- [
- 'name' => __( 'Process Step', 'text-domain' ),
- 'id' => $prefix . 'process__item__step',
- 'type' => 'group',
- 'collapsible' => true,
- 'clone' => true,
- 'sort_clone' => true,
- 'tab' => 'services_services_process_tab',
- 'min_clone' => 0,
- 'max_clone' => 0,
- 'group_title' => __( '{#} - {service_item__text__heading}', 'text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Icon', 'text-domain' ),
- 'id' => $prefix . 'item__icon',
- 'type' => 'single_image',
- 'columns' => 2,
- ],
- [
- 'name' => __( 'Step Heading Text', 'text-domain' ),
- 'id' => $prefix . 'item__text__heading',
- 'type' => 'text',
- 'limit_type' => 'character',
- 'columns' => 6,
- ],
- [
- 'name' => __( 'Step Body Text', 'text-domain' ),
- 'id' => $prefix . 'item__text__body',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- 'columns' => 4,
- ],
- ],
- ],
- [
- 'name' => __( 'Use Custom Comparison Section Headings?', 'text-domain' ),
- 'id' => $prefix . 'comparisons__toggle__use_custom_comparison_section_headings',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'Yes',
- 'off_label' => 'No',
- 'std' => false,
- 'tab' => 'services_services_comparisons_tab',
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Include Global Comparisons?', 'text-domain' ),
- 'id' => $prefix . 'comparisons__toggle__include_global_comparisons',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'Yes',
- 'off_label' => 'No',
- 'std' => false,
- 'tab' => 'services_services_comparisons_tab',
- 'columns' => 3,
- ],
- [
- 'name' => __( 'Comparisons Heading Text', 'text-domain' ),
- 'id' => $prefix . 'comparisons__text__heading',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_comparisons_tab',
- 'columns' => 6,
- 'visible' => ['service_use_custom_comparison_section_headings', 1],
- ],
- [
- 'name' => __( 'Comparisons Subheading Text', 'text-domain' ),
- 'id' => $prefix . 'comparisons__text__subheading',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_comparisons_tab',
- 'visible' => ['service_use_custom_comparison_section_headings', 1],
- ],
- [
- 'name' => __( 'Comparison Item', 'text-domain' ),
- 'id' => $prefix . 'comparisons__item',
- 'type' => 'group',
- 'collapsible' => true,
- 'clone' => true,
- 'sort_clone' => true,
- 'tab' => 'services_services_comparisons_tab',
- 'min_clone' => 0,
- 'max_clone' => 0,
- 'group_title' => __( '{service_item__text__heading_positive}', 'text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Negative Heading Text', 'text-domain' ),
- 'id' => $prefix . 'comparison_item__text__heading_negative',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- ],
- [
- 'name' => __( 'Positive Heading Text', 'text-domain' ),
- 'id' => $prefix . 'comparison_item__text__heading_positive',
- 'type' => 'textarea',
- 'limit_type' => 'character',
- ],
- [
- 'name' => __( 'Positive Body Text', 'text-domain' ),
- 'id' => $prefix . 'comparison_item__text__body_positive',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- ],
- ],
- ],
- [
- 'name' => __( 'Use Custom Testimonial Section Headings?', 'text-domain' ),
- 'id' => $prefix . 'testimonials__toggle__use_custom_testimonial_section_headings',
- 'type' => 'switch',
- 'style' => 'rounded',
- 'on_label' => 'Yes',
- 'off_label' => 'No',
- 'std' => false,
- 'tab' => 'services_services_testimonials',
- 'label_description' => __( 'Do you want to override the global default testimonial section headings on this page?', 'text-domain' ),
- ],
- [
- 'name' => __( 'Testimonials Heading Text', 'text-domain' ),
- 'id' => $prefix . 'testimonials__text__heading',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_testimonials',
- 'visible' => ['service_use_custom_testimonial_section_headings', 1],
- ],
- [
- 'name' => __( 'Testimonials Subheading Text', 'text-domain' ),
- 'id' => $prefix . 'testimonials__text__subheading',
- 'type' => 'textarea',
- 'sanitize_callback' => 'none',
- 'limit_type' => 'character',
- 'tab' => 'services_services_testimonials',
- 'visible' => ['service_use_custom_testimonial_section_headings', 1],
- ],
- ],
- ];
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment