PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 2.7.31.4
Pods – Custom Content Types and Fields v2.7.31.4
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / ui / admin / setup-add.php
pods / ui / admin Last commit date
upgrade 3 days ago widgets 3 days ago components-admin.php 3 days ago field-option.php 3 days ago form-settings.php 3 days ago form.php 3 days ago help.php 3 days ago postbox-header.php 3 days ago settings-reset.php 3 days ago settings-settings.php 3 days ago settings-tools.php 3 days ago settings.php 3 days ago setup-add.php 3 days ago setup-edit-field-fluid.php 3 days ago setup-edit-field.php 3 days ago setup-edit.php 3 days ago shortcode.php 3 days ago view.php 3 days ago
setup-add.php
449 lines
1 <?php
2 // Don't load directly.
3 if ( ! defined( 'ABSPATH' ) || ! pods_is_admin( 'pods' ) ) {
4 die( '-1' );
5 }
6
7 $ignore = array(
8 'attachment',
9 'revision',
10 'nav_menu_item',
11 'custom_css',
12 'customize_changeset',
13 'post_format',
14 );
15
16 // Only add support for built-in taxonomy "link_category" if link manager is enabled.
17 $link_manager_enabled = (int) get_option( 'link_manager_enabled', 0 );
18
19 if ( 0 === $link_manager_enabled ) {
20 $ignore[] = 'link_category';
21 }
22 ?>
23
24 <div class="wrap pods-admin">
25 <script>
26 var PODS_URL = '<?php echo esc_js( PODS_URL ); ?>';
27 </script>
28 <div id="icon-pods" class="icon32"><br /></div>
29
30 <form action="" method="post" class="pods-submittable">
31 <div class="pods-submittable-fields">
32 <input type="hidden" name="action" value="pods_admin" />
33 <input type="hidden" name="method" value="add_pod" />
34 <input type="hidden" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'pods-add_pod' ) ); ?>" />
35 <input type="hidden" name="create_extend" id="pods_create_extend" value="create" />
36
37 <h2 class="italicized">
38 <?php
39 _e( 'Add New Pod', 'pods' );
40
41 $all_pods = pods_api()->load_pods( array( 'key_names' => true ) );
42
43 if ( !empty( $all_pods ) ) {
44 $link = pods_query_arg( array( 'page' => 'pods', 'action' . $obj->num => 'manage' ) );
45 ?>
46 <a href="<?php echo esc_url( $link ); ?>" class="add-new-h2">&laquo; <?php _e( 'Back to Manage', 'pods' ); ?></a>
47 <?php
48 }
49 ?>
50 </h2>
51
52 <img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" />
53
54 <div id="pods-wizard-box" class="pods-wizard-steps-2 pods-wizard-hide-first">
55 <div id="pods-wizard-heading">
56 <ul>
57 <li class="pods-wizard-menu-current" data-step="1">
58 <i></i> <span>1</span> <?php _e( 'Create or Extend', 'pods' ); ?>
59 <em></em>
60 </li>
61 <li data-step="2">
62 <i></i> <span>2</span> <?php _e( 'Configure', 'pods' ); ?>
63 <em></em>
64 </li>
65 </ul>
66 </div>
67 <div id="pods-wizard-main">
68 <div id="pods-wizard-panel-1" class="pods-wizard-panel">
69 <div class="pods-wizard-content">
70 <p>
71 <?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' ); ?>
72 <br /><br />
73 <?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" rel="noopener noreferrer">Content Type Comparison</a> to help you decide.', 'pods' ); ?>
74 </p>
75
76 </div>
77 <div id="pods-wizard-options">
78 <div class="pods-wizard-option">
79 <a href="#pods-wizard-create" data-opt="create">
80 <h2><?php _e( 'Create New', 'pods' ); ?></h2>
81
82 <p><?php _e( 'Create entirely new content types using <strong>Post Types</strong>, <strong>Taxonomies</strong>, or <strong>Custom Settings Pages</strong>.', 'pods' ); ?></p>
83 </a>
84
85 </div>
86 <div class="pods-wizard-option">
87 <a href="#pods-wizard-extend" data-opt="extend">
88 <h2><?php _e( 'Extend Existing', 'pods' ); ?></h2>
89
90 <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>
91 </a>
92
93 </div>
94 </div>
95 </div>
96 <div id="pods-wizard-panel-2" class="pods-wizard-panel">
97 <div class="pods-wizard-option-content" id="pods-wizard-create">
98 <div class="pods-wizard-content">
99 <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>
100 </div>
101 <div class="stuffbox">
102 <h3><label for="link_name"><?php _e( 'Create a New Content Type', 'pods' ); ?></label></h3>
103
104 <div class="inside pods-manage-field pods-dependency">
105 <div class="pods-field-option">
106 <?php
107 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/' ) );
108
109 $data = array(
110 'post_type' => __( 'Custom Post Type (like Posts or Pages)', 'pods' ),
111 'taxonomy' => __( 'Custom Taxonomy (like Categories or Tags)', 'pods' ),
112 'settings' => __( 'Custom Settings Page', 'pods' ),
113 'pod' => '' // component will fill this in if it's enabled (this exists for placement)
114 );
115
116 $data = apply_filters( 'pods_admin_setup_add_create_pod_type', $data );
117
118 if ( empty( $data[ 'pod' ] ) )
119 unset( $data[ 'pod' ] );
120
121 echo PodsForm::field( 'create_pod_type', pods_v( 'create_pod_type', 'post' ), 'pick', array( 'data' => $data, 'class' => 'pods-dependent-toggle' ) );
122 ?>
123 </div>
124
125 <?php
126 if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_create_taxonomy_storage', false ) && ! function_exists( 'get_term_meta' ) ) {
127 ?>
128 <div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-taxonomy">
129 <?php
130 echo PodsForm::label( 'create_storage_taxonomy', __( 'Enable Extra Fields?', 'pods' ), array(
131 __( '<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' ),
132 'https://pods.io/docs/comparisons/compare-storage-types/'
133 ) );
134
135 $data = array(
136 'none' => __( 'Do not enable extra fields to be added', 'pods' ),
137 'table' => __( 'Enable extra fields for this Taxonomy (Table Based)', 'pods' )
138 );
139
140 $default = 'none';
141
142 echo PodsForm::field( 'create_storage_taxonomy', pods_v( 'create_storage_taxonomy', 'post', $default, null, true ), 'pick', array( 'data' => $data ) );
143 ?>
144 </div>
145 <?php
146 }
147 ?>
148
149 <div class="pods-excludes-on pods-excludes-on-create-pod-type pods-excludes-on-create-pod-type-settings">
150 <div class="pods-field-option">
151 <?php
152 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' ) );
153 echo PodsForm::field( 'create_label_singular', pods_v( 'create_label_singular', 'post' ), 'text', array( 'class' => 'pods-validate pods-validate-required', 'text_max_length' => 30 ) );
154 ?>
155 </div>
156 <div class="pods-field-option">
157 <?php
158 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' ) );
159 echo PodsForm::field( 'create_label_plural', pods_v( 'create_label_plural', 'post' ), 'text', array( 'text_max_length' => 30 ) );
160 ?>
161 </div>
162 </div>
163 <div class="pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-settings">
164 <div class="pods-field-option">
165 <?php
166 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' ) );
167 echo PodsForm::field( 'create_label_title', pods_v( 'create_label_title', 'post' ), 'text', array( 'class' => 'pods-validate pods-validate-required', 'text_max_length' => 30 ) );
168 ?>
169 </div>
170 <div class="pods-field-option">
171 <?php
172 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' ) );
173 echo PodsForm::field( 'create_label_menu', pods_v( 'create_label_menu', 'post' ), 'text', array( 'text_max_length' => 30 ) );
174 ?>
175 </div>
176 <div class="pods-field-option">
177 <?php
178 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' ) );
179
180 $data = array(
181 'settings' => __( 'Add to Settings menu', 'pods' ),
182 'appearances' => __( 'Add to Appearances menu', 'pods' ),
183 'top' => __( 'Make a new menu item below Settings', 'pods' )
184 );
185
186 echo PodsForm::field( 'create_menu_location', pods_v( 'create_menu_location', 'post' ), 'pick', array( 'data' => $data ) );
187 ?>
188 </div>
189 </div>
190
191 <p>
192 <a href="#pods-advanced" class="pods-advanced-toggle"><?php _e( 'Advanced', 'pods' ); ?> +</a>
193 </p>
194
195 <div class="pods-advanced">
196 <div class="pods-field-option pods-excludes-on pods-excludes-on-create-pod-type pods-excludes-on-create-pod-type-settings">
197 <?php
198 global $wpdb;
199 $max_length_name = 64;
200 $max_length_name -= 10; // Allow for WP Multisite or prefix changes in the future
201 $max_length_name -= strlen( $wpdb->prefix . 'pods_' );
202
203 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' ) );
204 echo PodsForm::field( 'create_name', pods_v( 'create_name', 'post' ), 'db', array( 'attributes' => array( 'maxlength' => $max_length_name, 'size' => 25 ) ) );
205 ?>
206 </div>
207 <div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-settings">
208 <?php
209 global $wpdb;
210 $max_length_name = 64;
211 $max_length_name -= 10; // Allow for WP Multisite or prefix changes in the future
212 $max_length_name -= strlen( $wpdb->prefix . 'pods_' );
213
214 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' ) );
215 echo PodsForm::field( 'create_setting_name', pods_v( 'create_setting_name', 'post' ), 'db', array( 'attributes' => array( 'maxlength' => $max_length_name, 'size' => 25 ) ) );
216 ?>
217 </div>
218
219 <?php
220 if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_create_storage', false ) ) {
221 $extra_class = '';
222
223 if ( function_exists( 'get_term_meta' ) ) {
224 $extra_class = ' pods-depends-on-create-pod-type-taxonomy';
225 }
226 ?>
227 <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 ); ?>">
228 <?php
229 echo PodsForm::label( 'create_storage', __( 'Storage Type', 'pods' ), array(
230 __( '<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' ),
231 'https://pods.io/docs/comparisons/compare-storage-types/'
232 ) );
233
234 $data = array(
235 'meta' => __( 'Meta Based (WP Default)', 'pods' ),
236 'table' => __( 'Table Based', 'pods' )
237 );
238
239 echo PodsForm::field( 'create_storage', pods_v( 'create_storage', 'post' ), 'pick', array( 'data' => $data ) );
240 ?>
241 </div>
242 <?php
243 }
244 ?>
245 </div>
246 </div>
247 </div>
248 </div>
249 <div class="pods-wizard-option-content" id="pods-wizard-extend">
250 <div class="pods-wizard-content">
251 <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>
252 </div>
253 <div class="stuffbox">
254 <h3><label for="link_name"><?php _e( 'Extend an Existing Content Type', 'pods' ); ?></label></h3>
255
256 <div class="inside pods-manage-field pods-dependency">
257
258 <div class="pods-field-option">
259 <?php
260 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/' ) );
261
262 $data = array(
263 'post_type' => __( 'Post Types (Posts, Pages, etc..)', 'pods' ),
264 'taxonomy' => '', // component will fill this in if it's enabled (this exists for placement)
265 'media' => __( 'Media', 'pods' ),
266 'user' => __( 'Users', 'pods' ),
267 'comment' => __( 'Comments', 'pods' )
268 );
269
270 if ( function_exists( 'get_term_meta' ) ) {
271 $data[ 'taxonomy' ] = __( 'Taxonomies (Categories, Tags, etc..)', 'pods' );
272 }
273
274 if ( isset( $all_pods[ 'media' ] ) && 'media' == $all_pods[ 'media' ][ 'type' ] )
275 unset( $data[ 'media' ] );
276
277 if ( isset( $all_pods[ 'user' ] ) && 'user' == $all_pods[ 'user' ][ 'type' ] )
278 unset( $data[ 'user' ] );
279
280 if ( isset( $all_pods[ 'comment' ] ) && 'comment' == $all_pods[ 'comment' ][ 'type' ] )
281 unset( $data[ 'comment' ] );
282
283 $data = apply_filters( 'pods_admin_setup_add_extend_pod_type', $data );
284
285 if ( empty( $data[ 'taxonomy' ] ) )
286 unset( $data[ 'taxonomy' ] );
287
288 echo PodsForm::field( 'extend_pod_type', pods_v( 'extend_pod_type', 'post' ), 'pick', array( 'data' => $data, 'class' => 'pods-dependent-toggle' ) );
289 ?>
290 </div>
291 <div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-post-type">
292 <?php
293 $post_types = get_post_types();
294
295 foreach ( $post_types as $post_type => $label ) {
296 if ( in_array( $post_type, $ignore, true ) || empty( $post_type ) || 0 === strpos( $post_type, '_pods_' ) ) {
297 // Post type is ignored
298 unset( $post_types[ $post_type ] );
299
300 continue;
301 }
302 elseif ( isset( $all_pods[ $post_type ] ) && 'post_type' == $all_pods[ $post_type ][ 'type' ] ) {
303 unset( $post_types[ $post_type ] );
304 continue;
305 }
306
307 $post_type = get_post_type_object( $post_type );
308 $post_types[ $post_type->name ] = $post_type->label;
309 }
310
311 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' ) );
312 echo PodsForm::field( 'extend_post_type', pods_v( 'extend_post_type', 'post', 'table', null, true ), 'pick', array( 'data' => $post_types ) );
313 ?>
314 </div>
315 <div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-taxonomy">
316 <?php
317 $taxonomies = get_taxonomies();
318
319 foreach ( $taxonomies as $taxonomy => $label ) {
320 if ( in_array( $taxonomy, $ignore, true ) ) {
321 // Taxonomy is ignored
322 unset( $taxonomies[ $taxonomy ] );
323
324 continue;
325 }
326 elseif ( isset( $all_pods[ $taxonomy ] ) && 'taxonomy' == $all_pods[ $taxonomy ][ 'type' ] ) {
327 unset( $taxonomies[ $taxonomy ] );
328 continue;
329 }
330
331 $taxonomy = get_taxonomy( $taxonomy );
332 $taxonomies[ $taxonomy->name ] = $taxonomy->label;
333 }
334
335 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' ) );
336 echo PodsForm::field( 'extend_taxonomy', pods_v( 'extend_taxonomy', 'post' ), 'pick', array( 'data' => $taxonomies ) );
337 ?>
338 </div>
339
340 <?php
341 if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_extend_taxonomy_storage', false ) && ! function_exists( 'get_term_meta' ) ) {
342 ?>
343 <div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-taxonomy">
344 <?php
345 echo PodsForm::label( 'extend_storage_taxonomy', __( 'Enable Extra Fields?', 'pods' ), array(
346 __( '<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' ),
347 'https://pods.io/docs/comparisons/compare-storage-types/'
348 ) );
349
350 $data = array(
351 'none' => __( 'Do not enable extra fields to be added', 'pods' ),
352 'table' => __( 'Enable extra fields for this Taxonomy (Table Based)', 'pods' ),
353 );
354
355 $default = 'none';
356
357 echo PodsForm::field( 'extend_storage_taxonomy', pods_v( 'extend_storage_taxonomy', 'post', $default, null, true ), 'pick', array( 'data' => $data ) );
358 ?>
359 </div>
360 <?php
361 }
362 ?>
363
364 <?php
365 if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_extend_storage', false ) ) {
366 $extra_class = '';
367
368 if ( function_exists( 'get_term_meta' ) ) {
369 $extra_class = ' pods-depends-on-extend-pod-type-taxonomy';
370 }
371 ?>
372 <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 ); ?>">
373 <p><a href="#pods-advanced" class="pods-advanced-toggle"><?php _e( 'Advanced', 'pods' ); ?> +</a></p>
374
375 <div class="pods-advanced">
376 <div class="pods-field-option">
377 <?php
378 echo PodsForm::label( 'extend_storage', __( 'Storage Type', 'pods' ), array(
379 __( '<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' ),
380 'https://pods.io/docs/comparisons/compare-storage-types/'
381 ) );
382
383 $data = array(
384 'meta' => __( 'Meta Based (WP Default)', 'pods' ),
385 'table' => __( 'Table Based', 'pods' )
386 );
387
388 echo PodsForm::field( 'extend_storage', pods_v( 'extend_storage', 'post' ), 'pick', array( 'data' => $data ) );
389 ?>
390 </div>
391 </div>
392 </div>
393 <?php
394 }
395 ?>
396 </div>
397 </div>
398 </div>
399 </div>
400
401 <div id="pods-wizard-actions">
402 <div id="pods-wizard-toolbar">
403 <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>
404 </div>
405 <div id="pods-wizard-finished">
406
407 </div>
408 </div>
409 </div>
410 </div>
411 </div>
412 </form>
413 </div>
414 <script type="text/javascript">
415 var pods_admin_submit_callback = function ( id ) {
416 id = parseInt( id );
417
418 if ( !isNaN( id ) ) {
419 document.location = 'admin.php?page=pods&action=edit&id=' + id + '&do=create';
420 } else {
421 document.location = 'admin.php?page=pods&do=create';
422 }
423 };
424
425 var pods_admin_option_select_callback = function ( $opt ) {
426 jQuery( '#pods_create_extend' ).val( $opt.data( 'opt' ) );
427 };
428
429 jQuery( function ( $ ) {
430 var $document = $( document );
431
432 $document.Pods( 'validate' );
433 $document.Pods( 'submit' );
434 $document.Pods( 'wizard' );
435 $document.Pods( 'dependency' );
436 $document.Pods( 'advanced' );
437 $document.Pods( 'confirm' );
438 $document.Pods( 'sluggable' );
439
440 var $admin = $( '.pods-admin' ),
441 $toggles = $admin.find( '.pods-dependent-toggle[data-name-clean]' );
442
443 $toggles.trigger( 'change' );
444 $admin.on( 'render', '.pods-form-ui-field', function ( e ) {
445 $toggles.trigger( 'change' );
446 } );
447 } );
448 </script>
449