Advertisement
Guest User

WPSE 96185

a guest
Apr 17th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. add_action ('add_meta_boxes', 'mp_mbe_create' );  
  2. function mp_mbe_create() {  
  3.     add_meta_box (  
  4.         'mp-meta',  
  5.         'Form Fields',  
  6.         'mp_mbe_function',  
  7.         'movie_reviews',  
  8.         'normal',  
  9.         'high'  
  10.     );  
  11. }  
  12.  
  13. $mpprefix =  'Custom_';  
  14. $mp_custom_meta_fields = array(  
  15.     array(  
  16.         'label' => 'Add New Form',  
  17.         'desc' => 'Add new fields to your form here',  
  18.         'id' => $mpprefix.'repeatable',  
  19.         'type' => 'repeatable',  
  20.         'options' => array(  
  21.             array (  
  22.                 'label' => 'Text Box',  
  23.                 'value' => 'text',  
  24.                 'type' => 'text',  
  25.             ),  
  26.             array(  
  27.                 'label' => 'Text Area',  
  28.                 'value' => 'textarea',  
  29.                 'type' => 'textarea'  
  30.             ),  
  31. );  
  32.  
  33. function mp_mbe_function() {  
  34.     global $mp_custom_meta_fields, $post;  
  35.     // displays the actual form fields
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement