advanced-settings.php
1 year ago
basic-settings.php
1 year ago
create-options-page-modal.php
1 year ago
index.php
1 year ago
list-empty.php
1 year ago
create-options-page-modal.php
67 lines
| 1 | <form id="acf-create-options-page-form"> |
| 2 | <?php |
| 3 | |
| 4 | $acf_options_page_prefilled_title = ''; |
| 5 | |
| 6 | if ( ! empty( $field_group_title ) ) { |
| 7 | $acf_options_page_prefilled_title = (string) apply_filters( 'acf/options_page_modal/prefill_title', '%s' ); |
| 8 | $acf_options_page_prefilled_title = sprintf( |
| 9 | $acf_options_page_prefilled_title, |
| 10 | $field_group_title |
| 11 | ); |
| 12 | } |
| 13 | |
| 14 | acf_render_field_wrap( |
| 15 | array( |
| 16 | 'label' => __( 'Page Title', 'acf' ), |
| 17 | /* translators: example options page name */ |
| 18 | 'placeholder' => __( 'Site Settings', 'acf' ), |
| 19 | 'value' => $acf_options_page_prefilled_title, |
| 20 | 'type' => 'text', |
| 21 | 'name' => 'page_title', |
| 22 | 'key' => 'page_title', |
| 23 | 'class' => 'acf_options_page_title acf_slugify_to_key', |
| 24 | 'prefix' => 'acf_ui_options_page', |
| 25 | 'required' => true, |
| 26 | ), |
| 27 | 'div', |
| 28 | 'field' |
| 29 | ); |
| 30 | |
| 31 | acf_render_field_wrap( |
| 32 | array( |
| 33 | 'label' => __( 'Menu Slug', 'acf' ), |
| 34 | 'type' => 'text', |
| 35 | 'name' => 'menu_slug', |
| 36 | 'key' => 'menu_slug', |
| 37 | 'class' => 'acf-options-page-menu_slug acf_slugified_key', |
| 38 | 'prefix' => 'acf_ui_options_page', |
| 39 | 'required' => true, |
| 40 | ), |
| 41 | 'div', |
| 42 | 'field' |
| 43 | ); |
| 44 | |
| 45 | acf_render_field_wrap( |
| 46 | array( |
| 47 | 'label' => __( 'Parent Page', 'acf' ), |
| 48 | 'type' => 'select', |
| 49 | 'name' => 'parent_slug', |
| 50 | 'key' => 'parent_slug', |
| 51 | 'class' => 'acf-options-page-parent_slug', |
| 52 | 'prefix' => 'acf_ui_options_page', |
| 53 | 'choices' => $acf_parent_page_choices, |
| 54 | 'required' => true, |
| 55 | ), |
| 56 | 'div', |
| 57 | 'field' |
| 58 | ); |
| 59 | ?> |
| 60 | |
| 61 | <div class="acf-actions"> |
| 62 | <button type="button" class="acf-btn acf-btn-secondary acf-close-popup"><?php esc_html_e( 'Cancel', 'acf' ); ?></button> |
| 63 | <button type="submit" class="acf-btn acf-btn-primary"><?php esc_html_e( 'Done', 'acf' ); ?></button> |
| 64 | </div> |
| 65 | |
| 66 | </form> |
| 67 |