Issues (2873)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

ui/admin/setup-add.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
	$ignore = array(
3
		'attachment',
4
		'revision',
5
		'nav_menu_item',
6
		'custom_css',
7
		'customize_changeset',
8
		'post_format',
9
	);
10
11
	// Only add support for built-in taxonomy "link_category" if link manager is enabled.
12
	$link_manager_enabled = (int) get_option( 'link_manager_enabled', 0 );
13
14
	if ( 0 === $link_manager_enabled ) {
15
		$ignore[] = 'link_category';
16
	}
17
?>
18
19
<div class="wrap pods-admin">
20
	<script>
21
		var PODS_URL = '<?php echo esc_js( PODS_URL ); ?>';
22
	</script>
23
	<div id="icon-pods" class="icon32"><br /></div>
24
25
	<form action="" method="post" class="pods-submittable">
26
		<div class="pods-submittable-fields">
27
			<input type="hidden" name="action" value="pods_admin" />
28
			<input type="hidden" name="method" value="add_pod" />
29
			<input type="hidden" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'pods-add_pod' ) ); ?>" />
30
			<input type="hidden" name="create_extend" id="pods_create_extend" value="create" />
31
32
			<h2 class="italicized">
33
				<?php
34
					_e( 'Add New Pod', 'pods' );
35
36
					$all_pods = pods_api()->load_pods( array( 'key_names' => true ) );
37
38
					if ( !empty( $all_pods ) ) {
39
						$link = pods_query_arg( array( 'page' => 'pods', 'action' . $obj->num => 'manage' ) );
40
				?>
41
					<a href="<?php echo esc_url( $link ); ?>" class="add-new-h2">&laquo; <?php _e( 'Back to Manage', 'pods' ); ?></a>
42
				<?php
43
					}
44
				?>
45
			</h2>
46
47
			<img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" />
48
49
			<div id="pods-wizard-box" class="pods-wizard-steps-2 pods-wizard-hide-first">
50
				<div id="pods-wizard-heading">
51
					<ul>
52
						<li class="pods-wizard-menu-current" data-step="1">
53
							<i></i> <span>1</span> <?php _e( 'Create or Extend', 'pods' ); ?>
54
							<em></em>
55
						</li>
56
						<li data-step="2">
57
							<i></i> <span>2</span> <?php _e( 'Configure', 'pods' ); ?>
58
							<em></em>
59
						</li>
60
					</ul>
61
				</div>
62
				<div id="pods-wizard-main">
63
					<div id="pods-wizard-panel-1" class="pods-wizard-panel">
64
						<div class="pods-wizard-content">
65
							<p>
66
								<?php _e( 'Pods are content types that you can customize and define fields for based on your needs. You can choose to create a Custom Post Type, Custom Taxonomy, or Custom Settings Pages for site-specific data. You can also extend existing content types like WP Objects such as Post Types, Taxonomies, Users, or Comments.', 'pods' ); ?>
67
								<br /><br />
68
								<?php _e( 'Not sure what content type you should use? Check out our <a href="https://pods.io/docs/comparisons/compare-content-types/" target="_blank">Content Type Comparison</a> to help you decide.', 'pods' ); ?>
69
							</p>
70
71
						</div>
72
						<div id="pods-wizard-options">
73
							<div class="pods-wizard-option">
74
								<a href="#pods-wizard-create" data-opt="create">
75
									<h2><?php _e( 'Create New', 'pods' ); ?></h2>
76
77
									<p><?php _e( 'Create entirely new content types using <strong>Post Types</strong>, <strong>Taxonomies</strong>, or <strong>Custom Settings Pages</strong>.', 'pods' ); ?></p>
78
								</a>
79
80
							</div>
81
							<div class="pods-wizard-option">
82
								<a href="#pods-wizard-extend" data-opt="extend">
83
									<h2><?php _e( 'Extend Existing', 'pods' ); ?></h2>
