PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.4.0-beta2
Secure Custom Fields v6.4.0-beta2
6.9.5 6.9.4 6.9.3 6.9.2 6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / pro / admin / views / acf-ui-options-page / basic-settings.php
secure-custom-fields / pro / admin / views / acf-ui-options-page Last commit date
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
basic-settings.php
89 lines
1 <?php
2 global $acf_ui_options_page, $acf_parent_page_options;
3
4 $acf_duplicate_options_page = acf_get_ui_options_page_from_request_args( 'acfduplicate' );
5
6 if ( acf_is_ui_options_page( $acf_duplicate_options_page ) ) {
7 // Reset vars that likely have to be changed.
8 $acf_duplicate_options_page['key'] = uniqid( 'ui_options_page_' );
9 $acf_duplicate_options_page['title'] = '';
10 $acf_duplicate_options_page['page_title'] = '';
11 $acf_duplicate_options_page['menu_title'] = '';
12 $acf_duplicate_options_page['menu_slug'] = '';
13
14 // Rest of the vars can be reused.
15 $acf_ui_options_page = $acf_duplicate_options_page;
16 }
17
18 acf_render_field_wrap(
19 array(
20 'label' => __( 'Page Title', 'acf' ),
21 /* translators: example options page name */
22 'placeholder' => __( 'Site Settings', 'acf' ),
23 'type' => 'text',
24 'name' => 'page_title',
25 'key' => 'page_title',
26 'class' => 'acf_options_page_title acf_slugify_to_key',
27 'prefix' => 'acf_ui_options_page',
28 'value' => $acf_ui_options_page['page_title'],
29 'required' => true,
30 ),
31 'div',
32 'field'
33 );
34
35 acf_render_field_wrap(
36 array(
37 'label' => __( 'Menu Slug', 'acf' ),
38 'type' => 'text',
39 'name' => 'menu_slug',
40 'key' => 'menu_slug',
41 'class' => 'acf-options-page-menu_slug acf_slugified_key',
42 'prefix' => 'acf_ui_options_page',
43 'value' => $acf_ui_options_page['menu_slug'],
44 'required' => true,
45 ),
46 'div',
47 'field'
48 );
49
50 acf_render_field_wrap(
51 array(
52 'label' => __( 'Parent Page', 'acf' ),
53 'type' => 'select',
54 'name' => 'parent_slug',
55 'key' => 'parent_slug',
56 'class' => 'acf-options-page-parent_slug',
57 'prefix' => 'acf_ui_options_page',
58 'value' => $acf_ui_options_page['parent_slug'],
59 'choices' => $acf_parent_page_options,
60 'required' => true,
61 ),
62 'div',
63 'field'
64 );
65
66 do_action( 'acf/post_type/basic_settings', $acf_ui_options_page );
67
68 acf_render_field_wrap( array( 'type' => 'seperator' ) );
69
70 acf_render_field_wrap(
71 array(
72 'label' => __( 'Advanced Configuration', 'acf' ),
73 'instructions' => __( 'I know what I\'m doing, show me all the options.', 'acf' ),
74 'type' => 'true_false',
75 'name' => 'advanced_configuration',
76 'key' => 'advanced_configuration',
77 'prefix' => 'acf_ui_options_page',
78 'value' => $acf_ui_options_page['advanced_configuration'],
79 'ui' => 1,
80 'class' => 'acf-advanced-settings-toggle',
81 )
82 );
83
84 ?>
85 <div class="acf-hidden">
86 <input type="hidden" name="acf_ui_options_page[key]" value="<?php echo esc_attr( $acf_ui_options_page['key'] ); ?>" />
87 </div>
88 <?php
89