brasofilo

Repeater block bug

Dec 21st, 2012
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $repeater_fields[] = $options_panel->addImage( 'image_field_id',
  2.     array(
  3.         'name'=> 'My Image ',
  4.         'desc'=> '',
  5.     ),
  6.     true
  7. );
  8. $repeater_fields[] = $options_panel->addImage( 'image_field_id2',
  9.     array(
  10.         'name'=> 'My Image ',
  11.         'desc'=> '',
  12.     ),
  13.     true
  14. );
  15. /* Then just add the fields to the repeater block */
  16. $options_panel->addRepeaterBlock( 're_',
  17.     array(
  18.         'sortable' => true,
  19.         'inline' => true,
  20.         'name' => 'This is a Repeater Block',
  21.         'desc'=> '',
  22.         'fields' => $repeater_fields
  23.     )
  24. );
RAW Paste Data