/core/views/meta_box_options.php

  1. <?php 
  2.  
  3. /** 
  4. * Meta box - options 
  5. * 
  6. * This template file is used when editing a field group and creates the interface for editing options. 
  7. * 
  8. * @type template 
  9. * @date 23/06/12 
  10. */ 
  11.  
  12.  
  13. // global 
  14. global $post; 
  15.  
  16.  
  17. // vars 
  18. $options = apply_filters('acf/field_group/get_options', array(), $post->ID); 
  19.  
  20.  
  21. ?> 
  22. <table class="acf_input widefat" id="acf_options"> 
  23. <tr> 
  24. <td class="label"> 
  25. <label for=""><?php _e("Order No.", 'acf'); ?></label> 
  26. <p class="description"><?php _e("Field groups are created in order <br />from lowest to highest", 'acf'); ?></p> 
  27. </td> 
  28. <td> 
  29. <?php  
  30.  
  31. do_action('acf/create_field', array( 
  32. 'type' => 'number',  
  33. 'name' => 'menu_order',  
  34. 'value' => $post->menu_order,  
  35. )); 
  36.  
  37. ?> 
  38. </td> 
  39. </tr> 
  40. <tr> 
  41. <td class="label"> 
  42. <label for=""><?php _e("Position", 'acf'); ?></label> 
  43. </td> 
  44. <td> 
  45. <?php  
  46.  
  47. do_action('acf/create_field', array( 
  48. 'type' => 'select',  
  49. 'name' => 'options[position]',  
  50. 'value' => $options['position'],  
  51. 'choices' => array( 
  52. 'acf_after_title' => __("High (after title)", 'acf'),  
  53. 'normal' => __("Normal (after content)", 'acf'),  
  54. 'side' => __("Side", 'acf'),  
  55. ),  
  56. 'default_value' => 'normal' 
  57. )); 
  58.  
  59. ?> 
  60. </td> 
  61. </tr> 
  62. <tr> 
  63. <td class="label"> 
  64. <label for="post_type"><?php _e("Style", 'acf'); ?></label> 
  65. </td> 
  66. <td> 
  67. <?php  
  68.  
  69. do_action('acf/create_field', array( 
  70. 'type' => 'select',  
  71. 'name' => 'options[layout]',  
  72. 'value' => $options['layout'],  
  73. 'choices' => array( 
  74. 'no_box' => __("Seamless (no metabox)", 'acf'),  
  75. 'default' => __("Standard (WP metabox)", 'acf'),  
  76. )); 
  77.  
  78. ?> 
  79. </td> 
  80. </tr> 
  81. <tr id="hide-on-screen"> 
  82. <td class="label"> 
  83. <label for="post_type"><?php _e("Hide on screen", 'acf'); ?></label> 
  84. <p class="description"><?php _e("<b>Select</b> items to <b>hide</b> them from the edit screen", 'acf'); ?></p> 
  85. <p class="description"><?php _e("If multiple field groups appear on an edit screen, the first field group's options will be used. (the one with the lowest order number)", 'acf'); ?></p> 
  86. </td> 
  87. <td> 
  88. <?php  
  89.  
  90. do_action('acf/create_field', array( 
  91. 'type' => 'checkbox',  
  92. 'name' => 'options[hide_on_screen]',  
  93. 'value' => $options['hide_on_screen'],  
  94. 'choices' => array( 
  95. 'permalink' => __("Permalink", 'acf'),  
  96. 'the_content' => __("Content Editor", 'acf'),  
  97. 'excerpt' => __("Excerpt", 'acf'),  
  98. 'custom_fields' => __("Custom Fields", 'acf'),  
  99. 'discussion' => __("Discussion", 'acf'),  
  100. 'comments' => __("Comments", 'acf'),  
  101. 'revisions' => __("Revisions", 'acf'),  
  102. 'slug' => __("Slug", 'acf'),  
  103. 'author' => __("Author", 'acf'),  
  104. 'format' => __("Format", 'acf'),  
  105. 'featured_image' => __("Featured Image", 'acf'),  
  106. 'categories' => __("Categories", 'acf'),  
  107. 'tags' => __("Tags", 'acf'),  
  108. 'send-trackbacks' => __("Send Trackbacks", 'acf'),  
  109. )); 
  110.  
  111. ?> 
  112. </td> 
  113. </tr> 
  114. </table> 
.