84
85
									<p><?php _e( 'Extend any existing content type within WordPress, including <strong>Post Types</strong> (Posts, Pages, etc), <strong>Taxonomies</strong> (Categories, Tags, etc), <strong>Media</strong>, <strong>Users</strong>, or <strong>Comments</strong>.', 'pods' ); ?></p>
86
								</a>
87
88
							</div>
89
						</div>
90
					</div>
91
					<div id="pods-wizard-panel-2" class="pods-wizard-panel">
92
						<div class="pods-wizard-option-content" id="pods-wizard-create">
93
							<div class="pods-wizard-content">
94
								<p><?php _e( 'Creating a new Content Type allows you to control exactly what that content type does, how it acts like, the fields it has, and the way you manage it.', 'pods' ); ?></p>
95
							</div>
96
							<div class="stuffbox">
97
								<h3><label for="link_name"><?php _e( 'Create a New Content Type', 'pods' ); ?></label></h3>
98
99
								<div class="inside pods-manage-field pods-dependency">
100
									<div class="pods-field-option">
101
										<?php
102
											echo PodsForm::label( 'create_pod_type', __( 'Content Type', 'pods' ), array( __( '<h6>Content Types</h6> There are many content types to choose from, we have put together a comparison between them all to help you decide what fits your needs best.', 'pods' ), 'https://pods.io/docs/comparisons/compare-content-types/' ) );
103
104
											$data = array(
105
												'post_type' => __( 'Custom Post Type (like Posts or Pages)', 'pods' ),
106
												'taxonomy' => __( 'Custom Taxonomy (like Categories or Tags)', 'pods' ),
107
												'settings' => __( 'Custom Settings Page', 'pods' ),
108
												'pod' => '' // component will fill this in if it's enabled (this exists for placement)
109
											);
110
111
											$data = apply_filters( 'pods_admin_setup_add_create_pod_type', $data );
112
113
											if ( empty( $data[ 'pod' ] ) )
114
												unset( $data[ 'pod' ] );
115
116
											echo PodsForm::field( 'create_pod_type', pods_v( 'create_pod_type', 'post' ), 'pick', array( 'data' => $data, 'class' => 'pods-dependent-toggle' ) );
117
										?>
118
									</div>
119
120
									<?php
121
										if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_create_taxonomy_storage', false ) && ! function_exists( 'get_term_meta' ) ) {
122
									?>
123
										<div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-taxonomy">
124
											<?php
125
												echo PodsForm::label( 'create_storage_taxonomy', __( 'Enable Extra Fields?', 'pods' ), array(
126
													__( '<h6>Storage Types</h6> Table based storage will operate in a way where each field you create for your content type becomes a field in a table. Meta based storage relies upon the WordPress meta storage table for all field data.', 'pods' ),
127
													'https://pods.io/docs/comparisons/compare-storage-types/'
128
												) );
129
130
												$data = array(
131
													'none' => __( 'Do not enable extra fields to be added', 'pods' ),
132
													'table' => __( 'Enable extra fields for this Taxonomy (Table Based)', 'pods' )
133
												);
134
135
												$default = 'none';
136
137
												echo PodsForm::field( 'create_storage_taxonomy', pods_v( 'create_storage_taxonomy', 'post', $default, null, true ), 'pick', array( 'data' => $data ) );
138
											?>
139
										</div>
140
									<?php
141
										}
142
									?>
143
144
									<div class="pods-excludes-on pods-excludes-on-create-pod-type pods-excludes-on-create-pod-type-settings">
145
										<div class="pods-field-option">
146
											<?php
147
												echo PodsForm::label( 'create_label_singular', __( 'Singular Label', 'pods' ), __( '<h6>Singular Label</h6> This is the label for 1 item (Singular) that will appear throughout the WordPress admin area for managing the content.', 'pods' ) );
148
												echo PodsForm::field( 'create_label_singular', pods_v( 'create_label_singular', 'post' ), 'text', array( 'class' => 'pods-validate pods-validate-required', 'text_max_length' => 30 ) );
149
											?>
150
										</div>
151
										<div class="pods-field-option">
152
											<?php
153
												echo PodsForm::label( 'create_label_plural', __( 'Plural Label', 'pods' ), __( '<h6>Plural Label</h6> This is the label for more than 1 item (Plural) that will appear throughout the WordPress admin area for managing the content.', 'pods' ) );
154
												echo PodsForm::field( 'create_label_plural', pods_v( 'create_label_plural', 'post' ), 'text', array( 'text_max_length' => 30 ) );
155
											?>
156
										</div>
157
									</div>
158
									<div class="pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-settings">
159
										<div class="pods-field-option">
160
											<?php
161
												echo PodsForm::label( 'create_label_title', __( 'Page Title', 'pods' ), __( '<h6>Page Title</h6> This is the text that will appear at the top of your settings page.', 'pods' ) );
162
												echo PodsForm::field( 'create_label_title', pods_v( 'create_label_title', 'post' ), 'text', array( 'class' => 'pods-validate pods-validate-required', 'text_max_length' => 30 ) );
163
											?>
164
										</div>
165
										<div class="pods-field-option">
166
											<?php
167
												echo PodsForm::label( 'create_label_menu', __( 'Menu Label', 'pods' ), __( '<h6>Menu Label</h6> This is the label that will appear throughout the WordPress admin area for your settings.', 'pods' ) );
168
												echo PodsForm::field( 'create_label_menu', pods_v( 'create_label_menu', 'post' ), 'text', array( 'text_max_length' => 30 ) );
169
											?>
170
										</div>
171
										<div class="pods-field-option">
172
											<?php
173
												echo PodsForm::label( 'create_menu_location', __( 'Menu Location', 'pods' ), __( '<h6>Menu Location</h6> This is the location where the new settings page will be added in the WordPress Dashboard menu.', 'pods' ) );
174
175
												$data = array(
176
													'settings' => __( 'Add to Settings menu', 'pods' ),
177
													'appearances' => __( 'Add to Appearances menu', 'pods' ),
178
													'top' => __( 'Make a new menu item below Settings', 'pods' )
179
												);
180
181
												echo PodsForm::field( 'create_menu_location', pods_v( 'create_menu_location', 'post' ), 'pick', array( 'data' => $data ) );
182
											?>
183
										</div>
184
									</div>
185
186
									<p>
187
										<a href="#pods-advanced" class="pods-advanced-toggle"><?php _e( 'Advanced', 'pods' ); ?> +</a>
188
									</p>
189
190
									<div class="pods-advanced">
191
										<div class="pods-field-option pods-excludes-on pods-excludes-on-create-pod-type pods-excludes-on-create-pod-type-settings">
192
											<?php
193
												global $wpdb;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
194
												$max_length_name = 64;
195
												$max_length_name -= 10; // Allow for WP Multisite or prefix changes in the future
196
												$max_length_name -= strlen( $wpdb->prefix . 'pods_' );
197
198
												echo PodsForm::label( 'create_name', __( 'Pod Name', 'pods' ), __( '<h6>Pod Identifier</h6> This is different than the labels users will see in the WordPress admin areas, it is the name you will use to programatically reference this object throughout your theme, WordPress, and other PHP.', 'pods' ) );
199
												echo PodsForm::field( 'create_name', pods_v( 'create_name', 'post' ), 'db', array( 'attributes' => array( 'maxlength' => $max_length_name, 'size' => 25 ) ) );
200
											?>
201
										</div>
202
										<div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-settings">
203
											<?php
204
												global $wpdb;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
205
												$max_length_name = 64;
206
												$max_length_name -= 10; // Allow for WP Multisite or prefix changes in the future
207
												$max_length_name -= strlen( $wpdb->prefix . 'pods_' );
208
209
												echo PodsForm::label( 'create_setting_name', __( 'Pod Name', 'pods' ), __( '<h6>Pod Identifier</h6> This is different than the labels users will see in the WordPress admin areas, it is the name you will use to programatically reference this object throughout your theme, WordPress, and other PHP.', 'pods' ) );
210
												echo PodsForm::field( 'create_setting_name', pods_v( 'create_setting_name', 'post' ), 'db', array( 'attributes' => array( 'maxlength' => $max_length_name, 'size' => 25 ) ) );
211
											?>
212
										</div>
213
214
										<?php
215
											if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_create_storage', false ) ) {
216
						$extra_class = '';
217
218
						if ( function_exists( 'get_term_meta' ) ) {
219
							$extra_class = ' pods-depends-on-create-pod-type-taxonomy';
220
						}
221
										?>
222
											<div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-post-type<?php echo esc_attr( $extra_class ); ?>">
223
												<?php
224
													echo PodsForm::label( 'create_storage', __( 'Storage Type', 'pods' ), array(
225
														__( '<h6>Storage Types</h6> Table based storage will operate in a way where each field you create for your content type becomes a field in a table. Meta based storage relies upon the WordPress meta storage table for all field data.', 'pods' ),
226
														'https://pods.io/docs/comparisons/compare-storage-types/'
227
													) );
228
229
													$data = array(
230
														'meta' => __( 'Meta Based (WP Default)', 'pods' ),
231
														'table' => __( 'Table Based', 'pods' )
232
													);
233
234
													echo PodsForm::field( 'create_storage', pods_v( 'create_storage', 'post' ), 'pick', array( 'data' => $data ) );
235
												?>
236
											</div>
237
										<?php
238
											}
239
										?>
240
									</div>
241
								</div>
242
							</div>
243
						</div>
244
						<div class="pods-wizard-option-content" id="pods-wizard-extend">
245
							<div class="pods-wizard-content">
246
								<p><?php _e( 'Extending an existing Content Type allows you to add fields to it and take advantage of the Pods architecture for management and optionally for theming.', 'pods' ); ?></p>
247
							</div>
248
							<div class="stuffbox">
249
								<h3><label for="link_name"><?php _e( 'Extend an Existing Content Type', 'pods' ); ?></label></h3>
250
251
								<div class="inside pods-manage-field pods-dependency">
252
253
									<div class="pods-field-option">
254
										<?php
255
											echo PodsForm::label( 'extend_pod_type', __( 'Content Type', 'pods' ), array( __( '<h6>Content Types</h6> There are many content types to choose from, we have put together a comparison between them all to help you decide what fits your needs best.', 'pods' ), 'https://pods.io/docs/comparisons/compare-content-types/' ) );
256
257
											$data = array(
258
												'post_type' => __( 'Post Types (Posts, Pages, etc..)', 'pods' ),
259
												'taxonomy' => '', // component will fill this in if it's enabled (this exists for placement)
260
												'media' => __( 'Media', 'pods' ),
261
												'user' => __( 'Users', 'pods' ),
262
												'comment' => __( 'Comments', 'pods' )
263
											);
264
265
											if ( function_exists( 'get_term_meta' ) ) {
266
												$data[ 'taxonomy' ] = __( 'Taxonomies (Categories, Tags, etc..)', 'pods' );
267
											}
268
269
											if ( isset( $all_pods[ 'media' ] ) && 'media' == $all_pods[ 'media' ][ 'type' ] )
270
												unset( $data[ 'media' ] );
271
272
											if ( isset( $all_pods[ 'user' ] ) && 'user' == $all_pods[ 'user' ][ 'type' ] )
273
												unset( $data[ 'user' ] );
274
275
											if ( isset( $all_pods[ 'comment' ] ) && 'comment' == $all_pods[ 'comment' ][ 'type' ] )
276
												unset( $data[ 'comment' ] );
277
278
											$data = apply_filters( 'pods_admin_setup_add_extend_pod_type', $data );
279
280
											if ( empty( $data[ 'taxonomy' ] ) )
281
												unset( $data[ 'taxonomy' ] );
282
283
											echo PodsForm::field( 'extend_pod_type', pods_v( 'extend_pod_type', 'post' ), 'pick', array( 'data' => $data, 'class' => 'pods-dependent-toggle' ) );
284
										?>
285
									</div>
286
									<div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-post-type">
287
										<?php
288
											$post_types = get_post_types();
289
290
											foreach ( $post_types as $post_type => $label ) {
291
												if ( in_array( $post_type, $ignore, true ) || empty( $post_type ) || 0 === strpos( $post_type, '_pods_' ) ) {
292
													// Post type is ignored
293
													unset( $post_types[ $post_type ] );
294
295
													continue;
296
												}
297
												elseif ( isset( $all_pods[ $post_type ] ) && 'post_type' == $all_pods[ $post_type ][ 'type' ] ) {
298
													unset( $post_types[ $post_type ] );
299
													continue;
300
												}
301
302
												$post_type = get_post_type_object( $post_type );
303
												$post_types[ $post_type->name ] = $post_type->label;
304
											}
305
306
											echo PodsForm::label( 'extend_post_type', __( 'Post Type', 'pods' ), array( __( '<h6>Post Types</h6> WordPress can hold and display many different types of content. Internally, these are all stored in the same place, in the wp_posts table. These are differentiated by a column called post_type.', 'pods' ), 'http://codex.wordpress.org/Post_Types' ) );
307
											echo PodsForm::field( 'extend_post_type', pods_v( 'extend_post_type', 'post', 'table', null, true ), 'pick', array( 'data' => $post_types ) );
308
										?>
309
									</div>
310
									<div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-taxonomy">
311
										<?php
312
											$taxonomies = get_taxonomies();
313
314
											foreach ( $taxonomies as $taxonomy => $label ) {
315
												if ( in_array( $taxonomy, $ignore, true ) ) {
316
													// Taxonomy is ignored
317
													unset( $taxonomies[ $taxonomy ] );
318
319
													continue;
320
												}
321
												elseif ( isset( $all_pods[ $taxonomy ] ) && 'taxonomy' == $all_pods[ $taxonomy ][ 'type' ] ) {
322
													unset( $taxonomies[ $taxonomy ] );
323
													continue;
324
												}
325
326
												$taxonomy = get_taxonomy( $taxonomy );
327
												$taxonomies[ $taxonomy->name ] = $taxonomy->label;
328
											}
329
330
											echo PodsForm::label( 'extend_taxonomy', __( 'Taxonomy', 'pods' ), array( __( '<h6>Taxonomies</h6> A taxonomy is a way to group Post Types.', 'pods' ), 'http://codex.wordpress.org/Taxonomies' ) );
331
											echo PodsForm::field( 'extend_taxonomy', pods_v( 'extend_taxonomy', 'post' ), 'pick', array( 'data' => $taxonomies ) );
332
										?>
333
									</div>
334
335
									<?php
336
										if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_extend_taxonomy_storage', false ) && ! function_exists( 'get_term_meta' ) ) {
337
									?>
338
										<div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-taxonomy">
339
											<?php
340
												echo PodsForm::label( 'extend_storage_taxonomy', __( 'Enable Extra Fields?', 'pods' ), array(
341
													__( '<h6>Storage Types</h6> Table based storage will operate in a way where each field you create for your content type becomes a field in a table. Meta based storage relies upon the WordPress meta storage table for all field data.', 'pods' ),
342
													'https://pods.io/docs/comparisons/compare-storage-types/'
343
												) );
344
345
												$data = array(
346
													'none' => __( 'Do not enable extra fields to be added', 'pods' ),
347
													'table' => __( 'Enable extra fields for this Taxonomy (Table Based)', 'pods' ),
348
												);
349
350
												$default = 'none';
351
352
												echo PodsForm::field( 'extend_storage_taxonomy', pods_v( 'extend_storage_taxonomy', 'post', $default, null, true ), 'pick', array( 'data' => $data ) );
353
											?>
354
										</div>
355
									<?php
356
										}
357
									?>
358
359
									<?php
360
										if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_extend_storage', false ) ) {
361
						$extra_class = '';
362
363
						if ( function_exists( 'get_term_meta' ) ) {
364
							$extra_class = ' pods-depends-on-extend-pod-type-taxonomy';
365
						}
366
									?>
367
										<div class="pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-post-type pods-depends-on-extend-pod-type-media pods-depends-on-extend-pod-type-user pods-depends-on-extend-pod-type-comment<?php echo esc_attr( $extra_class ); ?>">
368
											<p><a href="#pods-advanced" class="pods-advanced-toggle"><?php _e( 'Advanced', 'pods' ); ?> +</a></p>
369
370
											<div class="pods-advanced">
371
												<div class="pods-field-option">
372
													<?php
373
														echo PodsForm::label( 'extend_storage', __( 'Storage Type', 'pods' ), array(
374
															__( '<h6>Storage Types</h6> Table based storage will operate in a way where each field you create for your content type becomes a field in a table. Meta based storage relies upon the WordPress meta storage table for all field data.', 'pods' ),
375
															'https://pods.io/docs/comparisons/compare-storage-types/'
376
														) );
377
378
														$data = array(
379
															'meta' => __( 'Meta Based (WP Default)', 'pods' ),
380
															'table' => __( 'Table Based', 'pods' )
381
														);
382
383
														echo PodsForm::field( 'extend_storage', pods_v( 'extend_storage', 'post' ), 'pick', array( 'data' => $data ) );
384
													?>
385
												</div>
386
											</div>
387
										</div>
388
									<?php
389
										}
390
									?>
391
								</div>
392
							</div>
393
						</div>
394
					</div>
395
396
					<div id="pods-wizard-actions">
397
						<div id="pods-wizard-toolbar">
398
							<a href="#start" id="pods-wizard-start" class="button button-secondary"><?php _e( 'Start Over', 'pods' ); ?></a> <a href="#next" id="pods-wizard-next" class="button button-primary" data-next="<?php esc_attr_e( 'Next Step', 'pods' ); ?>" data-finished="<?php esc_attr_e( 'Finished', 'pods' ); ?>" data-processing="<?php esc_attr_e( 'Processing', 'pods' ); ?>.."><?php _e( 'Next Step', 'pods' ); ?></a>
399
						</div>
400
						<div id="pods-wizard-finished">
401
402
						</div>
403
					</div>
404
				</div>
405
			</div>
406
		</div>
407
	</form>
408
</div>
409
<script type="text/javascript">
410
	var pods_admin_submit_callback = function ( id ) {
411
		id = parseInt( id );
412
413
		if ( !isNaN( id ) ) {
414
			document.location = 'admin.php?page=pods&action=edit&id=' + id + '&do=create';
415
		}
416
		else {
417
			document.location = 'admin.php?page=pods&do=create';
418
		}
419
	};
420
421
	var pods_admin_option_select_callback = function ( $opt ) {
422
		jQuery( '#pods_create_extend' ).val( $opt.data( 'opt' ) );
423
	};
424
425
	jQuery( function ( $ ) {
426
		$( document ).Pods( 'validate' );
427
		$( document ).Pods( 'submit' );
428
		$( document ).Pods( 'wizard' );
429
		$( document ).Pods( 'dependency' );
430
		$( document ).Pods( 'advanced' );
431
		$( document ).Pods( 'confirm' );
432
		$( document ).Pods( 'sluggable' );
433
434
		$( '.pods-admin' ).on( 'render', '.pods-form-ui-field', function ( e ) {
435
			$( this ).find( '.pods-dependent-toggle[data-name-clean]' ).trigger( 'change' );
436
		} );
437
	} );
438
</script>
439