Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 22.63 KB | None | 0 0
  1. // CONTENT BLOCKS
  2.     $meta_boxes[] = array(
  3.         'title' => __( 'Content blocks' ),
  4.         'post_types' => 'page',
  5.         'fields' => array(
  6.             array(
  7.                 'id'     => 'content-block',
  8.                 'type'   => 'group',
  9.                 'clone'  => true,
  10.                 'sort_clone' => true,
  11.                 'collapsible' => true,
  12.                 'group_title' => array( 'field' => 'select-content-block' ),
  13.                 'save_state' => true,
  14.                
  15.                 'fields' => array(
  16.                     array(
  17.                         'id'   => 'select-content-block',
  18.                         'name' => __( 'Create a content block', 'rwmb' ),
  19.                         'type' => 'select',
  20.                         'multiple' => false,
  21.                         'placeholder' => 'Select',
  22.                         'options' => array(
  23.                             'text' => 'Freeform text',
  24.                             'slideshow' => 'Slideshow',
  25.                             'gallery' => 'Gallery',
  26.                             'image-and-text' => 'Image and text',
  27.                             'menu' => 'Menu',
  28.                             'call-to-action' => 'Call to action'
  29.                         )
  30.                     ),
  31.                    
  32.                    
  33.                     // TEXT
  34.                     array(
  35.                         'id'     => 'content-block-text',
  36.                         'type'   => 'group',
  37.                         'visible' => array('select-content-block', '=', 'text'),
  38.                         'fields' => array(
  39.                             array(
  40.                                 'id'   => 'content-block-text_text-format',
  41.                                 'name' => __( 'Text format', 'rwmb' ),
  42.                                 'type' => 'select',
  43.                                 'multiple' => false,
  44.                                 'placeholder' => 'Select',
  45.                                 'options' => array(
  46.                                     'standard' => 'Standard',
  47.                                     'blockquote' => 'Blockquote'
  48.                                 )
  49.                             ),
  50.                             array(
  51.                                 'id'   => 'content-block-text_text-format-standard_title',
  52.                                 'name' => __( 'Title', 'rwmb' ),
  53.                                 'type' => 'text',
  54.                                 'desc' => 'Optional',
  55.                                 'visible' => array('content-block-text_text-format', '=', 'standard'),
  56.                             ),
  57.                             array(
  58.                                 'id'   => 'content-block-text_text-format-standard_number-of-columns',
  59.                                 'name' => __( 'Number of columns', 'rwmb' ),
  60.                                 'type' => 'select',
  61.                                 'multiple' => false,
  62.                                 'visible' => array('content-block-text_text-format', '=', 'standard'),
  63.                                 'placeholder' => 'Select',
  64.                                 'options' => array(
  65.                                     '2' => '2',
  66.                                     '3' => '3',
  67.                                     '4' => '4'
  68.                                 )
  69.                             ),
  70.                             array(
  71.                                 'id'   => 'content-block-text_text',
  72.                                 'name' => __( 'Text', 'rwmb' ),
  73.                                 'type' => 'wysiwyg',
  74.                                 // 'options' => array(
  75.                                 //  'media_buttons' => false,
  76.                                 //  'textarea_rows' => 5
  77.                                 // )
  78.                             ),
  79.                             array(
  80.                                 'id'   => 'content-block-text_text-align',
  81.                                 'name' => __( 'Text align', 'rwmb' ),
  82.                                 'type' => 'select',
  83.                                 'placeholder' => 'Left',
  84.                                 'multiple' => false,
  85.                                 'options' => array(
  86.                                     'ac' => 'Centre',
  87.                                     'ar' => 'Right'
  88.                                 ),
  89.                                 'desc' => 'Default is left',
  90.                                 'visible' => array('content-block-text_text-format', '=', 'blockquote'),
  91.                             ),
  92.                         ),
  93.                     ),
  94.                    
  95.                    
  96.                     // SLIDESHOW
  97.                     array(
  98.                         'id'     => 'content-block-slideshow',
  99.                         'type'   => 'group',
  100.                         'visible' => array('select-content-block', '=', 'slideshow'),
  101.                         'fields' => array(
  102.                             array(
  103.                                 'id'   => 'content-block-slideshow_slideshow-format',
  104.                                 'name' => __( 'Slideshow format', 'rwmb' ),
  105.                                 'type' => 'select',
  106.                                 'placeholder' => 'Select',
  107.                                 'multiple' => false,
  108.                                 'options' => array(
  109.                                     'standard' => 'Standard',
  110.                                     'horizontal' => 'Horizontal scrolling',
  111.                                     'group' => 'Group'
  112.                                 )
  113.                             ),
  114.                             array(
  115.                                 'id'   => 'content-block-slideshow_slideshow-images',
  116.                                 'name' => __( 'Slideshow images', 'rwmb' ),
  117.                                 'type' => 'image_advanced',
  118.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'horizontal'),
  119.                             ),
  120.                             array(
  121.                                 'id'   => 'content-block-slideshow_slideshow-images_crop',
  122.                                 'name' => __( 'Crop slideshow images?', 'rwmb' ),
  123.                                 'type' => 'checkbox',
  124.                                 'desc' => 'Check to crop images to the size of the slideshow',
  125.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'standard'),
  126.                             ),
  127.                             array(
  128.                                 'id'   => 'content-block-slideshow_subtitle',
  129.                                 'name' => __( 'Slideshow subtitle', 'rwmb' ),
  130.                                 'type' => 'text',
  131.                                 'visible' => array (
  132.                                     'when' => array (
  133.                                         array (
  134.                                             'content-block-slideshow_slideshow-format', '=', 'standard',
  135.                                         ),
  136.                                         array (
  137.                                             'content-block-slideshow_slideshow-format', '=', 'horizontal'
  138.                                         ),
  139.                                     ),
  140.                                     'relation' => 'or',
  141.                                 ),
  142.                             ),
  143.                             array(
  144.                                 'id'   => 'content-block-slideshow_title',
  145.                                 'name' => __( 'Slideshow title', 'rwmb' ),
  146.                                 'type' => 'text',
  147.                                 'visible' => array (
  148.                                     'when' => array (
  149.                                         array (
  150.                                             'content-block-slideshow_slideshow-format', '=', 'standard',
  151.                                         ),
  152.                                         array (
  153.                                             'content-block-slideshow_slideshow-format', '=', 'horizontal'
  154.                                         ),
  155.                                     ),
  156.                                     'relation' => 'or',
  157.                                 ),
  158.                             ),
  159.                            
  160.                            
  161.                             // Standard
  162.                             array(
  163.                                 'id'   => 'content-block-slideshow_slideshow-format-standard_make-title-a-link',
  164.                                 'name' => __( 'Make title a link?', 'rwmb' ),
  165.                                 'type' => 'checkbox',
  166.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'standard')
  167.                             ),
  168.                             array(
  169.                                 'id'   => 'content-block-slideshow_slideshow-format-standard_make-title-a-link_link-type',
  170.                                 'name' => __( 'Slideshow title link', 'rwmb' ),
  171.                                 'type' => 'select',
  172.                                 'multiple' => false,
  173.                                 'placeholder' => 'Select',
  174.                                 'options' => array(
  175.                                     'page' => 'Page',
  176.                                     'custom' => 'Custom link'
  177.                                 ),
  178.                                 'visible' => array('content-block-slideshow_slideshow-format-standard_make-title-a-link', '=', true)
  179.                             ),
  180.                             array(
  181.                                 'id'   => 'content-block-slideshow_slideshow-format-standard_slide-title-link-custom',
  182.                                 'name' => __( 'Slide title', 'rwmb' ),
  183.                                 'type' => 'url',
  184.                                 'visible' => array('content-block-slideshow_slideshow-format-standard_make-title-a-link_link-type', '=', 'custom')
  185.                             ),
  186.                             array(
  187.                                 'id'   => 'content-block-slideshow_slideshow-format-standard_slide-title-link-page',
  188.                                 'name' => __( 'Page to link slide', 'rwmb' ),
  189.                                 'type' => 'select',
  190.                                 'placeholder' => 'Select page',
  191.                                 'options' => $pageoptions,
  192.                                 'visible' => array('content-block-slideshow_slideshow-format-standard_make-title-a-link_link-type', '=', 'page')
  193.                             ),
  194.                             array(
  195.                                 'id'   => 'content-block-slideshow_aside',
  196.                                 'name' => __( 'Slideshow aside', 'rwmb' ),
  197.                                 'type' => 'textarea',
  198.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'standard'),
  199.                             ),
  200.                             array(
  201.                                 'id'   => 'content-block-slideshow_title-position',
  202.                                 'name' => __( 'Title / Subtitle / Aside position', 'rwmb' ),
  203.                                 'type' => 'select',
  204.                                 'placeholder' => 'Select',
  205.                                 'multiple' => false,
  206.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'standard'),
  207.                                 'options' => array(
  208.                                     'top' => 'Top',
  209.                                     'overlay' => 'Overlay'
  210.                                 )
  211.                             ),
  212.                             array(
  213.                                 'id'   => 'content-block-slideshow_description',
  214.                                 'name' => __( 'Slideshow description', 'rwmb' ),
  215.                                 'type' => 'wysiwyg',
  216.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'standard'),
  217.                                 'options' => array(
  218.                                     'media_buttons' => false,
  219.                                     'textarea_rows' => 5
  220.                                 )
  221.                             ),
  222.                             array(
  223.                                 'id'     => 'content-block-slideshow_slideshow-format-standard',
  224.                                 'type'   => 'group',
  225.                                 'name' => 'Slides',
  226.                                 'clone'  => true,
  227.                                 'sort_clone' => true,
  228.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'standard'),
  229.                                 'fields' => array(
  230.                                     array(
  231.                                         'id'   => 'content-block-slideshow_slideshow-format-standard_slide-image',
  232.                                         'name' => __( 'Slideshow image', 'rwmb' ),
  233.                                         'type' => 'image_advanced',
  234.                                         'max_file_uploads' => 1,
  235.                                     ),
  236.                                     array(
  237.                                         'id'   => 'content-block-slideshow_slideshow-format-standard_slide-link',
  238.                                         'name' => __( 'Slideshow link', 'rwmb' ),
  239.                                         'type' => 'select',
  240.                                         'multiple' => false,
  241.                                         'placeholder' => 'Select',
  242.                                         'options' => array(
  243.                                             'page' => 'Page',
  244.                                             'custom' => 'Custom link'
  245.                                         ),
  246.                                     ),
  247.                                     array(
  248.                                         'id'   => 'content-block-slideshow_slideshow-format-standard_slide-link-custom',
  249.                                         'name' => __( 'Slide title', 'rwmb' ),
  250.                                         'type' => 'url',
  251.                                         'visible' => array('content-block-slideshow_slideshow-format-standard_slide-link', '=', 'custom')
  252.                                     ),
  253.                                     array(
  254.                                         'id'   => 'content-block-slideshow_slideshow-format-standard_slide-link-page',
  255.                                         'name' => __( 'Page to link slide', 'rwmb' ),
  256.                                         'type' => 'select',
  257.                                         'placeholder' => 'Select page',
  258.                                         'options' => $pageoptions,
  259.                                         'visible' => array('content-block-slideshow_slideshow-format-standard_slide-link', '=', 'page')
  260.                                     ),
  261.                                 ),
  262.                             ),
  263.                            
  264.                            
  265.                             // Horizontal
  266.                             array(
  267.                                 'id'   => 'content-block-slideshow_number_slides_per_row',
  268.                                 'name' => __( 'Number of slides per row', 'rwmb' ),
  269.                                 'type' => 'select',
  270.                                 'multiple' => false,
  271.                                 'placeholder' => 'Select',
  272.                                 'options' => array(
  273.                                     '2' => '2',
  274.                                     '3' => '3',
  275.                                     '4' => '4'
  276.                                 ),
  277.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'horizontal'),
  278.                             ),
  279.                            
  280.                            
  281.                             // Group
  282.                             array(
  283.                                 'id'   => 'content-block-slideshow_group-subtitle',
  284.                                 'name' => __( 'Group subtitle', 'rwmb' ),
  285.                                 'type' => 'text',
  286.                                 'placeholder' => 'eg. Featured artists',
  287.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'group'),
  288.                             ),
  289.                             array(
  290.                                 'id'   => 'content-block-slideshow_group-title',
  291.                                 'name' => __( 'Group title', 'rwmb' ),
  292.                                 'type' => 'text',
  293.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'group'),
  294.                             ),
  295.                             array(
  296.                                 'id'     => 'content-block-slideshow_slideshow-format-group',
  297.                                 'type'   => 'group',
  298.                                 'name' => 'Slides',
  299.                                 'clone'  => true,
  300.                                 'sort_clone' => true,
  301.                                 'visible' => array('content-block-slideshow_slideshow-format', '=', 'group'),
  302.                                 'fields' => array(
  303.                                     array(
  304.                                         'id'   => 'content-block-slideshow_slideshow-format-group_slide-title',
  305.                                         'name' => __( 'Slide title', 'rwmb' ),
  306.                                         'type' => 'text',
  307.                                         'placeholder' => 'eg. Ian McKeever'
  308.                                     ),
  309.                                     array(
  310.                                         'id'   => 'content-block-slideshow_slideshow-format-group_slide-image',
  311.                                         'name' => __( 'Slideshow image', 'rwmb' ),
  312.                                         'type' => 'image_advanced',
  313.                                         'max_file_uploads' => 1,
  314.                                     ),
  315.                                     array(
  316.                                         'id'   => 'content-block-slideshow_slideshow-format-group_slide-link',
  317.                                         'name' => __( 'Slideshow link', 'rwmb' ),
  318.                                         'type' => 'select',
  319.                                         'multiple' => false,
  320.                                         'placeholder' => 'Select',
  321.                                         'options' => array(
  322.                                             'page' => 'Page',
  323.                                             'custom' => 'Custom link'
  324.                                         ),
  325.                                     ),
  326.                                     array(
  327.                                         'id'   => 'content-block-slideshow_slideshow-format-group_slide-link-custom',
  328.                                         'name' => __( 'Slide title', 'rwmb' ),
  329.                                         'type' => 'url',
  330.                                         'visible' => array('content-block-slideshow_slideshow-format-group_slide-link', '=', 'custom')
  331.                                     ),
  332.                                     array(
  333.                                         'id'   => 'content-block-slideshow_slideshow-format-group_slide-link-page',
  334.                                         'name' => __( 'Page to link slide', 'rwmb' ),
  335.                                         'type' => 'select',
  336.                                         'placeholder' => 'Select page',
  337.                                         'options' => $pageoptions,
  338.                                         'visible' => array('content-block-slideshow_slideshow-format-group_slide-link', '=', 'page')
  339.                                     ),
  340.                                 ),
  341.                             ),
  342.                         ),
  343.                     ),
  344.                    
  345.                    
  346.                     // GALLERY
  347.                     array(
  348.                         'id'     => 'content-block-gallery',
  349.                         'type'   => 'group',
  350.                         'visible' => array('select-content-block', '=', 'gallery'),
  351.                         'fields' => array(
  352.                             array(
  353.                                 'id'   => 'content-block-gallery_gallery-format',
  354.                                 'name' => __( 'Gallery format', 'rwmb' ),
  355.                                 'type' => 'select',
  356.                                 'placeholder' => 'Select',
  357.                                 'multiple' => false,
  358.                                 'options' => array(
  359.                                     'standard' => 'Standard',
  360.                                     'series-index' => 'Series index',
  361.                                     'instagram' => 'Instagram'
  362.                                 )
  363.                             ),
  364.                            
  365.                             // Standard
  366.                             array(
  367.                                 'id'   => 'content-block-gallery_gallery-images',
  368.                                 'name' => __( 'Gallery images', 'rwmb' ),
  369.                                 'type' => 'image_advanced',
  370.                                 'multiple' => true,
  371.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  372.                             ),
  373.                             array(
  374.                                 'id'   => 'content-block-gallery_number-of-columns',
  375.                                 'name' => __( 'Number of columns', 'rwmb' ),
  376.                                 'type' => 'select',
  377.                                 'multiple' => false,
  378.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  379.                                 'placeholder' => 'Select',
  380.                                 'options' => array(
  381.                                     '1' => '1',
  382.                                     '2' => '2',
  383.                                     '3' => '3',
  384.                                     '4' => '4'
  385.                                 )
  386.                             ),
  387.                             array(
  388.                                 'id'   => 'content-block-gallery_gallery-image-format',
  389.                                 'name' => __( 'Gallery image format', 'rwmb' ),
  390.                                 'type' => 'select',
  391.                                 'placeholder' => 'Select',
  392.                                 'multiple' => false,
  393.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  394.                                 'options' => array(
  395.                                     'large' => 'Standard',
  396.                                     'big-square-crop' => 'Square'
  397.                                 )
  398.                             ),
  399.                             array(
  400.                                 'id'   => 'content-block-gallery_include-image-titles',
  401.                                 'name' => __( 'Include image titles?', 'rwmb' ),
  402.                                 'type' => 'checkbox',
  403.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  404.                             ),
  405.                             array(
  406.                                 'id'   => 'content-block-gallery_include-image-captions',
  407.                                 'name' => __( 'Include image captions?', 'rwmb' ),
  408.                                 'type' => 'checkbox',
  409.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  410.                             ),
  411.                             array(
  412.                                 'id'   => 'content-block-gallery_edge-to-edge',
  413.                                 'name' => __( 'Edge-to-edge images?', 'rwmb' ),
  414.                                 'type' => 'checkbox',
  415.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  416.                             ),
  417.                             array(
  418.                                 'id'   => 'content-block-gallery_alt-value-as-link',
  419.                                 'name' => __( 'Use <em>Alt</em> value as link?', 'rwmb' ),
  420.                                 'type' => 'checkbox',
  421.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'standard'),
  422.                             ),
  423.                            
  424.                             // Series index
  425.                             array(
  426.                                 'id'     => 'content-block-gallery_gallery-format_series-index',
  427.                                 'type'   => 'group',
  428.                                 'clone'  => true,
  429.                                 'sort_clone' => true,
  430.                                 'name' => 'Series indexes',
  431.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'series-index'),
  432.                                 'fields' => array(
  433.                                     array(
  434.                                         'id'   => 'content-block-gallery_gallery-format_series-index_series-title',
  435.                                         'name' => __( 'Index title', 'rwmb' ),
  436.                                         'type' => 'text',
  437.                                     ),
  438.                                     array(
  439.                                         'id'   => 'content-block-gallery_gallery-format_series-index_include-series-description',
  440.                                         'name' => __( 'Include index description?', 'rwmb' ),
  441.                                         'type' => 'checkbox',
  442.                                     ),
  443.                                     array(
  444.                                         'id'   => 'content-block-gallery_gallery-format_series-index_series-description',
  445.                                         'name' => __( 'Index description', 'rwmb' ),
  446.                                         'type' => 'wysiwyg',
  447.                                         'visible' => array('content-block-gallery_gallery-format_series-index_include-series-description', '=', true),
  448.                                         'options' => array(
  449.                                             'media_buttons' => false,
  450.                                             'textarea_rows' => 5,
  451.                                             'wp_more' => false
  452.                                         )
  453.                                     ),
  454.                                     array(
  455.                                         'id'   => 'content-block-gallery_gallery-format_series-index_images',
  456.                                         'name' => __( 'Index images', 'rwmb' ),
  457.                                         'type' => 'image_advanced',
  458.                                         'multiple' => true
  459.                                     ),
  460.                                     array(
  461.                                         'id'   => 'content-block-gallery_gallery-format_series-index_number-of-columns',
  462.                                         'name' => __( 'Number of columns', 'rwmb' ),
  463.                                         'type' => 'select',
  464.                                         'multiple' => false,
  465.                                         'placeholder' => 'Select',
  466.                                         'options' => array(
  467.                                             '1' => '1',
  468.                                             '2' => '2',
  469.                                             '3' => '3',
  470.                                             '4' => '4'
  471.                                         )
  472.                                     ),
  473.                                 ),
  474.                             ),
  475.                            
  476.                             // Instagram
  477.                             array(
  478.                                 'id'   => 'content-block-gallery_gallery-format_instagram_number-of-columns',
  479.                                 'name' => __( 'Number of columns', 'rwmb' ),
  480.                                 'type' => 'select',
  481.                                 'multiple' => false,
  482.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'instagram'),
  483.                                 'placeholder' => 'Select',
  484.                                 'options' => array(
  485.                                     '1' => '1',
  486.                                     '2' => '2',
  487.                                     '3' => '3',
  488.                                     '4' => '4'
  489.                                 )
  490.                             ),
  491.                             array(
  492.                                 'id'   => 'content-block-gallery_gallery-format_instagram_number-of-photos',
  493.                                 'name' => __( 'Number of photos', 'rwmb' ),
  494.                                 'type' => 'numvber',
  495.                                 'multiple' => false,
  496.                                 'visible' => array('content-block-gallery_gallery-format', '=', 'instagram')
  497.                             ),
  498.                         ),
  499.                     ),
  500.                    
  501.                    
  502.                     // IMAGE AND TEXT
  503.                     array(
  504.                         'id'     => 'content-block-image-and-text',
  505.                         'type'   => 'group',
  506.                         'visible' => array('select-content-block', '=', 'image-and-text'),
  507.                         'fields' => array(
  508.                             array(
  509.                                 'id'   => 'content-block-image-and-text_image-and-text-format',
  510.                                 'name' => __( 'Image and text format', 'rwmb' ),
  511.                                 'type' => 'select',
  512.                                 'multiple' => false,
  513.                                 'placeholder' => 'Select',
  514.                                 'options' => array(
  515.                                     'freeform' => 'Freeform',
  516.                                     'page' => 'Page'
  517.                                 )
  518.                             ),
  519.                            
  520.                             // Freeform
  521.                             array(
  522.                                 'id'   => 'content-block-image-and-text_freeform-images',
  523.                                 'name' => __( 'Select image', 'rwmb' ),
  524.                                 'type' => 'image_advanced',
  525.                                 'max_file_uploads' => 1,
  526.                                 'multiple' => false,
  527.                                 'visible' => array('content-block-image-and-text_image-and-text-format', '=', 'freeform'),
  528.                             ),
  529.                             array(
  530.                                 'id'   => 'content-block-image-and-text_freeform-text',
  531.                                 'name' => __( 'Text', 'rwmb' ),
  532.                                 'type' => 'wysiwyg',
  533.                                 'options' => array(
  534.                                     'media_buttons' => false,
  535.                                     'textarea_rows' => 10
  536.                                 ),
  537.                                 'visible' => array('content-block-image-and-text_image-and-text-format', '=', 'freeform'),
  538.                             ),
  539.                            
  540.                             // Page
  541.                             array(
  542.                                 'id'   => 'content-block-image-and-text_select_page',
  543.                                 'name' => __( 'Page', 'rwmb' ),
  544.                                 'type' => 'select',
  545.                                 'placeholder' => 'Select page',
  546.                                 'options' => $pageoptions,
  547.                                 'description' => 'Selected page must have a Featured Image and Excerpt to display correctly',
  548.                                 'visible' => array('content-block-image-and-text_image-and-text-format', '=', 'page'),
  549.                             ),
  550.                             array(
  551.                                 'id'   => 'content-block-image-and-text_select_page_use-alternative-title',
  552.                                 'name' => __( 'Use another title?', 'rwmb' ),
  553.                                 'type' => 'checkbox',
  554.                                 'visible' => array('content-block-image-and-text_image-and-text-format', '=', 'page'),
  555.                                 'desc' => 'The page title then becomes a subtitle'
  556.                             ),
  557.                             array(
  558.                                 'id'   => 'content-block-image-and-text_select_page_alternative-title',
  559.                                 'name' => __( 'Alternative title', 'rwmb' ),
  560.                                 'type' => 'text',
  561.                                 'visible' => array('content-block-image-and-text_select_page_use-alternative-title', '=', true),
  562.                             ),
  563.                            
  564.                             // Globals
  565.                             array(
  566.                                 'id'   => 'content-block-image-and-text_image-and-text-position',
  567.                                 'name' => __( 'Image and text position', 'rwmb' ),
  568.                                 'type' => 'select',
  569.                                 'multiple' => false,
  570.                                 'placeholder' => 'Select',
  571.                                 'options' => array(
  572.                                     'image-left-text-right' => 'Image left text right',
  573.                                     'image-right-text-left' => 'Image right text left',
  574.                                 )
  575.                             ),
  576.                             array(
  577.                                 'id'   => 'content-block-image-and-text_edge-to-edge',
  578.                                 'name' => __( 'Edge-to-edge images?', 'rwmb' ),
  579.                                 'type' => 'checkbox',
  580.                             ),
  581.                         ),
  582.                     ),
  583.                    
  584.                    
  585.                     // MENU
  586.                     array(
  587.                         'id'     => 'content-block-menu',
  588.                         'type'   => 'group',
  589.                         'visible' => array('select-content-block', '=', 'menu'),
  590.                         'fields' => array(
  591.                             array(
  592.                                 'id'   => 'content-block-menu_menu-format',
  593.                                 'name' => __( 'Menu format', 'rwmb' ),
  594.                                 'type' => 'select',
  595.                                 'multiple' => false,
  596.                                 'placeholder' => 'Select',
  597.                                 'options' => array(
  598.                                     'subpages' => 'Subpages'
  599.                                 )
  600.                             ),
  601.                         ),
  602.                     ),
  603.                    
  604.                    
  605.                     // CALL TO ACTION
  606.                     array(
  607.                         'id'     => 'content-block-call-to-action',
  608.                         'type'   => 'group',
  609.                         'visible' => array('select-content-block', '=', 'call-to-action'),
  610.                         'fields' => array(
  611.                             array(
  612.                                 'id'   => 'content-block-call-to-action_text',
  613.                                 'name' => __( 'Call to action text', 'rwmb' ),
  614.                                 'type' => 'text'
  615.                             ),
  616.                             array(
  617.                                 'id'   => 'content-block-call-to-action_what-link',
  618.                                 'name' => __( 'Use different text for the link', 'rwmb' ),
  619.                                 'type' => 'checkbox',
  620.                                 'desc' => 'By default the call to action text is used as a link'
  621.                             ),
  622.                             array(
  623.                                 'id'   => 'content-block-call-to-action_text-link',
  624.                                 'name' => __( 'Call to action link text', 'rwmb' ),
  625.                                 'type' => 'text',
  626.                                 'visible' => array('content-block-call-to-action_what-link', '=', true),
  627.                             ),
  628.                             array(
  629.                                 'id'   => 'content-block-call-to-action_link',
  630.                                 'name' => __( 'Call to action link', 'rwmb' ),
  631.                                 'type' => 'text'
  632.                             ),
  633.                             array(
  634.                                 'id'   => 'content-block-call-to-action_text-align',
  635.                                 'name' => __( 'Text align', 'rwmb' ),
  636.                                 'type' => 'select',
  637.                                 'placeholder' => 'Centre',
  638.                                 'multiple' => false,
  639.                                 'options' => array(
  640.                                     'al' => 'Left',
  641.                                     'ar' => 'Right'
  642.                                 ),
  643.                                 'desc' => 'Default is centre',
  644.                             ),
  645.                         ),
  646.                     ),
  647.                 ),
  648.             ),
  649.         ),
  650.     );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement