Advertisement
Guest User

Untitled

a guest
Jul 12th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. acf_add_options_sub_page('txt Importer');
  2.  
  3. acf_add_local_field_group([
  4.     'key' => 'txt Importer Field Group',
  5.     'title' => 'txt Importer',
  6.     'style' => 'seamless',
  7.     'fields' => [
  8.         [
  9.             'label' => '',
  10.             'key' => 'field_instructions',
  11.             'name' => 'instructions',
  12.             'type' => 'message',
  13.             'message' => "test",
  14.         ],
  15.         [
  16.             'label' => 'FTP directory',
  17.             'key' => 'field_txt-dir',
  18.             'name' => 'txt-dir',
  19.             'type' => 'text',
  20.             'instructions' => 'Include a leading slash and trailing slash. Eg. /home/myproject/public_html/example/'
  21.         ],
  22.         [
  23.             'label' => 'Import data',
  24.             'key' => 'field_import-btn',
  25.             'name' => 'import-btn',
  26.             'type' => 'message',
  27.             'message' => get_wp_admin_btn_markup('Import', 'cti-import-btn'),
  28.             'instructions' => ''
  29.         ],
  30.     ],
  31.     'location' => [
  32.         [
  33.             [
  34.                 'param' => 'options_page',
  35.                 'operator' => '==',
  36.                 'value' => 'acf-options-txt-importer',
  37.             ],
  38.         ],
  39.     ]
  40. ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement