/ui/admin/setup-add.php

  1. <div class="wrap pods-admin"> 
  2. <script> 
  3. var PODS_URL = '<?php echo esc_js( PODS_URL ); ?>'; 
  4. </script> 
  5. <div id="icon-pods" class="icon32"><br /></div> 
  6.  
  7. <form action="" method="post" class="pods-submittable"> 
  8. <div class="pods-submittable-fields"> 
  9. <input type="hidden" name="action" value="pods_admin" /> 
  10. <input type="hidden" name="method" value="add_pod" /> 
  11. <input type="hidden" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'pods-add_pod' ) ); ?>" /> 
  12. <input type="hidden" name="create_extend" id="pods_create_extend" value="create" /> 
  13.  
  14. <h2 class="italicized"> 
  15. <?php 
  16. _e( 'Add New Pod', 'pods' ); 
  17.  
  18. $all_pods = pods_api()->load_pods( array( 'key_names' => true ) ); 
  19.  
  20. if ( !empty( $all_pods ) ) { 
  21. $link = pods_query_arg( array( 'page' => 'pods', 'action' . $obj->num => 'manage' ) ); 
  22. ?> 
  23. <a href="<?php echo esc_url( $link ); ?>" class="add-new-h2">« <?php _e( 'Back to Manage', 'pods' ); ?></a> 
  24. <?php 
  25. ?> 
  26. </h2> 
  27.  
  28. <img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" /> 
  29.  
  30. <div id="pods-wizard-box" class="pods-wizard-steps-2 pods-wizard-hide-first"> 
  31. <div id="pods-wizard-heading"> 
  32. <ul> 
  33. <li class="pods-wizard-menu-current" data-step="1"> 
  34. <i></i> <span>1</span> <?php _e( 'Create or Extend', 'pods' ); ?> 
  35. <em></em> 
  36. </li> 
  37. <li data-step="2"> 
  38. <i></i> <span>2</span> <?php _e( 'Configure', 'pods' ); ?> 
  39. <em></em> 
  40. </li> 
  41. </ul> 
  42. </div> 
  43. <div id="pods-wizard-main"> 
  44. <div id="pods-wizard-panel-1" class="pods-wizard-panel"> 
  45. <div class="pods-wizard-content"> 
  46. <p> 
  47. <?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' ); ?> 
  48. <br /><br /> 
  49. <?php _e( 'Not sure what content type you should use? Check out our <a href="http://pods.io/docs/comparisons/compare-content-types/" target="_blank">Content Type Comparison</a> to help you decide.', 'pods' ); ?> 
  50. </p> 
  51.  
  52. </div> 
  53. <div id="pods-wizard-options"> 
  54. <div class="pods-wizard-option"> 
  55. <a href="#pods-wizard-create" data-opt="create"> 
  56. <h2><?php _e( 'Create New', 'pods' ); ?></h2> 
  57.  
  58. <p><?php _e( 'Create entirely new content types using <strong>Post Types</strong>, <strong>Taxonomies</strong>, or <strong>Custom Settings Pages</strong>.', 'pods' ); ?></p> 
  59. </a> 
  60.  
  61. </div> 
  62. <div class="pods-wizard-option"> 
  63. <a href="#pods-wizard-extend" data-opt="extend"> 
  64. <h2><?php _e( 'Extend Existing', 'pods' ); ?></h2> 
  65.  
  66. <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> 
  67. </a> 
  68.  
  69. </div> 
  70. </div> 
  71. </div> 
  72. <div id="pods-wizard-panel-2" class="pods-wizard-panel"> 
  73. <div class="pods-wizard-option-content" id="pods-wizard-create"> 
  74. <div class="pods-wizard-content"> 
  75. <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> 
  76. </div> 
  77. <div class="stuffbox"> 
  78. <h3><label for="link_name"><?php _e( 'Create a New Content Type', 'pods' ); ?></label></h3> 
  79.  
  80. <div class="inside pods-manage-field pods-dependency"> 
  81. <div class="pods-field-option"> 
  82. <?php 
  83. 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' ), 'http://pods.io/docs/comparisons/compare-content-types/' ) ); 
  84.  
  85. $data = array( 
  86. 'post_type' => __( 'Custom Post Type (like Posts or Pages)', 'pods' ),  
  87. 'taxonomy' => __( 'Custom Taxonomy (like Categories or Tags)', 'pods' ),  
  88. 'settings' => __( 'Custom Settings Page', 'pods' ),  
  89. 'pod' => '' // component will fill this in if it's enabled (this exists for placement) 
  90. ); 
  91.  
  92. $data = apply_filters( 'pods_admin_setup_add_create_pod_type', $data ); 
  93.  
  94. if ( empty( $data[ 'pod' ] ) ) 
  95. unset( $data[ 'pod' ] ); 
  96.  
  97. echo PodsForm::field( 'create_pod_type', pods_var_raw( 'create_pod_type', 'post' ), 'pick', array( 'data' => $data, 'class' => 'pods-dependent-toggle' ) ); 
  98. ?> 
  99. </div> 
  100.  
  101. <?php 
  102. if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_create_taxonomy_storage', false ) ) { 
  103. ?> 
  104. <div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-taxonomy"> 
  105. <?php 
  106. echo PodsForm::label( 'create_storage_taxonomy', __( 'Enable Extra Fields?', 'pods' ), array( __( '<h6>Storage Types</h6> Taxonomies do not support extra fields natively, but Pods can add this feature for you easily. Table based storage will operate in a way where each field you create for your content type becomes a field in a table.', 'pods' ), 'http://pods.io/docs/comparisons/compare-storage-types/' ) ); 
  107.  
  108. $data = array( 
  109. 'none' => __( 'Do not enable extra fields to be added', 'pods' ),  
  110. 'table' => __( 'Enable extra fields for this Taxonomy (Table Based)', 'pods' ) 
  111. ); 
  112.  
  113. $default = 'none'; 
  114.  
  115. if ( function_exists( 'get_term_meta' ) ) { 
  116. $data = array( 
  117. 'meta' => __( 'Meta Based (WP Default)', 'pods' ),  
  118. 'table' => $data['table'],  
  119. ); 
  120.  
  121. $default = 'meta'; 
  122.  
  123. echo PodsForm::field( 'create_storage_taxonomy', pods_var_raw( 'create_storage_taxonomy', 'post', $default, null, true ), 'pick', array( 'data' => $data ) ); 
  124. ?> 
  125. </div> 
  126. <?php 
  127. ?> 
  128.  
  129. <div class="pods-excludes-on pods-excludes-on-create-pod-type pods-excludes-on-create-pod-type-settings"> 
  130. <div class="pods-field-option"> 
  131. <?php 
  132. 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' ) ); 
  133. echo PodsForm::field( 'create_label_singular', pods_var_raw( 'create_label_singular', 'post' ), 'text', array( 'class' => 'pods-validate pods-validate-required', 'text_max_length' => 30 ) ); 
  134. ?> 
  135. </div> 
  136. <div class="pods-field-option"> 
  137. <?php 
  138. 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' ) ); 
  139. echo PodsForm::field( 'create_label_plural', pods_var_raw( 'create_label_plural', 'post' ), 'text', array( 'text_max_length' => 30 ) ); 
  140. ?> 
  141. </div> 
  142. </div> 
  143. <div class="pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-settings"> 
  144. <div class="pods-field-option"> 
  145. <?php 
  146. 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' ) ); 
  147. echo PodsForm::field( 'create_label_title', pods_var_raw( 'create_label_title', 'post' ), 'text', array( 'class' => 'pods-validate pods-validate-required', 'text_max_length' => 30 ) ); 
  148. ?> 
  149. </div> 
  150. <div class="pods-field-option"> 
  151. <?php 
  152. 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' ) ); 
  153. echo PodsForm::field( 'create_label_menu', pods_var_raw( 'create_label_menu', 'post' ), 'text', array( 'text_max_length' => 30 ) ); 
  154. ?> 
  155. </div> 
  156. <div class="pods-field-option"> 
  157. <?php 
  158. 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' ) ); 
  159.  
  160. $data = array( 
  161. 'settings' => 'Add to Settings menu',  
  162. 'appearances' => 'Add to Appearances menu',  
  163. 'top' => 'Make a new menu item below Settings' 
  164. ); 
  165.  
  166. echo PodsForm::field( 'create_menu_location', pods_var_raw( 'create_menu_location', 'post' ), 'pick', array( 'data' => $data ) ); 
  167. ?> 
  168. </div> 
  169. </div> 
  170.  
  171. <p> 
  172. <a href="#pods-advanced" class="pods-advanced-toggle"><?php _e( 'Advanced', 'pods' ); ?> +</a> 
  173. </p> 
  174.  
  175. <div class="pods-advanced"> 
  176. <div class="pods-field-option pods-excludes-on pods-excludes-on-create-pod-type pods-excludes-on-create-pod-type-settings"> 
  177. <?php 
  178. global $wpdb; 
  179. $max_length_name = 64; 
  180. $max_length_name -= 10; // Allow for WP Multisite or prefix changes in the future 
  181. $max_length_name -= strlen( $wpdb->prefix . 'pods_' ); 
  182.  
  183. echo PodsForm::label( 'create_name', __( 'Pod Name', 'pods' ), __( '<h6>Pod Indentifier</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' ) ); 
  184. echo PodsForm::field( 'create_name', pods_var_raw( 'create_name', 'post' ), 'db', array( 'attributes' => array( 'maxlength' => $max_length_name, 'size' => 25 ) ) ); 
  185. ?> 
  186. </div> 
  187. <div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-settings"> 
  188. <?php 
  189. global $wpdb; 
  190. $max_length_name = 64; 
  191. $max_length_name -= 10; // Allow for WP Multisite or prefix changes in the future 
  192. $max_length_name -= strlen( $wpdb->prefix . 'pods_' ); 
  193.  
  194. echo PodsForm::label( 'create_setting_name', __( 'Pod Name', 'pods' ), __( '<h6>Pod Indentifier</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' ) ); 
  195. echo PodsForm::field( 'create_setting_name', pods_var_raw( 'create_setting_name', 'post' ), 'db', array( 'attributes' => array( 'maxlength' => $max_length_name, 'size' => 25 ) ) ); 
  196. ?> 
  197. </div> 
  198.  
  199. <?php 
  200. if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_create_storage', false ) ) { 
  201. ?> 
  202. <div class="pods-field-option pods-depends-on pods-depends-on-create-pod-type pods-depends-on-create-pod-type-post-type"> 
  203. <?php 
  204. echo PodsForm::label( 'create_storage', __( 'Storage Type', 'pods' ), array( __( '<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' ), 'http://pods.io/docs/comparisons/compare-storage-types/' ) ); 
  205.  
  206. $data = array( 
  207. 'meta' => __( 'Meta Based (WP Default)', 'pods' ),  
  208. 'table' => __( 'Table Based', 'pods' ) 
  209. ); 
  210.  
  211. echo PodsForm::field( 'create_storage', pods_var_raw( 'create_storage', 'post' ), 'pick', array( 'data' => $data ) ); 
  212. ?> 
  213. </div> 
  214. <?php 
  215. ?> 
  216. </div> 
  217. </div> 
  218. </div> 
  219. </div> 
  220. <div class="pods-wizard-option-content" id="pods-wizard-extend"> 
  221. <div class="pods-wizard-content"> 
  222. <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> 
  223. </div> 
  224. <div class="stuffbox"> 
  225. <h3><label for="link_name"><?php _e( 'Extend an Existing Content Type', 'pods' ); ?></label></h3> 
  226.  
  227. <div class="inside pods-manage-field pods-dependency"> 
  228.  
  229. <div class="pods-field-option"> 
  230. <?php 
  231. 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' ), 'http://pods.io/docs/comparisons/compare-content-types/' ) ); 
  232.  
  233. $data = array( 
  234. 'post_type' => __( 'Post Types (Posts, Pages, etc..)', 'pods' ),  
  235. 'taxonomy' => '', // component will fill this in if it's enabled (this exists for placement) 
  236. 'media' => __( 'Media', 'pods' ),  
  237. 'user' => __( 'Users', 'pods' ),  
  238. 'comment' => __( 'Comments', 'pods' ) 
  239. ); 
  240.  
  241. if ( function_exists( 'get_term_meta' ) ) { 
  242. $data[ 'taxonomy' ] = __( 'Taxonomies (Categories, Tags, etc..)', 'pods' ); 
  243.  
  244. if ( isset( $all_pods[ 'media' ] ) && 'media' == $all_pods[ 'media' ][ 'type' ] ) 
  245. unset( $data[ 'media' ] ); 
  246.  
  247. if ( isset( $all_pods[ 'user' ] ) && 'user' == $all_pods[ 'user' ][ 'type' ] ) 
  248. unset( $data[ 'user' ] ); 
  249.  
  250. if ( isset( $all_pods[ 'comment' ] ) && 'comment' == $all_pods[ 'comment' ][ 'type' ] ) 
  251. unset( $data[ 'comment' ] ); 
  252.  
  253. $data = apply_filters( 'pods_admin_setup_add_extend_pod_type', $data ); 
  254.  
  255. if ( empty( $data[ 'taxonomy' ] ) ) 
  256. unset( $data[ 'taxonomy' ] ); 
  257.  
  258. echo PodsForm::field( 'extend_pod_type', pods_var_raw( 'extend_pod_type', 'post' ), 'pick', array( 'data' => $data, 'class' => 'pods-dependent-toggle' ) ); 
  259. ?> 
  260. </div> 
  261. <div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-post-type"> 
  262. <?php 
  263. $post_types = get_post_types(); 
  264. $ignore = array( 'attachment', 'revision', 'nav_menu_item' ); 
  265.  
  266. foreach ( $post_types as $post_type => $label ) { 
  267. if ( in_array( $post_type, $ignore ) || empty( $post_type ) || 0 === strpos( $post_type, '_pods_' ) ) { 
  268. unset( $post_types[ $post_type ] ); 
  269. continue; 
  270. elseif ( isset( $all_pods[ $post_type ] ) && 'post_type' == $all_pods[ $post_type ][ 'type' ] ) { 
  271. unset( $post_types[ $post_type ] ); 
  272. continue; 
  273.  
  274. $post_type = get_post_type_object( $post_type ); 
  275. $post_types[ $post_type->name ] = $post_type->label; 
  276.  
  277. 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' ) ); 
  278. echo PodsForm::field( 'extend_post_type', pods_var_raw( 'extend_post_type', 'post', 'table', null, true ), 'pick', array( 'data' => $post_types ) ); 
  279. ?> 
  280. </div> 
  281. <div class="pods-field-option pods-depends-on pods-depends-on-extend-pod-type pods-depends-on-extend-pod-type-taxonomy"> 
  282. <?php 
  283. $taxonomies = get_taxonomies(); 
  284.  
  285. //Add Support for built-in taxonomy "link_category" 
  286. //if links are in use. 
  287. $bookmarkcount = count(get_bookmarks()); 
  288. if ($bookmarkcount < 1) { 
  289. $ignore = array( 'link_category' ); 
  290.  
  291. foreach ( $taxonomies as $taxonomy => $label ) { 
  292. if ( in_array( $taxonomy, $ignore ) ) { 
  293. unset( $taxonomies[ $taxonomy ] ); 
  294. continue; 
  295. elseif ( isset( $all_pods[ $taxonomy ] ) && 'taxonomy' == $all_pods[ $taxonomy ][ 'type' ] ) { 
  296. unset( $taxonomies[ $taxonomy ] ); 
  297. continue; 
  298.  
  299. $taxonomy = get_taxonomy( $taxonomy ); 
  300. $taxonomies[ $taxonomy->name ] = $taxonomy->label; 
  301.  
  302. 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' ) ); 
  303. echo PodsForm::field( 'extend_taxonomy', pods_var_raw( 'extend_taxonomy', 'post' ), 'pick', array( 'data' => $taxonomies ) ); 
  304. ?> 
  305. </div> 
  306.  
  307. <?php 
  308. if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_extend_taxonomy_storage', false ) ) { 
  309. ?> 
  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. echo PodsForm::label( 'extend_storage_taxonomy', __( 'Enable Extra Fields?', 'pods' ), array( __( '<h6>Storage Types</h6> Taxonomies do not support extra fields natively, but Pods can add this feature for you easily. Table based storage will operate in a way where each field you create for your content type becomes a field in a table.', 'pods' ), 'http://pods.io/docs/comparisons/compare-storage-types/' ) ); 
  313.  
  314. $data = array( 
  315. 'none' => __( 'Do not enable extra fields to be added', 'pods' ),  
  316. 'table' => __( 'Enable extra fields for this Taxonomy (Table Based)', 'pods' ) 
  317. ); 
  318.  
  319. $default = 'none'; 
  320.  
  321. if ( function_exists( 'get_term_meta' ) ) { 
  322. $data = array( 
  323. 'meta' => __( 'Meta Based (WP Default)', 'pods' ),  
  324. 'table' => $data['table'],  
  325. ); 
  326.  
  327. $default = 'meta'; 
  328.  
  329. echo PodsForm::field( 'extend_storage_taxonomy', pods_var_raw( 'extend_storage_taxonomy', 'post', $default, null, true ), 'pick', array( 'data' => $data ) ); 
  330. ?> 
  331. </div> 
  332. <?php 
  333. ?> 
  334.  
  335. <?php 
  336. if ( ( !pods_tableless() ) && apply_filters( 'pods_admin_setup_add_extend_storage', false ) ) { 
  337. ?> 
  338. <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"> 
  339. <p><a href="#pods-advanced" class="pods-advanced-toggle"><?php _e( 'Advanced', 'pods' ); ?> +</a></p> 
  340.  
  341. <div class="pods-advanced"> 
  342. <div class="pods-field-option"> 
  343. <?php 
  344. echo PodsForm::label( 'extend_storage', __( 'Storage Type', 'pods' ), array( __( '<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' ), 'http://pods.io/docs/comparisons/compare-storage-types/' ) ); 
  345.  
  346. $data = array( 
  347. 'meta' => __( 'Meta Based (WP Default)', 'pods' ),  
  348. 'table' => __( 'Table Based', 'pods' ) 
  349. ); 
  350.  
  351. echo PodsForm::field( 'extend_storage', pods_var_raw( 'extend_storage', 'post' ), 'pick', array( 'data' => $data ) ); 
  352. ?> 
  353. </div> 
  354. </div> 
  355. </div> 
  356. <?php 
  357. ?> 
  358. </div> 
  359. </div> 
  360. </div> 
  361. </div> 
  362.  
  363. <div id="pods-wizard-actions"> 
  364. <div id="pods-wizard-toolbar"> 
  365. <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> 
  366. </div> 
  367. <div id="pods-wizard-finished"> 
  368.  
  369. </div> 
  370. </div> 
  371. </div> 
  372. </div> 
  373. </div> 
  374. </form> 
  375. </div> 
  376. <script type="text/javascript"> 
  377. var pods_admin_submit_callback = function ( id ) { 
  378. id = parseInt( id ); 
  379.  
  380. if ( !isNaN( id ) ) { 
  381. document.location = 'admin.php?page=pods&action=edit&id=' + id + '&do=create'; 
  382. else { 
  383. document.location = 'admin.php?page=pods&do=create'; 
  384.  
  385. var pods_admin_option_select_callback = function ( $opt ) { 
  386. jQuery( '#pods_create_extend' ).val( $opt.data( 'opt' ) ); 
  387.  
  388. jQuery( function ( $ ) { 
  389. $( document ).Pods( 'validate' ); 
  390. $( document ).Pods( 'submit' ); 
  391. $( document ).Pods( 'wizard' ); 
  392. $( document ).Pods( 'dependency' ); 
  393. $( document ).Pods( 'advanced' ); 
  394. $( document ).Pods( 'confirm' ); 
  395. $( document ).Pods( 'sluggable' ); 
  396.  
  397. $( document ).find( '.pods-dependency .pods-dependent-toggle' ).each( function () { 
  398. $( this ).trigger( 'change' ); 
  399. } ); 
  400. } ); 
  401. </script> 
.